
olivkoch/nano-trm
📦 Open Source Projectolivkoch
A lightweight, educational implementation of Tiny Recursive Models (TRM) for efficient sequence processing.
nano-trm is an open-source project designed to demystify the architecture of Tiny Recursive Models. Unlike standard transformers that rely on massive context windows and quadratic attention scaling, TRMs leverage recursive mechanisms to process sequences with greater parameter efficiency. This implementation provides a modular framework written in Python, making it easy to integrate into existing research pipelines or educational workflows. The codebase focuses on transparency, allowing users to inspect the recursive state transitions and weight matrices directly. Key features include a lightweight dependency footprint, clear documentation of the recursive logic, and a structure optimized for rapid experimentation with sequence modeling. Whether you are looking to optimize inference speed or investigate novel recurrent-transformer hybrids, nano-trm offers a solid foundation for building and testing these specialized architectures.
💡Highlights
- ├─Minimalist recursive architecture
- ├─Efficient sequence processing
- └─Lightweight Python implementation
🎯For
- ├─AI Researchers
- └─Machine Learning Engineers