-
Notifications
You must be signed in to change notification settings - Fork 52
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
Batch Inference #17
Comments
Sorry for missing some critical information. I am using QLORA. Here is my configuration. |
Please check our codes for your reference: |
Thanks for your hard work. I tried to conduct batch inference but encountered some errors. My code looks like:
prompts = tokenizer(test_dataset, return_tensors='pt', padding=True, truncation=True)
gen_tokens = model.generate(
**prompts,
do_sample=False,
max_new_tokens=30,
)
gen_text = tokenizer.batch_decode(gen_tokens, skip_special_tokens=True)
The error message is about "reporting a bug to pytorch". I think the problems roots in "hidden_states.to(torch.float32)". I say in your evaluation code, there is only "inference_on_one". Can you provide more guidance?
Thank you for your time and consideration.
The text was updated successfully, but these errors were encountered: