mirror of
https://git.datalinker.icu/vllm-project/vllm.git
synced 2026-05-17 21:21:22 +08:00
Fix lint (#3388)
This commit is contained in:
parent
7e9bd08f60
commit
c33afd89f5
@ -143,8 +143,8 @@ class RotaryEmbedding(nn.Module):
|
|||||||
offsets: Optional[torch.Tensor] = None,
|
offsets: Optional[torch.Tensor] = None,
|
||||||
) -> Tuple[torch.Tensor, torch.Tensor]:
|
) -> Tuple[torch.Tensor, torch.Tensor]:
|
||||||
self.cos_sin_cache = self.cos_sin_cache.to(positions.get_device())
|
self.cos_sin_cache = self.cos_sin_cache.to(positions.get_device())
|
||||||
# ops.rotary_embedding()/batched_rotary_embedding() are in-place operations that
|
# ops.rotary_embedding()/batched_rotary_embedding()
|
||||||
# update the query and key tensors.
|
# are in-place operations that update the query and key tensors.
|
||||||
if offsets is not None:
|
if offsets is not None:
|
||||||
ops.batched_rotary_embedding(positions, query, key, self.head_size,
|
ops.batched_rotary_embedding(positions, query, key, self.head_size,
|
||||||
self.cos_sin_cache,
|
self.cos_sin_cache,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user