x-transformers 2.3.11__py3-none-any.whl → 2.3.14__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.
x_transformers/attend.py CHANGED
@@ -165,7 +165,7 @@ class Attend(Module):
165
165
  post_talking_heads = False,
166
166
  pre_scale_post_talking_heads = False,
167
167
  sparse_topk = None,
168
- sparse_topk_straight_through = False,
168
+ sparse_topk_straight_through = False, # https://arxiv.org/abs/2505.22074
169
169
  scale = None,
170
170
  qk_norm = False,
171
171
  l2_distance = False,
@@ -1981,6 +1981,7 @@ class AttentionLayers(Module):
1981
1981
  learned_value_residual_mix = True, # seeing big improvements when the value residual mix value is learned per token - credit goes to @faresobeid for taking the first step with learned scalar mix, then @Blinkdl for taking it a step further with data dependent. here we will use per token learned
1982
1982
  rel_pos_kwargs: dict = dict(),
1983
1983
  residual_fn_kwargs: dict = dict(),
1984
+ verbose = True,
1984
1985
  **kwargs
1985
1986
  ):
1986
1987
  super().__init__()
@@ -2032,7 +2033,7 @@ class AttentionLayers(Module):
2032
2033
 
2033
2034
  assert rotary_emb_dim <= dim_head, f'rotary emb dim {rotary_emb_dim} must be less than or equal to attention head dimension {dim_head}'
2034
2035
 
2035
- if rotary_emb_dim < 32:
2036
+ if verbose and rotary_emb_dim < 32:
2036
2037
  logger.warning('when training language model, rotary embedding dimension should be at least 32')
2037
2038
 
2038
2039
  assert not (rotary_xpos and not causal), 'rotary xpos is not compatible with bidirectional attention'
x_transformers/xval.py CHANGED
@@ -11,7 +11,7 @@ import torch.nn.functional as F
11
11
  from typing import Callable
12
12
  from collections import namedtuple
13
13
 
14
- from einops import rearrange
14
+ from einops import rearrange, repeat, pack, unpack
15
15
  from einops.layers.torch import Rearrange
16
16
 
17
17
  from x_transformers.x_transformers import (
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: x-transformers
3
- Version: 2.3.11
3
+ Version: 2.3.14
4
4
  Summary: X-Transformers
5
5
  Project-URL: Homepage, https://pypi.org/project/x-transformers/
6
6
  Project-URL: Repository, https://github.com/lucidrains/x-transformers
@@ -1,5 +1,5 @@
1
1
  x_transformers/__init__.py,sha256=h3I2ejobgEdy8H7NgV-rP8UaBCnd16-MysvDXH9GMEA,985
2
- x_transformers/attend.py,sha256=-5BWWhFsp7tvZTdN91Ay5SqOjyj9uOs-122vFvoO6b4,17253
2
+ x_transformers/attend.py,sha256=xFsBtl7h7_qebPh7kE81BpmCWAjCgFpB9i_IHu_91es,17288
3
3
  x_transformers/autoregressive_wrapper.py,sha256=reLCno9Z9pchVU79tBF8OMo21LwSZ67KAeB83jqkyAc,10505
4
4
  x_transformers/belief_state_wrapper.py,sha256=YLUMk6t2MhFBEw5lHDDHJHcoCxTIkHvxTNY__GGZEKU,13374
5
5
  x_transformers/continuous.py,sha256=KPKi7TKqHYcDWYVhSkSB9y5iZMnhzVZxHhjJRdL7w5I,9521
@@ -8,10 +8,10 @@ x_transformers/entropy_based_tokenizer.py,sha256=F2lO8-v3aLIcVDVNhu7RR-UtRdlmaaY
8
8
  x_transformers/multi_input.py,sha256=tCh-fTJDj2ib4SMGtsa-AM8MxKzJAQSwqAXOu3HU2mg,9252
9
9
  x_transformers/neo_mlp.py,sha256=XCNnnop9WLarcxap1kGuYc1x8GHvwkZiDRnXOxSl3Po,3452
10
10
  x_transformers/nonautoregressive_wrapper.py,sha256=2NU58hYMgn-4Jzg3mie-mXb0XH_dCN7fjlzd3K1rLUY,10510
11
- x_transformers/x_transformers.py,sha256=Wo5hauzdn4Q9PUVjBqQo-1vCq08BT2jYUDbq3r2a5Go,114061
11
+ x_transformers/x_transformers.py,sha256=ZfOXrZSiy2jlZ8wVmDdMTLW4hAY_qfmPQHW9t2ABxbo,114097
12
12
  x_transformers/xl_autoregressive_wrapper.py,sha256=CvZMJ6A6PA-Y_bQAhnORwjJBSl6Vjq2IdW5KTdk8NI8,4195
13
- x_transformers/xval.py,sha256=7S00kCuab4tWQa-vf-z-XfzADjVj48MoFIr7VSIvttg,8575
14
- x_transformers-2.3.11.dist-info/METADATA,sha256=cDJW4GNyTXb0gKUm-Z_T8Bk1Jrk8HJU35v6tldG2IJo,89022
15
- x_transformers-2.3.11.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
16
- x_transformers-2.3.11.dist-info/licenses/LICENSE,sha256=As9u198X-U-vph5noInuUfqsAG2zX_oXPHDmdjwlPPY,1066
17
- x_transformers-2.3.11.dist-info/RECORD,,
13
+ x_transformers/xval.py,sha256=AwwYUm8yDAtKQyKJDIhYMsiLTJ_skh3scUFMjp5sda8,8597
14
+ x_transformers-2.3.14.dist-info/METADATA,sha256=Tnvnrfnr-eIlUVEH3IePLykynVikAq-t01v4pSh3yPQ,89022
15
+ x_transformers-2.3.14.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
16
+ x_transformers-2.3.14.dist-info/licenses/LICENSE,sha256=As9u198X-U-vph5noInuUfqsAG2zX_oXPHDmdjwlPPY,1066
17
+ x_transformers-2.3.14.dist-info/RECORD,,