← all repositories

test-time-training/ttt-lm-pytorch

PyTorch implementation of Test-Time Training (TTT) layers, a new class of sequence modeling layers that use self-supervised learning to update their hidden states at test time.

1.4k stars Python Language ModelsML Frameworks
ttt-lm-pytorch
Velocity · 7d
+1.9
★ / day
Trend
steady
star history

The repository implements TTT-Linear and TTT-MLP layers that replace traditional RNN hidden states with machine learning models themselves. The hidden state is updated through self-supervised learning steps during both training and inference, achieving linear complexity with expressive hidden states for long-context sequence modeling. The implementation is based on Huggingface Transformers for easy model loading and text generation.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.