We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Transformers version 4.43.3 causes this error, works fine in 4.42
from transformers import AutoTokenizer, AutoModelForCausalLM import transformers import torch model_id = "google/recurrentgemma-2b-it" dtype = torch.bfloat16 tokenizer = AutoTokenizer.from_pretrained(model_id) model = AutoModelForCausalLM.from_pretrained( model_id, device_map="cuda", torch_dtype=dtype, ) chat = [ { "role": "user", "content": "Explain what is AI in 3 bullet points" }, ] prompt = tokenizer.apply_chat_template(chat, tokenize=False, add_generation_prompt=True) inputs = tokenizer.encode(prompt, add_special_tokens=False, return_tensors="pt") outputs = model.generate(input_ids=inputs.to(model.device), max_new_tokens=150) print(tokenizer.decode(outputs[0]))
Gives the following error now:
RecurrentGemmaForCausalLM.forward() got an unexpected keyword argument 'position_ids'
No response
examples
Already mentioned above.
The prompt should run without errors just like in version 4.42
The text was updated successfully, but these errors were encountered:
Opening a PR for a fix!
Sorry, something went wrong.
It was broken by #31549 😅
Thanks for the prompt fix, much appreciated!
Successfully merging a pull request may close this issue.
System Info
Transformers version 4.43.3 causes this error, works fine in 4.42
Gives the following error now:
RecurrentGemmaForCausalLM.forward() got an unexpected keyword argument 'position_ids'
Who can help?
No response
Information
Tasks
examples
folder (such as GLUE/SQuAD, ...)Reproduction
Already mentioned above.
Expected behavior
The prompt should run without errors just like in version 4.42
The text was updated successfully, but these errors were encountered: