@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / 8d8855fdae
Fork 0

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 6, 15:45 UTC

[Bugfix] Add safety check and fallback for null scaling factor (#36106)

Signed-off-by: Yuanheng Zhao <jonathan.zhaoyh@gmail.com> Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com> Co-authored-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>

Yuanheng Zhao committed Mar 16, 2026 at 22:27 UTC 8d8855fdae00830221025e4a8ba8267596372056
1 file changed +9
vllm/config/model.py
+9
@@ -2021,6 +2021,15 @@ def _get_and_verify_max_len(
2021
2022 if rope_type == "yarn":
2023 derived_max_model_len = rp["original_max_position_embeddings"]
2024 + if scaling_factor is None:
2025 + # Fallback the factor to 1.0 if a user assigned `null`
2026 + logger.warning_once(
2027 + "The model's RoPE configuration has a null scaling "
2028 + "factor which is unexpected. This likely indicates a bug "
2029 + "in the model's HuggingFace config.json. Please notify the "
2030 + "model vendor. Falling back the value to 1.0. "
2031 + )
2032 + scaling_factor = 1.0
2033 # Do this outside loop since all layer types should have the same scaling
2034 derived_max_model_len *= scaling_factor
2035