Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] ValueError: The following model_kwargs are not used by the model #107

Closed
vyomakesh09 opened this issue Nov 8, 2023 · 0 comments
Closed
Assignees
Labels
bug Something isn't working

Comments

@vyomakesh09
Copy link
Contributor

vyomakesh09 commented Nov 8, 2023

Zephyr modal

################################

Traceback (most recent call last):
File "/home/v/inhouse/zephyr.py", line 5, in
output = model("Tell me a joke about programmers")
File "/home/v/.local/lib/python3.10/site-packages/swarms/models/zephyr.py", line 61, in call
outputs = self.pipe(prompt, max_new_token=self.max_new_tokens)
File "/home/v/.local/lib/python3.10/site-packages/transformers/pipelines/text_generation.py", line 208, in call
return super().call(text_inputs, **kwargs)
File "/home/v/.local/lib/python3.10/site-packages/transformers/pipelines/base.py", line 1140, in call
return self.run_single(inputs, preprocess_params, forward_params, postprocess_params)
File "/home/v/.local/lib/python3.10/site-packages/transformers/pipelines/base.py", line 1147, in run_single
model_outputs = self.forward(model_inputs, **forward_params)
File "/home/v/.local/lib/python3.10/site-packages/transformers/pipelines/base.py", line 1046, in forward
model_outputs = self._forward(model_inputs, **forward_params)
File "/home/v/.local/lib/python3.10/site-packages/transformers/pipelines/text_generation.py", line 271, in _forward
generated_sequence = self.model.generate(input_ids=input_ids, attention_mask=attention_mask, **generate_kwargs)
File "/home/v/.local/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 115, in decorate_context
return func(*args, **kwargs)
File "/home/v/.local/lib/python3.10/site-packages/transformers/generation/utils.py", line 1485, in generate
self._validate_model_kwargs(model_kwargs.copy())
File "/home/v/.local/lib/python3.10/site-packages/transformers/generation/utils.py", line 1262, in _validate_model_kwargs
raise ValueError(
ValueError: The following model_kwargs are not used by the model: ['max_new_token'] (note: typos in the generate arguments will also show up in this list)

Upvote & Fund

  • We're using Polar.sh so you can upvote and help fund this issue.
  • We receive the funding once the issue is completed & confirmed by you.
  • Thank you in advance for helping prioritize & fund our backlog.
Fund with Polar
@vyomakesh09 vyomakesh09 added the bug Something isn't working label Nov 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants