Paper - Pytorch
Project description
TTL
Pytorch Implementation of the paper: "Learning to (Learn at Test Time): RNNs with Expressive Hidden States"
Install
$ pip install ttl-torch
Usage
import torch
from ttl_torch.ttl_linear import TTLinear
input_dim, output_dim = 10, 10 # Dimensions for the linear model
ttt_layer = TTLinear(input_dim, output_dim)
# Generate some example data
example_data = [
torch.randn(1, input_dim, output_dim) for _ in range(5)
]
# Forward pass through the TTT layer
output_data = ttt_layer(example_data)
for i, output in enumerate(output_data):
print(f"Output at step {i}: {output}")
License
MIT
Citation
@misc{sun2024learninglearntesttime,
title={Learning to (Learn at Test Time): RNNs with Expressive Hidden States},
author={Yu Sun and Xinhao Li and Karan Dalal and Jiarui Xu and Arjun Vikram and Genghan Zhang and Yann Dubois and Xinlei Chen and Xiaolong Wang and Sanmi Koyejo and Tatsunori Hashimoto and Carlos Guestrin},
year={2024},
eprint={2407.04620},
archivePrefix={arXiv},
primaryClass={cs.LG},
url={https://arxiv.org/abs/2407.04620},
}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
ttl_torch-0.0.4.tar.gz
(4.8 kB
view details)
Built Distribution
File details
Details for the file ttl_torch-0.0.4.tar.gz
.
File metadata
- Download URL: ttl_torch-0.0.4.tar.gz
- Upload date:
- Size: 4.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.12.4 Darwin/22.6.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5e81f4187d9514efb4b78289c688988461dd8da793ca01ef3422abc9c12a366b |
|
MD5 | 4b7e4d2199e08a20b7ef2ac700c9ad43 |
|
BLAKE2b-256 | 77bd219c1dfbc0ccacb13b1ea8d873169b3c16db87d2a91478f778895d9f2758 |
File details
Details for the file ttl_torch-0.0.4-py3-none-any.whl
.
File metadata
- Download URL: ttl_torch-0.0.4-py3-none-any.whl
- Upload date:
- Size: 5.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.12.4 Darwin/22.6.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b20a8a18131b9f05ce64a8ddd6ee68e65f1adbde5d0b19b14e3deabfa53c5d10 |
|
MD5 | 45cf530d0c7e4227f6d15c04eae750ad |
|
BLAKE2b-256 | c5418cbc155a1b3f15c7c267c0016647635278dab89d657c62320c2edb1f61e2 |