Skip to main content

Paper - Pytorch

Project description

Multi-Modality

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


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 hashes)

Uploaded Source

Built Distribution

ttl_torch-0.0.4-py3-none-any.whl (5.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page