refactor: use config.rms_norm_eps instead of 1e-05
#3
by
iamwyldecat - opened
- modeling_motif.py +1 -1
modeling_motif.py
CHANGED
|
@@ -362,7 +362,7 @@ class MotifAttention(nn.Module):
|
|
| 362 |
setattr(self, name, nn.Parameter(torch.zeros(self.head_dim, dtype=torch.float32)))
|
| 363 |
getattr(self, name).data.normal_(mean=0.0, std=0.1)
|
| 364 |
|
| 365 |
-
self.subln = MotifRMSNorm(2 * self.head_dim, eps=
|
| 366 |
self.lambda_init = 0.8 - 0.6 * math.exp(-0.3 * (layer_idx - 1))
|
| 367 |
|
| 368 |
self.rotary_emb = MotifRotaryEmbeddingWithCache(self.head_dim,
|
|
|
|
| 362 |
setattr(self, name, nn.Parameter(torch.zeros(self.head_dim, dtype=torch.float32)))
|
| 363 |
getattr(self, name).data.normal_(mean=0.0, std=0.1)
|
| 364 |
|
| 365 |
+
self.subln = MotifRMSNorm(2 * self.head_dim, eps=config.rms_norm_eps)
|
| 366 |
self.lambda_init = 0.8 - 0.6 * math.exp(-0.3 * (layer_idx - 1))
|
| 367 |
|
| 368 |
self.rotary_emb = MotifRotaryEmbeddingWithCache(self.head_dim,
|