-
-
Notifications
You must be signed in to change notification settings - Fork 11.8k
[BugFix] Fix mixed penalties batch with async scheduling #27910
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
Conversation
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.
Code Review
This pull request addresses a bug in async scheduling where a batch containing a mix of requests with and without penalties could fail. The fix involves replacing placeholder -1 token IDs with a valid token ID to prevent errors in downstream operations. The approach is sound. I've suggested a minor improvement to make the fix more robust by using vocab_size as the replacement value, which is already used as a padding/ignore value, instead of 0.
Signed-off-by: Nick Hill <[email protected]>
36e9424 to
1aecaef
Compare
…t#27910) Signed-off-by: Nick Hill <[email protected]>
…t#27910) Signed-off-by: Nick Hill <[email protected]>
…t#27910) Signed-off-by: Nick Hill <[email protected]>
…t#27910) Signed-off-by: Nick Hill <[email protected]>
…t#27910) Signed-off-by: Nick Hill <[email protected]>
#26467 fixed compatibility of penalties sampling parameters with async scheduling but has a flaw that it breaks in cases where there is a mix of requests with and without penalties in the batch, specifically if a request with a penalties param starts while a batch without penalties is already running.
This is a fix for that case.