-
Notifications
You must be signed in to change notification settings - Fork 516
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 compatibility with transformers v 4.39.0 #1764
Conversation
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. |
@@ -15,7 +15,7 @@ | |||
REQUIRED_PKGS = [ | |||
"coloredlogs", | |||
"sympy", | |||
"transformers[sentencepiece]>=4.26.0", | |||
"transformers[sentencepiece]>=4.26.0,<4.40.0", |
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.
wdyt @fxmarty ?
@@ -252,6 +252,7 @@ class GemmaOnnxConfig(LlamaOnnxConfig): | |||
|
|||
|
|||
class PhiOnnxConfig(TextDecoderWithPositionIdsOnnxConfig): | |||
DEFAULT_ONNX_OPSET = 14 # Phi now uses F.scaled_dot_product_attention by default for torch>=2.1.1. |
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.
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.
LGTM
* Add can_generate method to fix compatibility with transformers v4.39.0 * fix style * fix import * pin transformers version * Fix Phi model export
Fix compatibility of ORTModels with transformers pipelines (broken since huggingface/transformers@53d8912)
Failing tests : https://github.com/huggingface/optimum/actions/runs/8377803444
Also update phi default opset (needed since huggingface/transformers#29108)