mirror of
https://git.datalinker.icu/vllm-project/vllm.git
synced 2025-12-15 18:16:46 +08:00
[Bugfix] Fix MRoPE dispatch on CPU (#24712)
Signed-off-by: jiang1.li <jiang1.li@intel.com>
This commit is contained in:
parent
ddcec289c7
commit
7920de0a2a
@ -300,6 +300,15 @@ class MRotaryEmbedding(RotaryEmbedding):
|
|||||||
key = torch.cat((key_rot, key_pass), dim=-1).reshape(key_shape)
|
key = torch.cat((key_rot, key_pass), dim=-1).reshape(key_shape)
|
||||||
return query, key
|
return query, key
|
||||||
|
|
||||||
|
def forward_cpu(
|
||||||
|
self,
|
||||||
|
positions: torch.Tensor,
|
||||||
|
query: torch.Tensor,
|
||||||
|
key: Optional[torch.Tensor] = None,
|
||||||
|
offsets: Optional[torch.Tensor] = None,
|
||||||
|
) -> tuple[torch.Tensor, Optional[torch.Tensor]]:
|
||||||
|
return self.forward_native(positions, query, key, offsets)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def get_input_positions(
|
def get_input_positions(
|
||||||
cls,
|
cls,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user