broccoli-ml 15.4.1__tar.gz → 15.4.2__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-15.4.1 → broccoli_ml-15.4.2}/PKG-INFO +1 -1
- {broccoli_ml-15.4.1 → broccoli_ml-15.4.2}/broccoli/vit.py +2 -7
- {broccoli_ml-15.4.1 → broccoli_ml-15.4.2}/pyproject.toml +1 -1
- {broccoli_ml-15.4.1 → broccoli_ml-15.4.2}/LICENSE +0 -0
- {broccoli_ml-15.4.1 → broccoli_ml-15.4.2}/README.md +0 -0
- {broccoli_ml-15.4.1 → broccoli_ml-15.4.2}/broccoli/__init__.py +0 -0
- {broccoli_ml-15.4.1 → broccoli_ml-15.4.2}/broccoli/activation.py +0 -0
- {broccoli_ml-15.4.1 → broccoli_ml-15.4.2}/broccoli/cnn.py +0 -0
- {broccoli_ml-15.4.1 → broccoli_ml-15.4.2}/broccoli/linear.py +0 -0
- {broccoli_ml-15.4.1 → broccoli_ml-15.4.2}/broccoli/rope.py +0 -0
- {broccoli_ml-15.4.1 → broccoli_ml-15.4.2}/broccoli/tensor.py +0 -0
- {broccoli_ml-15.4.1 → broccoli_ml-15.4.2}/broccoli/transformer.py +0 -0
- {broccoli_ml-15.4.1 → broccoli_ml-15.4.2}/broccoli/utils.py +0 -0
|
@@ -520,13 +520,8 @@ class ViT(nn.Module):
|
|
|
520
520
|
"SwiGLU": SwiGLU,
|
|
521
521
|
}[transformer_activation]
|
|
522
522
|
|
|
523
|
-
|
|
524
|
-
if
|
|
525
|
-
self.alpha = (2 * transformer_layers) ** 0.25
|
|
526
|
-
self.beta = 1.0 # beta is not needed as we norm the Q and K vectors in MSA!
|
|
527
|
-
else:
|
|
528
|
-
self.alpha = 1.0
|
|
529
|
-
self.beta = 1.0 # beta is not needed as we norm the Q and K vectors in MSA!
|
|
523
|
+
self.alpha = (2 * transformer_layers) ** 0.25
|
|
524
|
+
self.beta = 1.0 # beta is not needed if we norm the Q and K vectors in MSA!
|
|
530
525
|
|
|
531
526
|
self.encoder = ViTEncoder(
|
|
532
527
|
input_size=input_size,
|
|
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
|