Ne30Charm commited on
Commit
830c033
·
verified ·
1 Parent(s): 4121e42

Upload model.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. model.py +1 -1
model.py CHANGED
@@ -21,7 +21,7 @@ class RMSNorm(nn.Module):
21
 
22
  def rope(x, pos):
23
  d = x.shape[-1]
24
- freq = 10000 ** (torch.arange(0, d, 2, device=x.device) / d)
25
  angle = pos[:, None, :, None].float() * freq
26
  a, b = x.float()[..., ::2], x.float()[..., 1::2]
27
  c, s = angle.cos(), angle.sin()
 
21
 
22
  def rope(x, pos):
23
  d = x.shape[-1]
24
+ freq = 10000 ** (-torch.arange(0, d, 2, device=x.device) / d)
25
  angle = pos[:, None, :, None].float() * freq
26
  a, b = x.float()[..., ::2], x.float()[..., 1::2]
27
  c, s = angle.cos(), angle.sin()