titans-pytorch 0.2.22__tar.gz → 0.2.24__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.
- {titans_pytorch-0.2.22 → titans_pytorch-0.2.24}/PKG-INFO +1 -1
- {titans_pytorch-0.2.22 → titans_pytorch-0.2.24}/pyproject.toml +1 -1
- {titans_pytorch-0.2.22 → titans_pytorch-0.2.24}/titans_pytorch/neural_memory.py +2 -1
- {titans_pytorch-0.2.22 → titans_pytorch-0.2.24}/.github/workflows/python-publish.yml +0 -0
- {titans_pytorch-0.2.22 → titans_pytorch-0.2.24}/.github/workflows/test.yaml +0 -0
- {titans_pytorch-0.2.22 → titans_pytorch-0.2.24}/.gitignore +0 -0
- {titans_pytorch-0.2.22 → titans_pytorch-0.2.24}/LICENSE +0 -0
- {titans_pytorch-0.2.22 → titans_pytorch-0.2.24}/README.md +0 -0
- {titans_pytorch-0.2.22 → titans_pytorch-0.2.24}/data/README.md +0 -0
- {titans_pytorch-0.2.22 → titans_pytorch-0.2.24}/data/enwik8.gz +0 -0
- {titans_pytorch-0.2.22 → titans_pytorch-0.2.24}/fig1.png +0 -0
- {titans_pytorch-0.2.22 → titans_pytorch-0.2.24}/fig2.png +0 -0
- {titans_pytorch-0.2.22 → titans_pytorch-0.2.24}/tests/test_titans.py +0 -0
- {titans_pytorch-0.2.22 → titans_pytorch-0.2.24}/titans_pytorch/__init__.py +0 -0
- {titans_pytorch-0.2.22 → titans_pytorch-0.2.24}/titans_pytorch/associative_scan.py +0 -0
- {titans_pytorch-0.2.22 → titans_pytorch-0.2.24}/titans_pytorch/mac_transformer.py +0 -0
- {titans_pytorch-0.2.22 → titans_pytorch-0.2.24}/titans_pytorch/memory_models.py +0 -0
- {titans_pytorch-0.2.22 → titans_pytorch-0.2.24}/train_mac.py +0 -0
@@ -871,7 +871,8 @@ class NeuralMemory(Module):
|
|
871
871
|
last_update, _ = past_state
|
872
872
|
|
873
873
|
if exists(gate):
|
874
|
-
|
874
|
+
curr_weights = next_neural_mem_state.updates.apply(lambda t: t[:, 0])
|
875
|
+
weights = TensorDict({param_name: v1.lerp(v2, gate) for (param_name, v1), (_, v2) in zip(curr_weights.items(), last_update.items())})
|
875
876
|
else:
|
876
877
|
weights = last_update
|
877
878
|
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|