broccoli-ml 12.2.0__tar.gz → 12.3.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {broccoli_ml-12.2.0 → broccoli_ml-12.3.0}/PKG-INFO +1 -1
- {broccoli_ml-12.2.0 → broccoli_ml-12.3.0}/broccoli/transformer.py +3 -3
- {broccoli_ml-12.2.0 → broccoli_ml-12.3.0}/pyproject.toml +1 -1
- {broccoli_ml-12.2.0 → broccoli_ml-12.3.0}/LICENSE +0 -0
- {broccoli_ml-12.2.0 → broccoli_ml-12.3.0}/README.md +0 -0
- {broccoli_ml-12.2.0 → broccoli_ml-12.3.0}/broccoli/__init__.py +0 -0
- {broccoli_ml-12.2.0 → broccoli_ml-12.3.0}/broccoli/activation.py +0 -0
- {broccoli_ml-12.2.0 → broccoli_ml-12.3.0}/broccoli/cnn.py +0 -0
- {broccoli_ml-12.2.0 → broccoli_ml-12.3.0}/broccoli/linear.py +0 -0
- {broccoli_ml-12.2.0 → broccoli_ml-12.3.0}/broccoli/rope.py +0 -0
- {broccoli_ml-12.2.0 → broccoli_ml-12.3.0}/broccoli/tensor.py +0 -0
- {broccoli_ml-12.2.0 → broccoli_ml-12.3.0}/broccoli/utils.py +0 -0
- {broccoli_ml-12.2.0 → broccoli_ml-12.3.0}/broccoli/vit.py +0 -0
|
@@ -593,12 +593,12 @@ class TransformerBlock(nn.Module):
|
|
|
593
593
|
|
|
594
594
|
def forward(self, x):
|
|
595
595
|
if self.pre_norm:
|
|
596
|
-
x = self.
|
|
596
|
+
x = self.pre_attention_norm(x)
|
|
597
597
|
x = x + self.drop_path(self.attn(x, x, x))
|
|
598
|
-
x = self.
|
|
598
|
+
x = self.pre_mlp_norm(x)
|
|
599
599
|
x = x + self.drop_path(self.ff(x))
|
|
600
600
|
if self.post_norm: # i.e. in addition! Pre and post.
|
|
601
|
-
x = self.
|
|
601
|
+
x = self.post_mlp_norm(x)
|
|
602
602
|
|
|
603
603
|
# if self.pre_norm:
|
|
604
604
|
# process_x = self.pre_attention_norm(x)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|