nathanrchn
commited on
Commit
•
15f8807
1
Parent(s):
0f0156b
Update modeling_phi.py
Browse files- modeling_phi.py +6 -1
modeling_phi.py
CHANGED
@@ -756,8 +756,13 @@ class ParallelBlock(nn.Module):
|
|
756 |
self.resid_dropout = nn.Dropout(config.resid_pdrop)
|
757 |
self.block_idx = block_idx
|
758 |
|
|
|
|
|
|
|
|
|
|
|
759 |
self.mixer = MHA(config, layer_idx=block_idx)
|
760 |
-
self.mlp = MLP(config)
|
761 |
|
762 |
def forward(
|
763 |
self,
|
|
|
756 |
self.resid_dropout = nn.Dropout(config.resid_pdrop)
|
757 |
self.block_idx = block_idx
|
758 |
|
759 |
+
if block_idx % 2 == 0:
|
760 |
+
n_inner = 4 * config.n_embd
|
761 |
+
else:
|
762 |
+
n_inner = 1024
|
763 |
+
|
764 |
self.mixer = MHA(config, layer_idx=block_idx)
|
765 |
+
self.mlp = MLP(config, n_inner)
|
766 |
|
767 |
def forward(
|
768 |
self,
|