A high-throughput and memory-efficient inference and serving engine for LLMs
Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git
Synced Nov 5, 12:15 UTC
Fix Mistral yarn warning in Transformers v5 (#37292)
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com> Co-authored-by: Julien Denize <40604584+juliendenize@users.noreply.github.com>
Harry Mellor committed
Apr 7, 2026 at 15:23 UTC
edcc37a8cee26813fe868b9fc267c3cba5818ff7
1 file changed
+6
vllm/transformers_utils/configs/mistral.py
+6
@@ -2,7 +2,9 @@
2
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
3
from typing import Any
4
5
+from packaging.version import Version
6
from transformers import PretrainedConfig, WhisperConfig
7
+from transformers import __version__ as TRANSFORMERS_VERSION
8
9
from vllm.logger import init_logger
10
@@ -134,6 +136,10 @@ def _remap_mistral_yarn_args(config: dict) -> dict:
136
# Cast to remove Transformers > v5 type warnings
137
config["rope_parameters"][new_name] = cast(yarn_config.pop(old_name))
138
139
+ # Ignore apply_yarn_scaling in Transformers > v5 RoPE validation to remove warnings
140
+ if Version(TRANSFORMERS_VERSION) >= Version("5.3.0.dev0"):
141
+ config["ignore_keys_at_rope_validation"] = {"apply_yarn_scaling"}
142
+
143
assert len(yarn_config) == 0, f"Unparsed yarn config: {yarn_config}"
144
145
return config