-
Notifications
You must be signed in to change notification settings - Fork 27.3k
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 decode_input_ids to bare T5Model and improve doc #18791
Fix decode_input_ids to bare T5Model and improve doc #18791
Conversation
The documentation is not available anymore as the PR was closed or merged. |
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 your PR! @patrickvonplaten is better suited to review it as he knows T5 better than I do :-)
... padding="longest", | ||
... max_length=max_target_length, | ||
... truncation=True, | ||
... return_tensors="pt", |
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!
Thanks for the fixes! |
Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com>
Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com>
Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com>
@patrickvonplaten Thanks for the review! Applied your suggestions. |
* use tokenizer to output tensor * add preprocessing for decoder_input_ids for bare T5Model * add preprocessing to tf and flax * linting * linting * Update src/transformers/models/t5/modeling_flax_t5.py Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com> * Update src/transformers/models/t5/modeling_tf_t5.py Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com> * Update src/transformers/models/t5/modeling_t5.py Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com> Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com>
What does this PR do?
docs/source/en/model_doc/t5.mdx
src/transformers/models/t5/
T5ForConditionalGeneration
by shifting the labels to the right._shift_right()
method which is an internal function to T5. Please let me know if we can rename_shift_right()
toshift_right()
or if there is a better way to handle this.Before submitting
Pull Request section?
to it if that's the case.
documentation guidelines, and
here are tips on formatting docstrings.
@sgugger @patrickvonplaten @patil-suraj