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

[Bugfix] Fix MRoPE dispatch on CPU (#24712)

Signed-off-by: jiang1.li <jiang1.li@intel.com>

Li, Jiang committed Sep 12, 2025 at 12:56 UTC 7920de0a2af7c663efae29856f1bac061a553b58
1 file changed +9
vllm/model_executor/layers/rotary_embedding/mrope.py
+9
@@ -300,6 +300,15 @@ class MRotaryEmbedding(RotaryEmbedding):
300 key = torch.cat((key_rot, key_pass), dim=-1).reshape(key_shape)
301 return query, key
302
303 + def forward_cpu(
304 + self,
305 + positions: torch.Tensor,
306 + query: torch.Tensor,
307 + key: Optional[torch.Tensor] = None,
308 + offsets: Optional[torch.Tensor] = None,
309 + ) -> tuple[torch.Tensor, Optional[torch.Tensor]]:
310 + return self.forward_native(positions, query, key, offsets)
311 +
312 @classmethod
313 def get_input_positions(
314 cls,