broccoli-ml 9.3.0__py3-none-any.whl → 9.4.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/linear.py CHANGED
@@ -226,10 +226,11 @@ class RecyclingLinear(nn.Module):
226
226
  idx_tensor = indices
227
227
 
228
228
  if idx_tensor.size(0):
229
- random_weights = self._random_weights(
230
- self.linear.weight.size(0), indices.size(0)
229
+ zeros = torch.zeros(
230
+ (self.linear.weight.size(0), indices.size(0)),
231
+ device=self.linear.weight.device,
231
232
  )
232
- self._update_weights(indices, 1, random_weights, self.optimisers) # dim
233
+ self._update_weights(indices, 1, zeros, self.optimisers) # dim
233
234
  else:
234
235
  return
235
236
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: broccoli-ml
3
- Version: 9.3.0
3
+ Version: 9.4.0
4
4
  Summary: Some useful Pytorch models, circa 2025
5
5
  License: MIT
6
6
  Author: Nicholas Bailey
@@ -1,13 +1,13 @@
1
1
  broccoli/__init__.py,sha256=tmyspsVxqPZHRQCY_NRwpW4SMNBbtE8E_8z7l-SAzSo,127
2
2
  broccoli/activation.py,sha256=-Jf30C6iGqWCorC9HEGn2oduWwjeaCAxGLUUYIy1zX8,3438
3
3
  broccoli/cnn.py,sha256=WjoPDSpe3ttwxCBNfCVRdaCHvbeZ7G-a5_i8fUsK_d8,4889
4
- broccoli/linear.py,sha256=Fn3eqgv1X2M5iXZmtP6jBzfUYuWMkiLlgkBDryv6Ho8,11999
4
+ broccoli/linear.py,sha256=FMjr0S_jRvizb8v56GEDuFB1Z6NCIM_XIdYpOx0gdXE,12025
5
5
  broccoli/rope.py,sha256=GRqApBNmYCFaDak0WL1xE_BC5CTTYKQU_PBdeTcQcjc,12557
6
6
  broccoli/tensor.py,sha256=um8mrxkYbvNDo-QvHlmJm8Aw6qcngOlUZPoAk_PMReA,4480
7
7
  broccoli/transformer.py,sha256=ULk-QQX3hAI14-aCKhp9QSebzX4KUjlisEGup2Eycck,25565
8
8
  broccoli/utils.py,sha256=oOWzn6dJ5nC_9r4zq0emmfmaYACJXJNFS48AOpW2jqc,358
9
9
  broccoli/vit.py,sha256=sC6K3FK3a8ojOgvNWSWhuZHBtnFrrTQbsDdlagcKJH4,22224
10
- broccoli_ml-9.3.0.dist-info/LICENSE,sha256=0BAzJE5BqQ7Iixp_AFdB2W1uO-HCRX-Qfun8PHt6yVM,1073
11
- broccoli_ml-9.3.0.dist-info/METADATA,sha256=avjuGvDLh6q6v-7E3dCq0jCNC17-vag52vweC2W26QU,1368
12
- broccoli_ml-9.3.0.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
13
- broccoli_ml-9.3.0.dist-info/RECORD,,
10
+ broccoli_ml-9.4.0.dist-info/LICENSE,sha256=0BAzJE5BqQ7Iixp_AFdB2W1uO-HCRX-Qfun8PHt6yVM,1073
11
+ broccoli_ml-9.4.0.dist-info/METADATA,sha256=O884Z9om89Y65CjfZFQE7KJwI4Tiy1DmzM-3Dk1Rcv8,1368
12
+ broccoli_ml-9.4.0.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
13
+ broccoli_ml-9.4.0.dist-info/RECORD,,