HemanthSai7 commited on
Commit
feaca64
·
verified ·
1 Parent(s): 04e5e05

Update modeling_nandi.py

Browse files
Files changed (1) hide show
  1. modeling_nandi.py +2 -2
modeling_nandi.py CHANGED
@@ -109,8 +109,8 @@ class NandiRotaryEmbedding(nn.Module):
109
 
110
  def rotate_half(x):
111
  """Rotates half the hidden dims of the input."""
112
- x1 = x[transformers., : x.shape[-1] // 2]
113
- x2 = x[transformers., x.shape[-1] // 2 :]
114
  return torch.cat((-x2, x1), dim=-1)
115
 
116
 
 
109
 
110
  def rotate_half(x):
111
  """Rotates half the hidden dims of the input."""
112
+ x1 = x[..., : x.shape[-1] // 2]
113
+ x2 = x[..., x.shape[-1] // 2 :]
114
  return torch.cat((-x2, x1), dim=-1)
115
 
116