broccoli-ml 0.26.0__tar.gz → 0.27.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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: broccoli-ml
3
- Version: 0.26.0
3
+ Version: 0.27.0
4
4
  Summary: Some useful Pytorch models, circa 2025
5
5
  License: MIT
6
6
  Author: Nicholas Bailey
@@ -371,9 +371,11 @@ class TransformerBlock(nn.Module):
371
371
  process_x = process_x + self.attn(process_x, process_x, process_x)
372
372
  norm_process_x = self.layer_norm_1(process_x)
373
373
  process_x = process_x + self.ff(process_x)
374
- x = self.layer_norm_2(
375
- torch.cat([identity_x, process_x])[unshuffle_indices, :, :].contiguous()
376
- )
374
+
375
+ # Always post norm as eventually we reach the classification head!
376
+ x = self.layer_norm_2(
377
+ torch.cat([identity_x, process_x])[unshuffle_indices, :, :].contiguous()
378
+ )
377
379
 
378
380
  return x
379
381
 
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "broccoli-ml"
3
- version = "0.26.0"
3
+ version = "0.27.0"
4
4
  description = "Some useful Pytorch models, circa 2025"
5
5
  authors = [
6
6
  {name = "Nicholas Bailey"}
File without changes
File without changes