"vscode:/vscode.git/clone" did not exist on "91ccb1cc83301d42f117d576ad2a0322461841f3"
Unverified Commit 46b4a027 authored by will b.'s avatar will b. Committed by GitHub
Browse files

Fix DeepSeek V2 RoPE initialization error (#33501)


Signed-off-by: default avatarEduardo Salinas <edus@microsoft.com>
Signed-off-by: default avatarcatswe <212922539+catswe@users.noreply.github.com>
Co-authored-by: default avatarEduardo Salinas <edus@microsoft.com>
parent 8869cd8e
......@@ -75,7 +75,6 @@ class DeepseekScalingRotaryEmbedding(RotaryEmbeddingBase):
self.rotary_dim,
2,
dtype=torch.float,
device=current_platform.device_type,
)
/ self.rotary_dim
)
......@@ -104,7 +103,6 @@ class DeepseekScalingRotaryEmbedding(RotaryEmbeddingBase):
inv_freq = self._compute_inv_freq(self.scaling_factor)
t = torch.arange(
self.max_position_embeddings * self.scaling_factor,
device=current_platform.device_type,
dtype=torch.float32,
)
freqs = torch.einsum("i,j -> ij", t, inv_freq)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment