@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / a7f341c323
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 7, 21:30 UTC

[Bugfix] Fix MRotaryEmbedding missing `truncate` attr with YaRN scaling (#35080)

Signed-off-by: haosdent <haosdent@gmail.com>

haosdent committed Feb 24, 2026 at 00:05 UTC a7f341c32326fe5463556c69cfa54d90281041c8
1 file changed +2
vllm/model_executor/layers/rotary_embedding/mrope.py
+2
@@ -218,12 +218,14 @@ class MRotaryEmbedding(RotaryEmbeddingBase):
218 attn_factor: float = 1,
219 beta_fast: int = 32,
220 beta_slow: int = 1,
221 + truncate: bool = True,
222 ) -> None:
223 self.scaling_factor = scaling_factor
224 self.extrapolation_factor = extrapolation_factor
225 self.attn_factor = attn_factor
226 self.beta_fast = beta_fast
227 self.beta_slow = beta_slow
228 + self.truncate = truncate
229 if self.scaling_factor is not None:
230 # Get n-d magnitude scaling corrected for interpolation
231 self.mscale = float(yarn_get_mscale(self.scaling_factor) * attn_factor)