Use apply_rope_with_cos_sin_cache_inplace for DeepSeek (#4764)

Co-authored-by: Zhang Kaihong <zhangkaihong.zkh@alibaba-inc.com>
This commit is contained in:
strgrb
2025-03-27 01:45:37 -07:00
committed by GitHub
co-authored by Zhang Kaihong
parent 8bf6d7f406
commit 886fcbdd09
+1 -1
View File
@@ -645,7 +645,7 @@ class DeepseekScalingRotaryEmbedding(RotaryEmbedding):
cache = torch.cat((cos, sin), dim=-1)
return cache
def forward(
def forward_native(
self,
positions: torch.Tensor,
query: torch.Tensor,