Update modeling_auristream.py
Browse files- modeling_auristream.py +2 -2
modeling_auristream.py
CHANGED
|
@@ -552,8 +552,8 @@ class CausalSelfAttention(nn.Module):
|
|
| 552 |
|
| 553 |
if self.rotary is not None:
|
| 554 |
cos, sin = self.rotary(q)
|
| 555 |
-
q = apply_rotary_emb(q
|
| 556 |
-
k = apply_rotary_emb(k
|
| 557 |
|
| 558 |
# manual implementation of attention
|
| 559 |
att = (q @ k.transpose(-2, -1)) * (1.0 / math.sqrt(k.size(-1)))
|
|
|
|
| 552 |
|
| 553 |
if self.rotary is not None:
|
| 554 |
cos, sin = self.rotary(q)
|
| 555 |
+
q = apply_rotary_emb(q, cos, sin)
|
| 556 |
+
k = apply_rotary_emb(k, cos, sin)
|
| 557 |
|
| 558 |
# manual implementation of attention
|
| 559 |
att = (q @ k.transpose(-2, -1)) * (1.0 / math.sqrt(k.size(-1)))
|