Skip to content
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

Generate: fix candidate device placement #28493

Merged
merged 2 commits into from
Jan 13, 2024

Conversation

gante
Copy link
Member

@gante gante commented Jan 13, 2024

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 :)

@gante gante requested a review from amyeroberts January 13, 2024 17:52
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)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in a nutshell, input_ids should only be moved on some candidate_generator classes -- the move was delegated to the relevant classes

Copy link
Collaborator

@ArthurZucker ArthurZucker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for taking care of it

@ArthurZucker ArthurZucker merged commit bc72b4e into huggingface:main Jan 13, 2024
21 checks passed
@gante gante deleted the fix_candidate branch January 15, 2024 09:30
staghado pushed a commit to staghado/transformers that referenced this pull request Jan 15, 2024
* fix candidate device

* this line shouldn't have been in
MadElf1337 pushed a commit to MadElf1337/transformers that referenced this pull request Jan 15, 2024
* fix candidate device

* this line shouldn't have been in
wgifford pushed a commit to wgifford/transformers that referenced this pull request Jan 21, 2024
* fix candidate device

* this line shouldn't have been in
AjayP13 pushed a commit to AjayP13/transformers that referenced this pull request Jan 22, 2024
* fix candidate device

* this line shouldn't have been in
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants