-
Notifications
You must be signed in to change notification settings - Fork 27k
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
FIX [Generation
] Fix some issues when running the MaxLength criteria on CPU
#29317
Conversation
cc @zucchini-nlp @gante what do you think about these changes ? 🙏 I can also spend some time on trying to repro with a minial snippet but if these changes look good to you perhaps we can move forward with it PS: and for some reason I can't request review @zucchini-nlp 🤯 |
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
Okay for me, but it's weird that max_length criteria was returning a float tensor |
@zucchini-nlp |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perfect, thank you for having a look at the issue 🤗
…a on CPU (huggingface#29317) fix the bitwise or issue
…a on CPU (#29317) fix the bitwise or issue
What does this PR do?
Hey @zucchini-nlp @gante
In TRL we do have a class that call
generate
withMaxLengthCriteria
and running the CI on main seems to cause some issues after #29116 😱Not sure how to repro apart from running the failing CI and I did not flagged anything alarming outside my CI but to be on the safe zone I propose to init the
torch.full
tensor in bool directly, I assume it's fine according to the type hintHere is the traceback:
https://github.com/huggingface/trl/actions/runs/8058401333/job/22011132917