Llama#
Metaβs Llama is a family of open-weight autoregressive language models built on the transformer decoder architecture. Key design choices include pre-normalization with RMSNorm, SwiGLU activations, and Rotary Positional Embeddings (RoPE). Llama 3+ models add Grouped Query Attention (GQA) for memory-efficient inference at larger scales.
Task |
Text Generation |
Architecture |
|
Parameters |
1B β 405B |
HF Org |
Available Models#
Llama 3.2: 1B, 3B
Llama 3.1: 8B, 70B, 405B (128K context)
Llama 3: 8B, 70B
Llama 2: 7B, 13B, 70B
LLaMA (v1): 7B, 13B, 30B, 65B
Yi (01-ai): 6B, 34B β uses
LlamaForCausalLM
Architecture#
LlamaForCausalLM
Example HF Models#
Model |
HF ID |
|---|---|
Llama 3.2 1B |
|
Llama 3.2 3B |
|
Llama 3.1 8B |
|
Llama 3.1 70B |
|
Llama 3.1 405B |
|
Llama 3 8B |
|
Llama 3 70B |
|
Llama 2 70B |
|
Yi 34B |
Example Recipes#
Recipe |
Description |
|---|---|
SFT β Llama 3.2 1B on SQuAD |
|
SFT β Llama 3.3 70B Instruct on SQuAD |
Try with NeMo AutoModel#
1. Install (full instructions):
pip install nemo-automodel
2. Clone the repo to get the example recipes:
git clone https://github.com/NVIDIA-NeMo/Automodel.git
cd Automodel
3. Run the recipe from inside the repo:
automodel --nproc-per-node=8 examples/llm_finetune/llama3_2/llama3_2_1b_squad.yaml
Run with Docker
1. Pull the container and mount a checkpoint directory:
docker run --gpus all -it --rm \
--shm-size=8g \
-v $(pwd)/checkpoints:/opt/Automodel/checkpoints \
nvcr.io/nvidia/nemo-automodel:26.02.00
2. Navigate to the AutoModel directory (where the recipes are):
cd /opt/Automodel
3. Run the recipe:
automodel --nproc-per-node=8 examples/llm_finetune/llama3_2/llama3_2_1b_squad.yaml
See the Installation Guide and LLM Fine-Tuning Guide.
Fine-Tuning#
See the LLM Fine-Tuning Guide for full SFT and LoRA instructions.