-
Notifications
You must be signed in to change notification settings - Fork 27.5k
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 heuristic scheduling for UAG #34805
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.
@jmamou thanks for fixing! Quick clarification, why is there a -1
, shouldn't scores
reflect the length of generated tokens?
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.
Ah, I see, thanks for explaining. Can be merged after core maintainer's review :)
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.
Cool! Thanks for fixing!
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. |
* fix heuristic schedule * fix style * fix format
* fix heuristic schedule * fix style * fix format
What does this PR do?
Fix #34803
The number of matching tokens according to the draft vocabulary is missing in candidate_generator.py. To fix the issue, we propose to modify update_candidate_strategy by comparing
num_matches
(the number of matched tokens according to the target vocabulary) withlen(scores[0]) - 1
that represents the number of tokens generated by the draft model according to the target vocabulary.Before submitting
Pull Request section?
to it if that's the case.
documentation guidelines, and
here are tips on formatting docstrings.
Who can review?
@gante @ArthurZucker @zucchini-nlp