fix: remove unused rotate_half

This commit is contained in:
David Holtz 2024-10-28 16:33:07 +00:00
parent f2a1b1b3fc
commit 831a07f990

View File

@ -49,13 +49,6 @@ def _load_gqa(config, prefix: str, weights):
) )
def rotate_half(x):
"""Rotates half the hidden dims of the input."""
x1 = x[..., : x.shape[-1] // 2]
x2 = x[..., x.shape[-1] // 2 :]
return torch.cat((-x2, x1), dim=-1)
class Qwen2Attention(torch.nn.Module): class Qwen2Attention(torch.nn.Module):
def __init__( def __init__(
self, self,