jaxonlayers 0.2.1__py3-none-any.whl → 0.2.3__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.
@@ -0,0 +1,8 @@
1
+ import jax
2
+ import jax.numpy as jnp
3
+ from jaxtyping import Array
4
+
5
+
6
+ def swiglu(x: Array, axis=-1):
7
+ a, b = jnp.split(x, 2, axis=axis)
8
+ return a * jax.nn.swish(b)
@@ -56,7 +56,7 @@ class BatchedLinear(eqx.Module):
56
56
  self.use_bias = use_bias
57
57
 
58
58
  def __call__(
59
- self, x: Float[Array, "*batch in_features"]
59
+ self, x: Float[Array, "*batch in_features"], key=None
60
60
  ) -> Float[Array, "*batch out_features"]:
61
61
  input_shape = x.shape
62
62
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: jaxonlayers
3
- Version: 0.2.1
3
+ Version: 0.2.3
4
4
  Summary: Additional layers and functions that extend Equinox
5
5
  Requires-Python: >=3.13
6
6
  Requires-Dist: beartype>=0.21.0
@@ -1,5 +1,6 @@
1
1
  jaxonlayers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
2
  jaxonlayers/functions/__init__.py,sha256=lxMNSnEn2pJ1XLLyQTTFXiCcJTdrzfE1RlorqD9lEog,711
3
+ jaxonlayers/functions/activation.py,sha256=cjwDEadbJECt1AE1uEtKV_p_wBK_pJ7Bdud0ebm_GNQ,165
3
4
  jaxonlayers/functions/attention.py,sha256=AyaAeA2yo5Cgljk2rU6JlVttQeG0FMBLE-f7285PdM0,12945
4
5
  jaxonlayers/functions/embedding.py,sha256=GsXxpB3G72aLY1SHdZk7gxKbNftlEZ3HRDy-7_5z4HM,610
5
6
  jaxonlayers/functions/initialization.py,sha256=h7uzdPl-rL7faT9hbRs5aN6EeaX0r70y88ad1cwZvmY,1161
@@ -14,9 +15,9 @@ jaxonlayers/layers/attention.py,sha256=RgtpzBPxJ4tDcUjiq_Wh_7GJndmBY6UKtbEuHGLA1
14
15
  jaxonlayers/layers/convolution.py,sha256=k0dMFBDjzycB7UNuyHqKihJtBa6u93V6OLxyUUyipN4,3247
15
16
  jaxonlayers/layers/normalization.py,sha256=3aGzNzDN05A72ZHLUM2w9WpicLtGsjzj1l0jhuyn63U,8379
16
17
  jaxonlayers/layers/regularization.py,sha256=ZrvtBJPH84xuxrxEbZc7TBxjp8OvKEv4ecan5s8F9zs,563
17
- jaxonlayers/layers/sequential.py,sha256=Tw98hNZiXMC-CYZD6h_pi7eAxkgHeQAUvZF2I9H0d8Y,2833
18
+ jaxonlayers/layers/sequential.py,sha256=xBZavhSra0oZUZjSlThzIGER5xR62n46mgTkPqRV2Y0,2843
18
19
  jaxonlayers/layers/state_space.py,sha256=oDVRbduNtU48Q4rLd-XywZcqVN0QYTlq1UUhOXcGLoo,2537
19
20
  jaxonlayers/layers/transformer.py,sha256=Syuh_kN-I-Gg-C20trQcNio1WEG88OHDRl3ShFaQNqQ,21848
20
- jaxonlayers-0.2.1.dist-info/METADATA,sha256=rHoA2ZdpFRfOv-aHd4qkzY5a-nEDTiTHf5WplX3Mz_o,565
21
- jaxonlayers-0.2.1.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
22
- jaxonlayers-0.2.1.dist-info/RECORD,,
21
+ jaxonlayers-0.2.3.dist-info/METADATA,sha256=-Pde3UQPCm39v_dIWtAZ4FjKE8CRgl8WbVbsM5-qbAM,565
22
+ jaxonlayers-0.2.3.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
23
+ jaxonlayers-0.2.3.dist-info/RECORD,,