-
Notifications
You must be signed in to change notification settings - Fork 28.1k
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
Refactor OPT model #36101
Refactor OPT model #36101
Conversation
Signed-off-by: jiqing-feng <jiqing.feng@intel.com>
Signed-off-by: jiqing-feng <jiqing.feng@intel.com>
Just fyi and as additional context: iirc it's a relic from using BART code via copied from but it deviated after some time making it inherent the unnecessary code. |
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.
Sounds good! Could you just link the discussion wherewe talked about 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.
Nice cleanup !
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. |
Okay found it here! https://github.com/huggingface/transformers/pull/35724/files#r1918254784 |
* remove cross attention Signed-off-by: jiqing-feng <jiqing.feng@intel.com> * remove is_decoder Signed-off-by: jiqing-feng <jiqing.feng@intel.com> * fix pkv Signed-off-by: jiqing-feng <jiqing.feng@intel.com> --------- Signed-off-by: jiqing-feng <jiqing.feng@intel.com>
Hi @ArthurZucker @SunMarc . I removed useless codes for opt model including:
cros_attention
becausekey_value_states
has never been passedself.is_decoder
because it is fixed toTrue
I also checked it by
RUN_SLOW=1 pytest tests/models/opt/test_modeling_opt.py
and the results are the same as main branch.After this PR is merged, I will enable static cache on opt model.