titans-pytorch 0.1.1__py3-none-any.whl → 0.1.2__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.
- titans_pytorch/mac_transformer.py +5 -2
- {titans_pytorch-0.1.1.dist-info → titans_pytorch-0.1.2.dist-info}/METADATA +1 -1
- titans_pytorch-0.1.2.dist-info/RECORD +8 -0
- titans_pytorch-0.1.1.dist-info/RECORD +0 -8
- {titans_pytorch-0.1.1.dist-info → titans_pytorch-0.1.2.dist-info}/WHEEL +0 -0
- {titans_pytorch-0.1.1.dist-info → titans_pytorch-0.1.2.dist-info}/licenses/LICENSE +0 -0
|
@@ -528,7 +528,8 @@ class MemoryAsContextTransformer(Module):
|
|
|
528
528
|
filter_fn: Callable = min_p_filter,
|
|
529
529
|
filter_kwargs: dict = dict(
|
|
530
530
|
min_p = 0.1,
|
|
531
|
-
)
|
|
531
|
+
),
|
|
532
|
+
show_progress = True
|
|
532
533
|
):
|
|
533
534
|
was_training = self.training
|
|
534
535
|
self.eval()
|
|
@@ -536,7 +537,9 @@ class MemoryAsContextTransformer(Module):
|
|
|
536
537
|
prompt_seq_len, out = prompt.shape[-1], prompt.clone()
|
|
537
538
|
sample_num_times = max(0, seq_len - prompt_seq_len)
|
|
538
539
|
|
|
539
|
-
|
|
540
|
+
iter_wrap = tqdm.tqdm if show_progress else identity
|
|
541
|
+
|
|
542
|
+
for _ in iter_wrap(range(sample_num_times)):
|
|
540
543
|
logits = self.forward(out, disable_flex_attn = True)
|
|
541
544
|
logits = logits[:, -1]
|
|
542
545
|
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
titans_pytorch/__init__.py,sha256=I-4oF1JPEmUvhLszEocM5cDgHYNFcNp0Q9nbDYSPFqU,195
|
|
2
|
+
titans_pytorch/associative_scan.py,sha256=Y-iYqmFuG-NoCKu6kgql1mhowXTeJfyawi3eUIXamp0,2650
|
|
3
|
+
titans_pytorch/mac_transformer.py,sha256=YowJzQC2p3fWgzFCe9jXrw1b3wWPKN-dcLs5sX-3r8Y,19123
|
|
4
|
+
titans_pytorch/titans.py,sha256=cGWJHkOYmIeE6X383mZvyjusECBwbplVvK0cfgfhBxg,18634
|
|
5
|
+
titans_pytorch-0.1.2.dist-info/METADATA,sha256=FWq5JIp1WY9dYpzatfGzfkcAGQFk-mEPwxF0wCrbM5w,4684
|
|
6
|
+
titans_pytorch-0.1.2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
7
|
+
titans_pytorch-0.1.2.dist-info/licenses/LICENSE,sha256=1yCiA9b5nhslTavxPjsQAO-wpOnwJR9-l8LTVi7GJuk,1066
|
|
8
|
+
titans_pytorch-0.1.2.dist-info/RECORD,,
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
titans_pytorch/__init__.py,sha256=I-4oF1JPEmUvhLszEocM5cDgHYNFcNp0Q9nbDYSPFqU,195
|
|
2
|
-
titans_pytorch/associative_scan.py,sha256=Y-iYqmFuG-NoCKu6kgql1mhowXTeJfyawi3eUIXamp0,2650
|
|
3
|
-
titans_pytorch/mac_transformer.py,sha256=f_m559p9PLW1yxW6tQfrD43v0eMpeTUxpYdtb32UFgg,19031
|
|
4
|
-
titans_pytorch/titans.py,sha256=cGWJHkOYmIeE6X383mZvyjusECBwbplVvK0cfgfhBxg,18634
|
|
5
|
-
titans_pytorch-0.1.1.dist-info/METADATA,sha256=fxIRTFPGxq9RZMK4yRaAnoG3ym7dfOdaYiatBwmkS6Q,4684
|
|
6
|
-
titans_pytorch-0.1.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
7
|
-
titans_pytorch-0.1.1.dist-info/licenses/LICENSE,sha256=1yCiA9b5nhslTavxPjsQAO-wpOnwJR9-l8LTVi7GJuk,1066
|
|
8
|
-
titans_pytorch-0.1.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|