Model reference · open weights
TinyLlama is an open-weight language model from TinyLlama. TinyLlama_v1.1 (BF16) weighs 4.4 GB; the smallest configuration that runs it is RTX 3060 12 GB.
Summary of the TinyLlama/TinyLlama-1.1B-Chat-v1.0 model card, 2026-10-01. The estimate below is for another build of the family.
What it is
| Released by | TinyLlama |
|---|---|
| Released | 2023-12-30 |
| Parameters | 1.1B |
| VRAM | 4.4 GB for the weights |
What it runs on
| Card | Requests at once | Context max | Memory |
|---|---|---|---|
| 2K each | |||
| RTX 3060 12 GB | 144 | all 2K | 11.6 GB |
| RTX 4060 Ti 16 GB | 226 | all 2K | 15.4 GB |
| RTX 3090 24 GB | 400 | all 2K | 23.4 GB |
| RTX 4090 24 GB | 399 | all 2K | 23.4 GB |
| RTX 5090 32 GB | 565 | all 2K | 31.0 GB |
| L40S 48 GB | 845 | all 2K | 44.0 GB |
| A100 80 GB | 1000+ | all 2K | 78.2 GB |
| H100 80 GB | 1000+ | all 2K | 78.1 GB |
| RTX PRO 6000 Blackwell 96 GB | 1000+ | all 2K | 93.8 GB |
| DGX Spark (GB10) 128 GB unified | 1000+ | all 2K | 107 GB |
| H200 141 GB | 1000+ | all 2K | 138 GB |
| B200 180 GB | 1000+ | all 2K | 176 GB |
| Requests at once | 2K tokens each |
|---|---|
| 1 | 5.0 GB |
| 5 | 5.2 GB |
| 8 | 5.3 GB |
| 16 | 5.7 GB |
| 32 | 6.4 GB |
| 64 | 7.9 GB |
One card, with vLLM's small-card settings.
Builds
| Build | Params | Precision | Weights | Smallest setup |
|---|---|---|---|---|
| TinyLlama-1.1B-Chat-v1.0 ↗ | 1.1B | BF16 | 2.2 GB | RTX 3060 12 GB |
| TinyLlama_v1.1 (above) ↗ | — | BF16 | 4.4 GB | RTX 3060 12 GB |
From the model card
https://github.com/jzhang38/TinyLlama
The TinyLlama project aims to pretrain a 1.1B Llama model on 3 trillion tokens. With some proper optimization, we can achieve this within a span of "just" 90 days using 16 A100-40G GPUs 🚀🚀. The training has started on 2023-09-01.
We adopted exactly the same architecture and tokenizer as Llama 2. This means TinyLlama can be plugged and played in many open-source projects built upon Llama. Besides, TinyLlama is compact with only 1.1B parameters. This compactness allows it to cater to a multitude of applications demanding a restricted computation and memory footprint.
This is the chat model finetuned on top of TinyLlama/TinyLlama-1.1B-intermediate-step-1431k-3T. We follow HF's Zephyr's training recipe. The model was " initially fine-tuned on a variant of the UltraChat dataset, which contains a diverse range of synthetic dialogues generated by ChatGPT.
We then further aligned the model with 🤗 TRL's DPOTrainer on the openbmb/UltraFeedback dataset, which contain 64k prompts and model completions that are ranked by GPT-4."
You will need the transformers>=4.34 Do check the TinyLlama github page for more information.
# Install transformers from source - only needed for versions <= v4.34
# pip install git+https://github.com/huggingface/transformers.git
# pip install accelerate
import torch
from transformers import pipeline
pipe = pipeline("text-generation", model="TinyLlama/TinyLlama-1.1B-Chat-v1.0", torch_dtype=torch.bfloat16, device_map="auto")
# We use the tokenizer's chat template to format each message - see https://huggingface.co/docs/transformers/main/en/chat_templating
messages = [
{
"role": "system",
"content": "You are a friendly chatbot who always responds in the style of a pirate",
},
{"role": "user", "content": "How many helicopters can a human eat in one sitting?"},
]
prompt = pipe.tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
outputs = pipe(prompt, max_new_tokens=256, do_sample=True, temperature=0.7, top_k=50, top_p=0.95)
print(outputs[0]["generated_text"])
#
# You are a friendly chatbot who always responds in the style of a pirate.
#
# How many helicopters can a human eat in one sitting?
#
# ...
Quoted from the model card on Hugging Face. The full card is behind the Hugging Face link above.