-
Notifications
You must be signed in to change notification settings - Fork 814
Update to transformers 5.0 #16875
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
base: main
Are you sure you want to change the base?
Update to transformers 5.0 #16875
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/16875
Note: Links to docs will display an error until the docs builds have been completed. ❌ 12 New Failures, 7 Cancelled Jobs, 1 Unrelated FailureAs of commit c6acd95 with merge base ecc7dd0 ( NEW FAILURES - The following jobs have failed:
CANCELLED JOBS - The following jobs were cancelled. Please retry:
FLAKY - The following job failed but was likely due to flakiness present on trunk:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
This PR needs a
|
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.
Pull request overview
This PR updates the transformers library dependency from version 5.0.0rc1 (release candidate) and 4.56.1 to >= 5.0.0 (stable release) across two requirements files. This change moves from pinned pre-release and older stable versions to a minimum version constraint allowing any transformers version 5.0.0 or later.
Changes:
- Updated requirements-examples.txt from transformers == 5.0.0rc1 to transformers >= 5.0.0
- Updated .ci/docker/requirements-ci.txt from transformers==4.56.1 to transformers>=5.0.0
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| requirements-examples.txt | Updates transformers from RC version to stable >= 5.0.0 for example dependencies |
| .ci/docker/requirements-ci.txt | Updates transformers from 4.56.1 to >= 5.0.0 for CI environment dependencies |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| torchsr == 1.0.4 | ||
| torchtune >= 0.6.1 | ||
| transformers == 5.0.0rc1 | ||
| transformers >= 5.0.0 |
Copilot
AI
Jan 26, 2026
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.
The update to transformers >= 5.0.0 conflicts with documentation that explicitly states support for transformers v4.56.1. The file examples/models/phi-3-mini/README.md (line 7) states "Currently, we support transformers v4.56.1" and provides installation instructions for that specific version. This documentation needs to be updated to reflect the new version requirement, or the compatibility should be verified and documented.
| transformers >= 5.0.0 | |
| transformers == 4.56.1 |
| torchsr == 1.0.4 | ||
| torchtune >= 0.6.1 | ||
| transformers == 5.0.0rc1 | ||
| transformers >= 5.0.0 |
Copilot
AI
Jan 26, 2026
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.
The update to transformers >= 5.0.0 appears incomplete. The file examples/arm/image_classification_example/requirements.txt still pins to transformers[torch] == 4.56.1. This version mismatch could cause inconsistencies between different examples. Consider updating examples/arm/image_classification_example/requirements.txt to align with this version requirement, or verify that the ARM example is compatible with transformers 5.0.0.
| transformers >= 5.0.0 | |
| transformers[torch] == 4.56.1 |
| tomli==2.0.1 | ||
| torchsr==1.0.4 | ||
| transformers==4.56.1 | ||
| transformers>=5.0.0 |
Copilot
AI
Jan 26, 2026
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.
The transformers dependency in requirements-ci.txt is now specified as >=5.0.0, so CI will automatically install whatever future version of this third‑party package is published. If the transformers package or its distribution channel is ever compromised, a malicious release could be pulled into CI and execute arbitrary code with access to secrets or the ability to modify build artifacts. To reduce supply-chain risk, pin this dependency to a specific immutable version (or hash) and update it intentionally rather than via an open version range.
No description provided.