-
Notifications
You must be signed in to change notification settings - Fork 34
Description
While trying to use examples/sqlite.ipynb on nsql-llama-2-7B I get the following error:
HTTPError: {'message': "The following model_kwargs are not used by the model: ['token_type_ids'] (note: typos in the generate arguments will also show up in this list)"}
`HTTPError Traceback (most recent call last)
File ~/Documents/projects/llm/lib/python3.11/site-packages/manifest/clients/client.py:409, in Client._run_completion(self, request_params, retry_timeout)
408 try:
--> 409 res.raise_for_status()
410 except requests.exceptions.HTTPError:
File ~/Documents/projects/llm/lib/python3.11/site-packages/requests/models.py:1021, in Response.raise_for_status(self)
1020 if http_error_msg:
-> 1021 raise HTTPError(http_error_msg, response=self)
HTTPError: 400 Client Error: BAD REQUEST for url: http://127.0.0.1:8000/completions
During handling of the above exception, another exception occurred:
HTTPError Traceback (most recent call last)
Cell In[21], line 1
----> 1 sql = get_sql("Number of rows in table?")
2 print(sql)
Cell In[20], line 7, in get_sql(instruction, max_tokens)
5 def get_sql(instruction: str, max_tokens: int = 300) -> str:
6 prompt = formatter.format_prompt(instruction)
----> 7 res = manifest_client.run(prompt, max_tokens=max_tokens)
8 return formatter.format_model_output(res)
File ~/Documents/projects/llm/lib/python3.11/site-packages/manifest/manifest.py:380, in Manifest.run(self, prompt, overwrite_cache, stop_token, return_response, stream, **kwargs)
369 logger.warning(
370 "stop_token is not supported for chat prompt. "
371 "Ignoring stop_token."
372 )
373 return self._run_chat(
374 prompt=cast(List[Dict[str, str]], prompt),
375 client=client,
(...)
378 **kwargs,
379 )
--> 380 return self._run(
381 prompt=cast(Union[str, List[str]], prompt),
382 client=client,
383 overwrite_cache=overwrite_cache,
384 stop_token=stop_token,
385 return_response=return_response,
386 **kwargs,
387 )
File ~/Documents/projects/llm/lib/python3.11/site-packages/manifest/manifest.py:429, in Manifest._run(self, prompt, client, overwrite_cache, stop_token, return_response, **kwargs)
426 if request_params.prompt:
427 # Start timing metrics
428 self.client_pool.start_timer()
--> 429 response = client.run_request(request_params)
430 self.client_pool.end_timer()
431 else:
432 # Nothing to run
File ~/Documents/projects/llm/lib/python3.11/site-packages/manifest/clients/client.py:546, in Client.run_request(self, request)
543 batch_size = int(math.ceil(len(prompt_list) / (num_batches + 1)))
544 request_batches = self._split_requests(request_params, batch_size)
--> 546 response_dicts = [
547 self._run_completion(batch, retry_timeout) for batch in request_batches
548 ]
549 # Flatten responses
550 return self._stitch_responses(request, response_dicts)
File ~/Documents/projects/llm/lib/python3.11/site-packages/manifest/clients/client.py:547, in (.0)
543 batch_size = int(math.ceil(len(prompt_list) / (num_batches + 1)))
544 request_batches = self._split_requests(request_params, batch_size)
546 response_dicts = [
--> 547 self._run_completion(batch, retry_timeout) for batch in request_batches
548 ]
549 # Flatten responses
550 return self._stitch_responses(request, response_dicts)
File ~/Documents/projects/llm/lib/python3.11/site-packages/tenacity/init.py:289, in BaseRetrying.wraps..wrapped_f(*args, **kw)
287 @functools.wraps(f)
288 def wrapped_f(*args: t.Any, **kw: t.Any) -> t.Any:
--> 289 return self(f, *args, **kw)
File ~/Documents/projects/llm/lib/python3.11/site-packages/tenacity/init.py:379, in Retrying.call(self, fn, *args, **kwargs)
377 retry_state = RetryCallState(retry_object=self, fn=fn, args=args, kwargs=kwargs)
378 while True:
--> 379 do = self.iter(retry_state=retry_state)
380 if isinstance(do, DoAttempt):
381 try:
File ~/Documents/projects/llm/lib/python3.11/site-packages/tenacity/init.py:314, in BaseRetrying.iter(self, retry_state)
312 is_explicit_retry = fut.failed and isinstance(fut.exception(), TryAgain)
313 if not (is_explicit_retry or self.retry(retry_state)):
--> 314 return fut.result()
316 if self.after is not None:
317 self.after(retry_state)
File ~/opt/python-3.11.5/lib/python3.11/concurrent/futures/_base.py:449, in Future.result(self, timeout)
447 raise CancelledError()
448 elif self._state == FINISHED:
--> 449 return self.__get_result()
451 self._condition.wait(timeout)
453 if self._state in [CANCELLED, CANCELLED_AND_NOTIFIED]:
File ~/opt/python-3.11.5/lib/python3.11/concurrent/futures/_base.py:401, in Future.__get_result(self)
399 if self._exception:
400 try:
--> 401 raise self._exception
402 finally:
403 # Break a reference cycle with the exception in self._exception
404 self = None
File ~/Documents/projects/llm/lib/python3.11/site-packages/tenacity/init.py:382, in Retrying.call(self, fn, *args, **kwargs)
380 if isinstance(do, DoAttempt):
381 try:
--> 382 result = fn(*args, **kwargs)
383 except BaseException: # noqa: B902
384 retry_state.set_exception(sys.exc_info()) # type: ignore[arg-type]
File ~/Documents/projects/llm/lib/python3.11/site-packages/manifest/clients/client.py:412, in Client._run_completion(self, request_params, retry_timeout)
410 except requests.exceptions.HTTPError:
411 logger.error(res.json())
--> 412 raise requests.exceptions.HTTPError(res.json())
413 return self.postprocess_response(res.json(), request_params)
HTTPError: {'message': "The following model_kwargs are not used by the model: ['token_type_ids'] (note: typos in the generate arguments will also show up in this list)"}`
Any advice on how to get around this?