titans-pytorch 0.2.19__py3-none-any.whl → 0.2.21__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.
@@ -560,7 +560,7 @@ class MemoryAsContextTransformer(Module):
560
560
  chunk_size = self.neural_memory_segment_len,
561
561
  batch_size = neural_memory_batch_size,
562
562
  model = deepcopy(neural_memory_model),
563
- learned_weight_residual = neural_mem_weight_residual and not is_first_neural_mem,
563
+ accept_weight_residual = neural_mem_weight_residual and not is_first_neural_mem,
564
564
  **neural_memory_kwargs
565
565
  )
566
566
 
@@ -587,7 +587,7 @@ class NeuralMemory(Module):
587
587
 
588
588
  prev_weights = prev_weights.apply(lambda t: t[:, start_index:end_index])
589
589
 
590
- if exists(self.to_learned_weight_residual_mix):
590
+ if exists(self.to_learned_weight_residual_mix) and num_chunks > 0:
591
591
  mix = self.to_learned_weight_residual_mix(chunked_seq)
592
592
  mix = rearrange(mix, 'b h n -> (b h) n')
593
593
  prev_weights = prev_weights.apply(lambda t: einx.multiply('bh n, bh n ... -> bh n ...', mix, t))
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: titans-pytorch
3
- Version: 0.2.19
3
+ Version: 0.2.21
4
4
  Summary: Titans
5
5
  Project-URL: Homepage, https://pypi.org/project/titans-pytorch/
6
6
  Project-URL: Repository, https://github.com/lucidrains/titans-pytorch
@@ -204,6 +204,6 @@ $ python train_mac.py
204
204
  eprint = {2501.12352},
205
205
  archivePrefix = {arXiv},
206
206
  primaryClass = {cs.LG},
207
- url = {https://arxiv.org/abs/2501.12352},
207
+ url = {https://arxiv.org/abs/2501.12352},
208
208
  }
209
209
  ```
@@ -0,0 +1,9 @@
1
+ titans_pytorch/__init__.py,sha256=Y3m_ZlpEqYwp-Md1ARhNGJxq8bQp8ty1o039nZOOJo0,276
2
+ titans_pytorch/associative_scan.py,sha256=Y-iYqmFuG-NoCKu6kgql1mhowXTeJfyawi3eUIXamp0,2650
3
+ titans_pytorch/mac_transformer.py,sha256=5rO4GQxSyFWWEc3pc3xNyG0sK5EXE7MmxKI-_kEMl2M,24941
4
+ titans_pytorch/memory_models.py,sha256=Q9SAIyAbStF5Tz0EhvRbn3yAdE3nk3xKc1ndieIe714,4671
5
+ titans_pytorch/neural_memory.py,sha256=mpVODrfNhWComrzfkg1d6OgNgcYXZH-HU6Uykw1foI8,26728
6
+ titans_pytorch-0.2.21.dist-info/METADATA,sha256=QRtuMbSc-WzVNYdY5pxwBKr3aFAqrhgvXW40y-2JZSU,6816
7
+ titans_pytorch-0.2.21.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
8
+ titans_pytorch-0.2.21.dist-info/licenses/LICENSE,sha256=1yCiA9b5nhslTavxPjsQAO-wpOnwJR9-l8LTVi7GJuk,1066
9
+ titans_pytorch-0.2.21.dist-info/RECORD,,
@@ -1,9 +0,0 @@
1
- titans_pytorch/__init__.py,sha256=Y3m_ZlpEqYwp-Md1ARhNGJxq8bQp8ty1o039nZOOJo0,276
2
- titans_pytorch/associative_scan.py,sha256=Y-iYqmFuG-NoCKu6kgql1mhowXTeJfyawi3eUIXamp0,2650
3
- titans_pytorch/mac_transformer.py,sha256=J9MHFViWWehBOFOKx7ry_X2k8nAXaAZFFeCwGtudZyk,24942
4
- titans_pytorch/memory_models.py,sha256=Q9SAIyAbStF5Tz0EhvRbn3yAdE3nk3xKc1ndieIe714,4671
5
- titans_pytorch/neural_memory.py,sha256=e1TENsK0IptpapFRtQux-Uii2MFvisoiQLzTQboHc50,26709
6
- titans_pytorch-0.2.19.dist-info/METADATA,sha256=6frwjwq4CX7VcdCMh8Op9WeDHLRD-oeo8DlTde538UI,6812
7
- titans_pytorch-0.2.19.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
8
- titans_pytorch-0.2.19.dist-info/licenses/LICENSE,sha256=1yCiA9b5nhslTavxPjsQAO-wpOnwJR9-l8LTVi7GJuk,1066
9
- titans_pytorch-0.2.19.dist-info/RECORD,,