-
-
Notifications
You must be signed in to change notification settings - Fork 9.9k
Update transformers to v4.55
#21931
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
Update transformers to v4.55
#21931
Conversation
Signed-off-by: Harry Mellor <[email protected]>
👋 Hi! Thank you for contributing to the vLLM project. 💬 Join our developer Slack at https://slack.vllm.ai to discuss your PR in #pr-reviews, coordinate on features in #feat- channels, or join special interest groups in #sig- channels. Just a reminder: PRs would not trigger full CI run by default. Instead, it would only run Once the PR is approved and ready to go, your PR reviewer(s) can run CI to test the changes comprehensively before merging. To run CI, PR reviewers can either: Add 🚀 |
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.
Code Review
This pull request updates the transformers
library to version v4.54.1
and huggingface-hub
to v0.34.3
. While this is a necessary update, it introduces potential risks due to reliance on workarounds and private APIs from older transformers
versions. I recommend addressing the following points to ensure stability and correctness. First, a critical issue in vllm/model_executor/models/transformers.py
is the use of the private _attn_implementation
API. With transformers v4.54.1
, the public model.set_attn_implementation()
should be used to avoid silently disabling vLLM's custom attention, which would impact performance and correctness. Second, there are high-risk, potentially obsolete workarounds in vllm/config.py
for gemma2
and gemma3n_text
model configs, and in vllm/transformers_utils/tokenizer.py
for ChatGLMTokenizer
. These may now be fixed in transformers
and could cause incorrect behavior if they override updated library logic. Verifying and removing these if they are no longer necessary is highly recommended.
Signed-off-by: Harry Mellor <[email protected]>
Signed-off-by: Harry Mellor <[email protected]>
What failures are introduced by that PR? From my understanding those test failures also happen on main. |
Signed-off-by: Harry Mellor <[email protected]>
I wasn't aware they were also on main. I assumed they were from that PR because many of them refer to the same configs that were modified. |
Well in any case, it's great to fix them anyway |
Ok I figured out that some of the failures in that PR are caused by missing |
Signed-off-by: Harry Mellor <[email protected]>
Ok, happy to review once it's open |
Opened #21934 |
Signed-off-by: Harry Mellor <[email protected]>
Signed-off-by: Harry Mellor <[email protected]>
Signed-off-by: Harry Mellor <[email protected]>
Signed-off-by: Harry Mellor <[email protected]>
Signed-off-by: DarkLight1337 <[email protected]>
Signed-off-by: DarkLight1337 <[email protected]>
Signed-off-by: DarkLight1337 <[email protected]>
Hope this passes now |
Signed-off-by: Harry Mellor <[email protected]>
…t now Signed-off-by: Harry Mellor <[email protected]>
gte-Qwen2-1.5B-instruct hf Implementation does not support v4.54.1 |
@noooop are you suggesting that we upper bound this model in tests to 4.53.2? |
Ok, I'll make that change in the next batch of commits (I'll let the tests run to completion) |
How long can we land this? Need this first before merging gpt-oss changes (#22259) |
We just need to get CI to pass |
I understand this was a priority for gpt-oss, I'll work on hotfixiing anything that wasn't fully resolved in CI |
Signed-off-by: Harry Mellor <[email protected]> Signed-off-by: DarkLight1337 <[email protected]> Signed-off-by: Isotr0py <[email protected]> Signed-off-by: isotr0py <[email protected]> Signed-off-by: Isotr0py <[email protected]> Co-authored-by: DarkLight1337 <[email protected]> Co-authored-by: Isotr0py <[email protected]> Co-authored-by: Isotr0py <[email protected]> Co-authored-by: Woosuk Kwon <[email protected]>
Signed-off-by: Harry Mellor <[email protected]> Signed-off-by: DarkLight1337 <[email protected]> Signed-off-by: Isotr0py <[email protected]> Signed-off-by: isotr0py <[email protected]> Signed-off-by: Isotr0py <[email protected]> Co-authored-by: DarkLight1337 <[email protected]> Co-authored-by: Isotr0py <[email protected]> Co-authored-by: Isotr0py <[email protected]> Co-authored-by: Woosuk Kwon <[email protected]>
Signed-off-by: Harry Mellor <[email protected]> Signed-off-by: DarkLight1337 <[email protected]> Signed-off-by: Isotr0py <[email protected]> Signed-off-by: isotr0py <[email protected]> Signed-off-by: Isotr0py <[email protected]> Co-authored-by: DarkLight1337 <[email protected]> Co-authored-by: Isotr0py <[email protected]> Co-authored-by: Isotr0py <[email protected]> Co-authored-by: Woosuk Kwon <[email protected]> Signed-off-by: jingyu <[email protected]>
Signed-off-by: Harry Mellor <[email protected]> Signed-off-by: DarkLight1337 <[email protected]> Signed-off-by: Isotr0py <[email protected]> Signed-off-by: isotr0py <[email protected]> Signed-off-by: Isotr0py <[email protected]> Co-authored-by: DarkLight1337 <[email protected]> Co-authored-by: Isotr0py <[email protected]> Co-authored-by: Isotr0py <[email protected]> Co-authored-by: Woosuk Kwon <[email protected]> Signed-off-by: Jinzhen Lin <[email protected]>
Signed-off-by: Harry Mellor <[email protected]> Signed-off-by: DarkLight1337 <[email protected]> Signed-off-by: Isotr0py <[email protected]> Signed-off-by: isotr0py <[email protected]> Signed-off-by: Isotr0py <[email protected]> Co-authored-by: DarkLight1337 <[email protected]> Co-authored-by: Isotr0py <[email protected]> Co-authored-by: Isotr0py <[email protected]> Co-authored-by: Woosuk Kwon <[email protected]> Signed-off-by: Noam Gat <[email protected]>
Signed-off-by: Harry Mellor <[email protected]> Signed-off-by: DarkLight1337 <[email protected]> Signed-off-by: Isotr0py <[email protected]> Signed-off-by: isotr0py <[email protected]> Signed-off-by: Isotr0py <[email protected]> Co-authored-by: DarkLight1337 <[email protected]> Co-authored-by: Isotr0py <[email protected]> Co-authored-by: Isotr0py <[email protected]> Co-authored-by: Woosuk Kwon <[email protected]> Signed-off-by: Avery Yingyi Huang <[email protected]>
Signed-off-by: Harry Mellor <[email protected]> Signed-off-by: DarkLight1337 <[email protected]> Signed-off-by: Isotr0py <[email protected]> Signed-off-by: isotr0py <[email protected]> Signed-off-by: Isotr0py <[email protected]> Co-authored-by: DarkLight1337 <[email protected]> Co-authored-by: Isotr0py <[email protected]> Co-authored-by: Isotr0py <[email protected]> Co-authored-by: Woosuk Kwon <[email protected]>
Signed-off-by: Harry Mellor <[email protected]> Signed-off-by: DarkLight1337 <[email protected]> Signed-off-by: Isotr0py <[email protected]> Signed-off-by: isotr0py <[email protected]> Signed-off-by: Isotr0py <[email protected]> Co-authored-by: DarkLight1337 <[email protected]> Co-authored-by: Isotr0py <[email protected]> Co-authored-by: Isotr0py <[email protected]> Co-authored-by: Woosuk Kwon <[email protected]>
Signed-off-by: Harry Mellor <[email protected]> Signed-off-by: DarkLight1337 <[email protected]> Signed-off-by: Isotr0py <[email protected]> Signed-off-by: isotr0py <[email protected]> Signed-off-by: Isotr0py <[email protected]> Co-authored-by: DarkLight1337 <[email protected]> Co-authored-by: Isotr0py <[email protected]> Co-authored-by: Isotr0py <[email protected]> Co-authored-by: Woosuk Kwon <[email protected]> Signed-off-by: Boyuan Feng <[email protected]>
Signed-off-by: Harry Mellor <[email protected]> Signed-off-by: DarkLight1337 <[email protected]> Signed-off-by: Isotr0py <[email protected]> Signed-off-by: isotr0py <[email protected]> Signed-off-by: Isotr0py <[email protected]> Co-authored-by: DarkLight1337 <[email protected]> Co-authored-by: Isotr0py <[email protected]> Co-authored-by: Isotr0py <[email protected]> Co-authored-by: Woosuk Kwon <[email protected]> Signed-off-by: Diego-Castan <[email protected]>
Signed-off-by: Harry Mellor <[email protected]> Signed-off-by: DarkLight1337 <[email protected]> Signed-off-by: Isotr0py <[email protected]> Signed-off-by: isotr0py <[email protected]> Signed-off-by: Isotr0py <[email protected]> Co-authored-by: DarkLight1337 <[email protected]> Co-authored-by: Isotr0py <[email protected]> Co-authored-by: Isotr0py <[email protected]> Co-authored-by: Woosuk Kwon <[email protected]>
Signed-off-by: Harry Mellor <[email protected]> Signed-off-by: DarkLight1337 <[email protected]> Signed-off-by: Isotr0py <[email protected]> Signed-off-by: isotr0py <[email protected]> Signed-off-by: Isotr0py <[email protected]> Co-authored-by: DarkLight1337 <[email protected]> Co-authored-by: Isotr0py <[email protected]> Co-authored-by: Isotr0py <[email protected]> Co-authored-by: Woosuk Kwon <[email protected]>
Signed-off-by: Harry Mellor <[email protected]> Signed-off-by: DarkLight1337 <[email protected]> Signed-off-by: Isotr0py <[email protected]> Signed-off-by: isotr0py <[email protected]> Signed-off-by: Isotr0py <[email protected]> Co-authored-by: DarkLight1337 <[email protected]> Co-authored-by: Isotr0py <[email protected]> Co-authored-by: Isotr0py <[email protected]> Co-authored-by: Woosuk Kwon <[email protected]> Signed-off-by: Xiao Yu <[email protected]>
Signed-off-by: Harry Mellor <[email protected]> Signed-off-by: DarkLight1337 <[email protected]> Signed-off-by: Isotr0py <[email protected]> Signed-off-by: isotr0py <[email protected]> Signed-off-by: Isotr0py <[email protected]> Co-authored-by: DarkLight1337 <[email protected]> Co-authored-by: Isotr0py <[email protected]> Co-authored-by: Isotr0py <[email protected]> Co-authored-by: Woosuk Kwon <[email protected]> Signed-off-by: Xiao Yu <[email protected]>
Signed-off-by: Harry Mellor <[email protected]> Signed-off-by: DarkLight1337 <[email protected]> Signed-off-by: Isotr0py <[email protected]> Signed-off-by: isotr0py <[email protected]> Signed-off-by: Isotr0py <[email protected]> Co-authored-by: DarkLight1337 <[email protected]> Co-authored-by: Isotr0py <[email protected]> Co-authored-by: Isotr0py <[email protected]> Co-authored-by: Woosuk Kwon <[email protected]>
Signed-off-by: Harry Mellor <[email protected]> Signed-off-by: DarkLight1337 <[email protected]> Signed-off-by: Isotr0py <[email protected]> Signed-off-by: isotr0py <[email protected]> Signed-off-by: Isotr0py <[email protected]> Co-authored-by: DarkLight1337 <[email protected]> Co-authored-by: Isotr0py <[email protected]> Co-authored-by: Isotr0py <[email protected]> Co-authored-by: Woosuk Kwon <[email protected]>
Updates to the latest version of Transformers.
Notable changes:
tp_plan
from the config of the base model because it is no longer added to the base model itself post initnn.Linear
toReplicatedLinear
to enable weight loaders likeBitsAndBytesModelLoader
to work with models that do not support TP if TP is disabledtuple
as of Refactor the way we handle outputs for new llamas and new models huggingface/transformers#39120 soreturn_tuple
has been removed fromPPMissingLayer.forward()
Enables the proper type hinting introduced by #21913