Generate: fix candidate device placement#28493
Merged
ArthurZucker merged 2 commits intohuggingface:mainfrom Jan 13, 2024
Merged
Generate: fix candidate device placement#28493ArthurZucker merged 2 commits intohuggingface:mainfrom
ArthurZucker merged 2 commits intohuggingface:mainfrom
Conversation
gante
commented
Jan 13, 2024
| candidate_input_ids, candidate_logits = candidate_generator.get_candidates( | ||
| input_ids.to(candidate_generator.assistant_model.device) | ||
| ) | ||
| candidate_input_ids, candidate_logits = candidate_generator.get_candidates(input_ids) |
Contributor
Author
There was a problem hiding this comment.
in a nutshell, input_ids should only be moved on some candidate_generator classes -- the move was delegated to the relevant classes
ArthurZucker
approved these changes
Jan 13, 2024
Collaborator
ArthurZucker
left a comment
There was a problem hiding this comment.
Thanks for taking care of it
toddwildey
pushed a commit
to toddwildey/transformers
that referenced
this pull request
Feb 16, 2024
* fix candidate device * this line shouldn't have been in
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
#27775 was merged, and the branch was not synced with #27995 (already on
main) -- the two branches together result in CI failures. Fortunately, the fix is simple :)