broccoli-ml 0.29.1__py3-none-any.whl → 0.30.0__py3-none-any.whl

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/transformer.py CHANGED
@@ -249,8 +249,10 @@ class FeedforwardBlock(nn.Module):
249
249
 
250
250
  if raw_input:
251
251
  self.memory_type = SpectralNormLinear
252
+ self.memory_bias = False
252
253
  else:
253
254
  self.memory_type = nn.Linear
255
+ self.memory_bias = True
254
256
 
255
257
  self.dropout = nn.Dropout(dropout)
256
258
 
@@ -266,7 +268,9 @@ class FeedforwardBlock(nn.Module):
266
268
  linear_module(input_features, self.max_features),
267
269
  self.activation,
268
270
  nn.LayerNorm(ratio * output_features) if normformer else nn.Identity(),
269
- self.memory_type(ratio * output_features, output_features),
271
+ self.memory_type(
272
+ ratio * output_features, output_features, bias=self.memory_bias
273
+ ),
270
274
  self.dropout,
271
275
  ]
272
276
  )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: broccoli-ml
3
- Version: 0.29.1
3
+ Version: 0.30.0
4
4
  Summary: Some useful Pytorch models, circa 2025
5
5
  License: MIT
6
6
  Author: Nicholas Bailey
@@ -8,10 +8,10 @@ broccoli/eigenpatches.py,sha256=J6n2usN1oQuHEHYiBNyYpn_a9eQcHjOBiIlvSei520Y,2413
8
8
  broccoli/linear.py,sha256=8Y9vD85ZEgNZsIQgO3uRQ3lOQR-JjwvabY8liCrfNCk,4831
9
9
  broccoli/rope.py,sha256=hw7kBPNR9GQXj4GxyIAffsGKPfcTPOFh8Bc7oEHtaZY,12108
10
10
  broccoli/tensor.py,sha256=zhSOo9W24FEgN7U35wy3ZIJHnw3u4cepJO5heCw6vwU,4590
11
- broccoli/transformer.py,sha256=jQGpj_e5WAEU_zEPjCU0OyD_08O3HwsMBg3pbrCzp4E,16924
11
+ broccoli/transformer.py,sha256=TILun51zZCcJH-08ReXy98q9Da28P6bc96FAyyLMBck,17058
12
12
  broccoli/utils.py,sha256=htq_hOsdhUhL0nJi9WkKiEYOjEoWqFpK5X49PtgTf-0,299
13
13
  broccoli/vit.py,sha256=m4Wa8B8L25xSODh91ViVyLmwLOBZayp5S7S9f8pIvZo,16109
14
- broccoli_ml-0.29.1.dist-info/LICENSE,sha256=0BAzJE5BqQ7Iixp_AFdB2W1uO-HCRX-Qfun8PHt6yVM,1073
15
- broccoli_ml-0.29.1.dist-info/METADATA,sha256=AojdLjmBwqW9of7D6RSjCdWbDRJO2GM3NbXd1TYeOJY,1257
16
- broccoli_ml-0.29.1.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
17
- broccoli_ml-0.29.1.dist-info/RECORD,,
14
+ broccoli_ml-0.30.0.dist-info/LICENSE,sha256=0BAzJE5BqQ7Iixp_AFdB2W1uO-HCRX-Qfun8PHt6yVM,1073
15
+ broccoli_ml-0.30.0.dist-info/METADATA,sha256=AdNZ7hG0zn5c1n4NcDtTpLqHxcO6iYnglNmYEGtbM8g,1257
16
+ broccoli_ml-0.30.0.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
17
+ broccoli_ml-0.30.0.dist-info/RECORD,,