-
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
Add input_embeds functionality to gpt_neo Causal LM #25659
Add input_embeds functionality to gpt_neo Causal LM #25659
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.
Awesome, thank you for adding it @gaasher 🔥
(CI can be fixed by running |
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. |
Just did this! |
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.
Thanks for the fix!
cc @ydshieh do you think it makes sense to add a common test for this? (small configs, nlp models, just test that we can use inputs_enmbeds
for generation if past_key_values for most models, this way people add this automatically) ?
model_inputs.update( | ||
{ | ||
"input_ids": input_ids, |
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.
model_inputs.update( | |
{ | |
"input_ids": input_ids, | |
model_inputs.update( | |
{ |
* Updated gpt_neo causalLM to support using input embeddings for generation * added indentation * Did make fixup
* Updated gpt_neo causalLM to support using input embeddings for generation * added indentation * Did make fixup
This PR follows up on #21405, #21889, and #22916 by @gante to GPTNeoCausalLM models, which allows these models to accept input_embeds when generating.
Who can review?
@gante @sgugger