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 1, 22:30 UTC
fix: keep DeepSeek V4 RoPE cache on inv_freq device (#43926)
Signed-off-by: Schwinn Saereesitthipitak <schwinns@nvidia.com> Signed-off-by: Schwinn Saereesitthipitak <17022745+galletas1712@users.noreply.github.com>
Schwinn Saereesitthipitak committed
Jun 4, 2026 at 15:30 UTC
b7c5baf63d5f95d18493a7fae3c75fc4853732a7
1 file changed
+1
-1
vllm/model_executor/layers/rotary_embedding/deepseek_scaling_rope.py
+1
-1
@@ -251,7 +251,7 @@ class DeepseekV4ScalingRotaryEmbedding(DeepseekScalingRotaryEmbedding):
251
inv_freq = self._compute_inv_freq(self.scaling_factor)
252
t = torch.arange(
253
self.max_position_embeddings * self.scaling_factor,
254
- device=current_platform.device_type,
254
+ device=inv_freq.device,
255
dtype=torch.float32,
256
)
257
freqs = torch.einsum("i,j -> ij", t, inv_freq)