Llama

View as Markdown

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.

TaskText Generation
ArchitectureLlamaForCausalLM
Parameters1B – 405B
HF Orgmeta-llama

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

Example Recipes

RecipeDescription
llama3_2_1b_squad.yamlSFT — Llama 3.2 1B on SQuAD
llama_3_3_70b_instruct_squad.yamlSFT — 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

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.06.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.

Hugging Face Model Cards