TinyLlama: An Open-Source Small Language Model
Official code: jzhang38/TinyLlama (8,997 stars, Python, Apache-2.0, last commit 2024-05-03). Most starred: Lightning-AI/litgpt, a community implementation (13,768 stars, Python, Apache-2.0, last commit 2026-04-25, 1.5× the official stars). 1 more implementation below.
Abstract
We present TinyLlama, a compact 1.1B language model pretrained on around 1 trillion tokens for approximately 3 epochs. Building on the architecture and tokenizer of Llama 2, TinyLlama leverages various advances contributed by the open-source community (e.g., FlashAttention and Lit-GPT), achieving better computational efficiency.
Show full abstractHide
Despite its relatively small size, TinyLlama demonstrates remarkable performance in a series of downstream tasks. It significantly outperforms existing open-source language models with comparable sizes. Our model checkpoints and code are publicly available on GitHub at https://github.com/jzhang38/TinyLlama.