Model Overview
Model Features
Model Capabilities
Use Cases
🚀 Instella✨: Fully Open Language Models with Stellar Performance
Instella is a family of fully open state-of-the-art 3-billion-parameter language models (LMs) developed by AMD. These models are trained from scratch on AMD Instinct™ MI300X GPUs, outperforming existing fully open models of similar sizes and achieving competitive performance compared to state-of-the-art open-weight models.
🚀 Quick Start
Installation
First, install PyTorch according to the instructions specific to your operating system. For AMD GPUs, you can also start with a rocm/pytorch docker.
To install from source (recommended for training/fine-tuning) run:
git clone https://github.com/AMD-AIG-AIMA/Instella.git
cd Instella
# install Flash-Attention on MI300X
GPU_ARCH=gfx942 MAX_JOBS=$(nproc) pip install git+https://github.com/Dao-AILab/flash-attention.git -v
# install other dependencies
pip install -e .[all]
Example Usage
from transformers import AutoModelForCausalLM, AutoTokenizer
checkpoint = "amd/Instella-3B-Instruct"
tokenizer = AutoTokenizer.from_pretrained(checkpoint, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(checkpoint, device_map="auto", trust_remote_code=True)
prompt = [{"role": "user", "content": "What are the benefits of open-source AI research?"}]
inputs = tokenizer.apply_chat_template(
prompt,
add_generation_prompt=True,
return_tensors='pt'
)
tokens = model.generate(
inputs.to(model.device),
max_new_tokens=1024,
temperature=0.8,
do_sample=True
)
print(tokenizer.decode(tokens[0], skip_special_tokens=False))
Chat in TRL
You can also use the TRL CLI to chat with the model from the terminal:
pip install trl
trl chat --model_name_or_path amd/Instella-3B-Instruct --trust_remote_code --max_new_tokens 1024
# <root>:
# which is bigger 9.8 or 9.11?
# <amd/Instella-3B-Instruct>:
# 9.8 is bigger than 9.11. The difference between the two numbers is 0.69 (9.8 - 9.11 = 0.69), which indicates that 9.8 is 0.69 units larger than 9.11.
✨ Features
- High-performance models: Instella models significantly outperform existing fully open LMs of comparable size and bridge the gap between fully open and open weight models.
- Fully open and accessible: The model weights, training hyperparameters, datasets, and code are fully open-sourced, fostering innovation and collaboration within the AI community.
- Efficient training techniques: Instella employs efficient training techniques such as FlashAttention - 2, Torch Compile, and Fully Sharded Data Parallelism (FSDP) with hybrid sharding to scale model training over a large cluster.
📦 Installation
First, install PyTorch according to the instructions specific to your operating system. For AMD GPUs, you can also start with a rocm/pytorch docker.
To install from source (recommended for training/fine-tuning) run:
git clone https://github.com/AMD-AIG-AIMA/Instella.git
cd Instella
# install Flash-Attention on MI300X
GPU_ARCH=gfx942 MAX_JOBS=$(nproc) pip install git+https://github.com/Dao-AILab/flash-attention.git -v
# install other dependencies
pip install -e .[all]
💻 Usage Examples
Basic Usage
from transformers import AutoModelForCausalLM, AutoTokenizer
checkpoint = "amd/Instella-3B-Instruct"
tokenizer = AutoTokenizer.from_pretrained(checkpoint, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(checkpoint, device_map="auto", trust_remote_code=True)
prompt = [{"role": "user", "content": "What are the benefits of open-source AI research?"}]
inputs = tokenizer.apply_chat_template(
prompt,
add_generation_prompt=True,
return_tensors='pt'
)
tokens = model.generate(
inputs.to(model.device),
max_new_tokens=1024,
temperature=0.8,
do_sample=True
)
print(tokenizer.decode(tokens[0], skip_special_tokens=False))
Advanced Usage
pip install trl
trl chat --model_name_or_path amd/Instella-3B-Instruct --trust_remote_code --max_new_tokens 1024
# <root>:
# which is bigger 9.8 or 9.11?
# <amd/Instella-3B-Instruct>:
# 9.8 is bigger than 9.11. The difference between the two numbers is 0.69 (9.8 - 9.11 = 0.69), which indicates that 9.8 is 0.69 units larger than 9.11.
📚 Documentation
Instella Models
In this release, the following Instella models are introduced:
Model | Stage | Training Data (Tokens) | Description |
---|---|---|---|
Instella-3B-Stage1 | Pre-training (Stage 1) | 4.065 Trillion | First stage pre-training to develop proficiency in natural language. |
Instella-3B | Pre-training (Stage 2) | 57.575 Billion | Second stage pre-training to further enhance problem-solving capabilities. |
Instella-3B-SFT | SFT | 8.902 Billion (x3 epochs) | Supervised Fine-tuning (SFT) to enable instruction-following capabilities. |
Instella-3B-Instruct | DPO | 760 Million | Alignment to human preferences and strengthen chat capabilities with direct preference optimization (DPO). |
Total: | 4.15 Trillion |
The Instella models are text-only, autoregressive transformer-based LMs having 3 billion parameters. They support a sequence length of up to 4,096 tokens and have a vocabulary size of ~50,000 tokens using the OLMo tokenizer.
Training Pipeline
The training of the Instella models comprised of four stages, where each stage incrementally enhanced the model’s capabilities from fundamental natural language understanding to instruction following and alignment towards human preferences.
Model Summary
Stage | Model | Training Tokens | Layers | Attention Heads | Model Hidden Size | MLP Hidden Size | Context Length | RoPE Theta |
---|---|---|---|---|---|---|---|---|
Pre-training | Instella-3B-stage1 | 4.065T | 36 | 32 | 2560 | 13824 | 4096 | 10,000 |
Pre-training | Instella-3B | 57.575B | 36 | 32 | 2560 | 13824 | 4096 | 10,000 |
SFT | Instella-3B-SFT | 8.902B (x3) | 36 | 32 | 2560 | 13824 | 4096 | 10,000 |
SFT+DPO | Instella-3B-instruct | 760M | 36 | 32 | 2560 | 13824 | 4096 | 10,000 |
Hyparparameter
Stage | Optimizer | Peak LR | LR Scheduler | Alpha F | Warmup (steps) | Weight Decay | Decay Norm & Bias | Decay Embedding | Batch Size (Tokens) | Epochs |
---|---|---|---|---|---|---|---|---|---|---|
Pretraining Stage 1 | AdamW(0.9,0.95) | 4.0e-4 | cosine_with_warmup | 0.1 | 2000 | 0.1 | True | True | 4M | 1 |
Pretraining Stage 2 | AdamW(0.9,0.95) | 4.0e-5 | cosine_with_warmup | 0.0 | 0 | 0.1 | True | True | 4M | 1 |
SFT | AdamW(0.9,0.95) | 1.0e-5 | linear_with_warmup | 0.001 | 500 | 0.1 | True | True | 0.5M | 3 |
DPO | AdamW(0.9,0.95) | 5.0e-7 | linear | -- | 10% | 0.1 | -- | -- | 0.25M | 1 |
Results
Pre-training
Models | Size | Training Tokens | Avg | ARC Challenge | ARC Easy | BoolQ | Hellaswag | PiQA | SciQ | Winnograde | OpenBookQA | MMLU | BBH (3 - shot) | GSM8k (8 - shot) |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Open Weight Models | ||||||||||||||
Gemma - 2 - 2B | 2.61B | ~2T | 59.34 | 39.46 | 59.30 | 74.50 | 70.50 | 76.40 | 96.60 | 69.80 | 44.80 | 53.28 | 40.75 | 27.37 |
Llama - 3.2 - 3B | 3.21B | ~9T | 62.51 | 47.16 | 64.91 | 74.80 | 73.10 | 75.90 | 95.30 | 70.30 | 51.20 | 57.81 | 47.00 | 30.10 |
Qwen2.5 - 3B | 3.09B | ~18T | 68.30 | 51.51 | 67.19 | 79.10 | 72.10 | 77.40 | 95.50 | 69.30 | 51.40 | 67.22 | 56.69 | 63.84 |
Fully Open Models | ||||||||||||||
Pythia - 2.8b | 2.91B | 300B | 49.83 | 40.47 | 60.70 | 64.80 | 60.10 | 72.50 | 89.70 | 60.80 | 42.60 | 26.09 | 27.69 | 2.73 |
GPTNeo - 2.7B | 2.72B | ~420B | 47.96 | 38.46 | 54.56 | 62.70 | 55.20 | 70.80 | 88.00 | 58.30 | 40.80 | 27.83 | 27.25 | 3.71 |
OpenELM - 3B | 3.04B | ~1.5T | 52.28 | 37.46 | 58.42 | 68.60 | 71.70 | 75.60 | 92.50 | 65.40 | 46.40 | 26.69 | 29.40 | 2.96 |
StableLM - 3B - 4E1T | 2.8B | ~4T | 58.51 | 44.82 | 67.02 | 75.40 | 74.20 | 78.40 | 93.40 | 68.40 | 48.60 | 45.19 | 37.33 | 10.84 |
Instella - 3B - Stage1 | 3.11B | ~4T | 61.33 | 53.85 | 73.16 | 78.70 | 74.20 | 77.50 | 94.90 | 71.20 | 51.40 | 54.69 | 34.30 | 10.77 |
Instella - 3B | 3.11B | ~4T + 60B | 66.59 | 52.84 | 70.53 | 76.50 | 75.00 | 77.80 | 96.40 | 73.10 | 52.40 | 58.31 | 39.74 | 59.82 |
- Both Instella - 3B - Stage1 & Instella - 3B models outperform all the other fully open models over all the benchmarks individually (except PIQA). The final pre - trained checkpoint Instella - 3B outperforms the existing top - performant fully open pre - trained models by a lead of ⬆️8.08% on average, with significant improvements in multiple benchmarks.
- Second stage pre - training elevated the overall average performance relative to stage - 1 by ⬆️5.26%, substantially narrowing the performance gap between Instella - 3B model vs the closed - source models, and outperforming Llama - 3.2 - 3B and Gemma - 2 - 2B on average.
Instruction - tuning Results
Models | Size | Training Tokens | Avg | MMLU | TruthfulQA | BBH | GPQA | GSM8K | Minerva MATH | IFEval | AlpacaEval 2 | MT - Bench |
---|---|---|---|---|---|---|---|---|---|---|---|---|
Open Weight Models | ||||||||||||
Gemma - 2 - 2B - Instruct | 2.61B | ~2T | 39.04 | 58.35 | 55.76 | 42.96 | 25.22 | 53.45 | 22.48 | 55.64 | 29.41 | 8.07 |
Llama - 3.2 - 3B - Instruct | 3.21B | ~9T | 47.53 | 61.50 | 50.23 | 61.50 | 29.69 | 77.03 | 46.00 | 75.42 | 19.31 | 7.13 |
Qwen2.5 - 3B - Instruct | 3.09B | ~18T | 48.72 | 66.90 | 57.16 | 57.29 | 28.13 | 75.97 | 60.42 | 62.48 | 22.12 | 8.00 |
Fully Open Models | ||||||||||||
StableLM - zephyr - 3B | 2.8B | 4T | 30.50 | 45.10 | 47.90 | 39.32 | 25.67 | 58.38 | 10.38 | 34.20 | 7.51 | 6.04 |
OpenELM - 3B - Instruct | 3.04B | ~1.5T | 14.11 | 27.36 | 38.08 | 24.24 | 18.08 | 1.59 | 0.38 | 16.08 | 0.21 | 1.00 |
Instella - 3B - SFT | 3.11B | ~4T | 42.05 | 58.76 | 52.49 | 46.00 | 28.13 | 71.72 | 40.50 | 66.17 | 7.58 | 7.07 |
Instella - 3B - Instruct | 3.11B | ~4T | 44.87 | 58.90 | 55.47 | 46.75 | 30.13 | 73.92 | 42.46 | 71.35 | 17.59 | 7.23 |
- The Instella - 3B - Instruct model consistently outperforms other fully open models across all evaluated benchmarks with a significant average score lead.
- It narrows the performance gap with leading open - weight models and performs on par with or slightly surpasses existing state - of - the - art open weight instruction - tuned models.
Training Data
Stage | Model | Dataset | License |
---|---|---|---|
Pre - training Stage 1 | Instella - 3B - stage1 | [https://huggingface.co/datasets/allenai/OLMoE - mix - 0924](https://huggingface.co/datasets/allenai/OLMoE - mix - 0924) | ODC - BY - 1.0 |
Pre - training Stage 2 | Instella - 3B | [https://huggingface.co/datasets/allenai/tulu - 3 - sft - mixture](https://huggingface.co/datasets/allenai/tulu - 3 - sft - mixture) | ODC - BY - 1.0 |
Pre - training Stage 2 | Instella - 3B | [https://huggingface.co/datasets/allenai/dolmino - mix - 1124](https://huggingface.co/datasets/allenai/dolmino - mix - 1124) | ODC - BY - 1.0 |
Pre - training Stage 2 | Instella - 3B | [https://huggingface.co/datasets/teknium/OpenHermes - 2.5](https://huggingface.co/datasets/teknium/OpenHermes - 2.5) | Refer source materials |
Pre - training Stage 2 | Instella - 3B | [https://huggingface.co/datasets/TIGER - Lab/WebinstructSub](https://huggingface.co/datasets/TIGER - Lab/WebinstructSub) | Apache - 2.0 |
Pre - training Stage 2 | Instella - 3B | [https://huggingface.co/datasets/m - a - p/Code - Feedback](https://huggingface.co/datasets/m - a - p/Code - Feedback) | Apache - 2.0 |
Pre - training Stage 2 | Instella - 3B | https://huggingface.co/datasets/HuggingFaceH4/ultrachat_200k | MIT |
Pre - training Stage 2 | Instella - 3B | [https://huggingface.co/datasets/HuggingFaceTB/smollm - corpus/viewer/python - edu](https://huggingface.co/datasets/HuggingFaceTB/smollm - corpus/viewer/python - edu) | ODC - BY - 1.0 |
Pre - training Stage 2 | Instella - 3B | [https://github.com/google - deepmind/mathematics_dataset](https://github.com/google - deepmind/mathematics_dataset) | Apache - 2.0 |
Pre - training Stage 2 | Instella - 3B | [https://huggingface.co/datasets/amd/Instella - GSM8K - synthetic](https://huggingface.co/datasets/amd/Instella - GSM8K - synthetic) | [LICENSE](https://huggingface.co/datasets/amd/Instella - GSM8K - synthetic/blob/main/LICENSE) |
SFT | Instella - 3B - SFT | [https://huggingface.co/datasets/nvidia/OpenMathinstruct - 2](https://huggingface.co/datasets/nvidia/OpenMathinstruct - 2) | CC - BY - 4.0 |
SFT | Instella - 3B - SFT | https://huggingface.co/datasets/cais/mmlu | MIT |
SFT | Instella - 3B - SFT | https://huggingface.co/datasets/HuggingFaceTB/smoltalk | Apache - 2.0 |
SFT | Instella - 3B - SFT | [https://huggingface.co/datasets/GAIR/o1 - journey](https://huggingface.co/datasets/GAIR/o1 - journey) | Refer source materials |
SFT | Instella - 3B - SFT | [https://huggingface.co/datasets/allenai/tulu - 3 - sft - personas - instruction - following (subset of Tulu3)](https://huggingface.co/datasets/allenai/tulu - 3 - sft - personas - instruction - following) | ODC - BY - 1.0 |
DPO | Instella - 3B - instruct | [https://huggingface.co/datasets/allenai/olmo - 2 - 1124 - 7b - preference - mix](https://huggingface.co/datasets/allenai/olmo - 2 - 1124 - 7b - preference - mix) | ODC - BY - 1.0 |
⚠️ Important Note
Further information concerning the training datasets, including applicable licensing terms and use restrictions, may be located at the linked source location.
🔧 Technical Details
The Instella models are text - only, autoregressive transformer - based LMs having 3 billion parameters. Architecture - wise, Instella is packed with 36 decoder layers, each having 32 attention heads. These models support a sequence length of up to 4,096 tokens and have a vocabulary size of ~50,000 tokens using the OLMo tokenizer.
During both pre - training and fine - tuning, FlashAttention - 2, Torch Compile, and bfloat16 mixed - precision training were utilized to reduce memory usage, leading to computational speedups and optimal resource utilization. Fully sharded data parallelism (FSDP) with hybrid sharding was employed to balance inter - node memory efficiency and intra - node communication overhead within the cluster.
📄 License
- The Instella - 3B models are licensed for academic and research purposes under a ResearchRAIL license.
- The [amd/Instella - GSM8K - synthetic](https://huggingface.co/datasets/amd/Instella - GSM8K - synthetic) dataset used in second stage pre - training is built with Qwen2.5 - 72B - Instruct, and is licensed for academic and research purposes under a ResearchRAIL license. Refer to the [LICENSE](https://huggingface.co/datasets/amd/Instella - GSM8K - synthetic/blob/main/LICENSE) and [NOTICES](https://huggingface.co/datasets/amd/Instella - GSM8K - synthetic/blob/main/NOTICES) in the [amd/Instella - GSM8K - synthetic](https://huggingface.co/datasets/amd/Instella - GSM8K - synthetic) dataset card files for more information.
- Refer to the [LICENSE](https://huggingface.co/amd/Instella - 3B/blob/main/LICENSE) and [NOTICES](https://huggingface.co/amd/Instella - 3B/blob/main/NOTICES) files for more information.
Additional Resources
Hugging Face Model Cards
- Pre - trained models:
- Instella - 3B - Stage1: [amd/Instella - 3B - Stage1](https://huggingface.co/amd/Instella - 3B - Stage1), First stage pre - training checkpoint.
- Instella - 3B: [amd/Instella - 3B](https://huggingface.co/amd/Instella - 3B), Final pre - training checkpoint.
- Instruction - tuned models:
- Instella - 3B - SFT: [amd/Instella - 3B - SFT](https://huggingface.co/amd/Instella - 3B - SFT), Supervised fine - tuned checkpoint.
- Instella - 3B - Instruct: [amd/Instella - 3B - Instruct](https://huggingface.co/amd/Instella - 3B - Instruct), Final Instruction - tuned checkpoint.
Datasets
Second stage pre - training GSM8k synthetic dataset: [amd/Instella - GSM8K - synthetic](https://huggingface.co/datasets/amd/Instella - GSM8K - synthetic)
- The dataset consists of two splits:
train
andtrain_119K
. - For Instella - 3B model second stage pre - training, the
train_119K
split, which is a subset of the largertrain
split, was used.
Code
- Github: [https://github.com/AMD - AIG - AIMA/Instella](https://github.com/AMD - AIG - AIMA/Instella)
Please refer to the following blogs to get started with using these techniques on AMD GPUs:
- [PyTorch Fully Sharded Data Parallel (FSDP) on AMD GPUs with ROCm™](https://rocm.blogs.amd.com/artificial - intelligence/fsdp - training - pytorch/README.html)
- [Accelerating Large Language Models with Flash Attention on AMD GPUs](https://rocm.blogs.amd.com/artificial - intelligence/flash - attention/README.html)
- [Accelerate PyTorch Models using torch.compile on AMD GPUs with ROCm™](https://rocm.blogs.amd.com/artificial - intelligence/torch_compile/README.html)
- [Introducing the First AMD 1B Language Models: AMD OLMo](https://www.amd.com/en/developer/resources/technical - articles/introducing - the - first - amd - 1b - language - model.html)
Bias, Risks, and Limitations
⚠️ Important Note
- The models are being released for research purposes only and are not intended for use cases that require high levels of factuality, safety - critical situations, health, or medical applications, generating false information, facilitating toxic conversations.
- Model checkpoints are made accessible without any safety promises. It is crucial for users to conduct comprehensive evaluations and implement safety filtering mechanisms as per their respective use cases.
- It may be possible to prompt the model to generate content that may be factually inaccurate, harmful, violent, toxic, biased, or otherwise objectionable. Such content may also get generated by prompts that did not intend to produce output as such. Users are thus requested to be aware of this and exercise caution and responsible thinking when using the model.
- Multi - lingual abilities of the models have not been tested and thus may misunderstand and generate erroneous responses across different languages.
Citations
@misc{Instella,
title = {Instella: Fully Open Language Models with Stellar Performance},
url = {https://huggingface.co/amd/Instella-3B},
author = {Jiang Liu, Jialian Wu, Xiaodong Yu, Prakamya Mishra, Sudhanshu Ranjan, Zicheng Liu, Chaitanya Manem, Yusheng Su, Pratik Prabhanjan Brahma, Gowtham Ramesh, Ximeng Sun, Ze Wang, Emad Barsoum},
month = {March},
year = {2025}
}

