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 16:45:37 +08:00
committed by GitHub
parent 8bf6d7f406
commit 886fcbdd09

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,