Skip to content

Fix Mistral yarn warning in Transformers v5 - #37292

Merged
hmellor merged 5 commits into
vllm-project:mainfrom
hmellor:fix-mistral-warning
Apr 7, 2026
Merged

hmellor merged 5 commits into
vllm-project:mainfrom
hmellor:fix-mistral-warning

Conversation

@hmellor

@hmellor hmellor commented Mar 17, 2026

Copy link
Copy Markdown
Member

As of huggingface/transformers#41250 the ignore_keys argument to validate_rope was removed in favour of ClassVars attached to the config classes themselves.

This PR sets this new ClassVar for Mistral models which use yarn so that the warning from Transformers RoPE validation is suppressed.

cc @juliendenize

Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
@hmellor

hmellor commented Mar 17, 2026

Copy link
Copy Markdown
Member Author

@juliendenize could you please confirm that this fix works for you?

@hmellor hmellor mentioned this pull request Mar 17, 2026
3 of 5 tasks

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

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 addresses a warning from newer versions of the transformers library for Mistral models using YaRN scaling. It does so by adding ignore_keys_at_rope_validation to the model configuration. My review suggests adding a version guard to this change to ensure compatibility across different transformers versions.

Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>

@juliendenize juliendenize left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hey sorry took a bit of time to answer was off for two days 😄

I had to change to make it >5.2.0 for it to work, hence my suggestion. This is due to 5.3.0.dev being < 5.3.0.

Thanks for finding a clean, Transformers native, solution !

hmellor and others added 2 commits April 7, 2026 13:53
Co-authored-by: Julien Denize <40604584+juliendenize@users.noreply.github.com>
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
@hmellor
hmellor enabled auto-merge (squash) April 7, 2026 11:53
@github-actions github-actions Bot added the ready ONLY add when PR is ready to merge/full CI is needed label Apr 7, 2026
@hmellor
hmellor merged commit edcc37a into vllm-project:main Apr 7, 2026
48 checks passed
@hmellor
hmellor deleted the fix-mistral-warning branch April 7, 2026 13:23
mtparet pushed a commit to blackfuel-ai/vllm that referenced this pull request Apr 9, 2026
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
Co-authored-by: Julien Denize <40604584+juliendenize@users.noreply.github.com>
mystous pushed a commit to mystous/vllm_hybrid that referenced this pull request May 10, 2026
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
Co-authored-by: Julien Denize <40604584+juliendenize@users.noreply.github.com>
my-other-github-account pushed a commit to my-other-github-account/vllm that referenced this pull request May 15, 2026
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
Co-authored-by: Julien Denize <40604584+juliendenize@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready ONLY add when PR is ready to merge/full CI is needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants