Llamba: Scaling Distilled Recurrent Models for Efficient Language Processing
Authors:
Preprint
Abstract
We introduce Llamba, a family of efficient recurrent language models distilled from Llama-3.x into the Mamba architecture. The series includes Llamba-1B, Llamba-3B, and Llamba-8B, which achieve higher inference throughput and handle significantly larger batch sizes than Transformer-based models while maintaining comparable benchmark performance. Furthermore, Llamba demonstrates the effectiveness of cross-architecture distillation using MOHAWK (Bick et al., 2024), achieving these results with less than 0.1% of the training data typically used for models of similar size. To take full advantage of their efficiency, we provide an optimized implementation of Llamba for resource-constrained devices such as smartphones and edge platforms, offering a practical and memory-efficient alternative to Transformers. Overall, Llamba improves the tradeoff between speed, memory efficiency, and performance, making high-quality language models more accessible.Keywords
All Related Versions
This publication has 6 references indexed in Scilit:
- The FineWeb Datasets: Decanting the Web for the Finest Text Data at Scale2024
- Transformers to SSMs: Distilling Quadratic Knowledge to Subquadratic Models2024
- The Mamba in the Llama: Distilling and Accelerating Hybrid Models2024
- GQA: Training Generalized Multi-Query Transformer Models from Multi-Head Checkpoints2023
- HellaSwag: Can a Machine Really Finish Your Sentence?2019
- Can a Suit of Armor Conduct Electricity? A New Dataset for Open Book Question Answering2018