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

Add warning message when using transformers < 4.35 #524

Merged
merged 3 commits into from
Jan 19, 2024

Conversation

helena-intel
Copy link
Collaborator

@helena-intel helena-intel commented Jan 18, 2024

There is a large performance degradation when using transformers < 4.36 and optimum 1.16 to export stateful models. This PR adds a warning message when exporting stateful models with transformers < 4.36 or PyTorch<2.1.1. I made the warning bright red because without that it would definitely be lost between the other output, and this is really important to not miss. The ANSI color codes should work well on most systems (Windows and Linux terminal, Jupyter). In the case that it doesn't work, it's just a few numbers printed before and after the message.

image

@HuggingFaceDocBuilderDev

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.

Copy link
Collaborator

@echarlaix echarlaix left a comment

Choose a reason for hiding this comment

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

LGTM!

optimum/exporters/openvino/convert.py Outdated Show resolved Hide resolved
optimum/exporters/openvino/convert.py Outdated Show resolved Hide resolved
optimum/exporters/openvino/convert.py Outdated Show resolved Hide resolved
helena-intel and others added 2 commits January 18, 2024 17:54
Co-authored-by: Ella Charlaix <80481427+echarlaix@users.noreply.github.com>
@helena-intel helena-intel force-pushed the helena/transformers-pytorch-version-warning branch from fe52c9f to 59a1e15 Compare January 19, 2024 10:57
@echarlaix echarlaix merged commit 4652ae4 into main Jan 19, 2024
12 of 14 checks passed
@echarlaix echarlaix deleted the helena/transformers-pytorch-version-warning branch January 19, 2024 13:23
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.

3 participants