v9.1.1
Menu
Paper breakdownLarge Language ModelsPRO2024

The Llama 3 Herd of Models

A 405B Dense Transformer, Its Scaling Laws, 16K-GPU Training Stack, SFT + Rejection Sampling + DPO Post-Training, and Compositional Vision & Speech Adapters

Llama Team, AI @ Meta

9

Concepts

Paper Overview

The Llama 3 Herd of Models (Llama Team, AI @ Meta, 2024) is a 92-page engineering report, and it makes an unfashionable argument: a frontier model does not need a new architecture. The flagship is a dense Transformer with 405B parameters and a 128K-token context window, pre-trained on 15.6T tokens with 3.8×10253.8 \times 10^{25} FLOPs — almost 50x the largest Llama 2 — and it performs on par with GPT-4 across a wide range of tasks.

The authors name three levers: data, scale, and managing complexity. Data means roughly 15T multilingual tokens (versus 1.8T for Llama 2) with much stricter curation. Scale means a flagship sized by the team's own scaling laws to be approximately compute-optimal for its budget. Managing complexity means choosing the boring option whenever it scales better: a standard dense Transformer instead of mixture-of-experts, and SFT + rejection sampling + DPO instead of PPO-style RLHF.

This breakdown follows the method. It covers the architecture tweaks (GQA, RoPE base 500,000, a 128K vocabulary), the IsoFLOP scaling laws that picked 405B, the data mix and annealing, the six-stage extension to 128K context, the 4D-parallel training stack on 16K H100s, the post-training loop, and the compositional vision and speech adapters that add modalities without touching the language model's weights.

Explainer video
Preview · first 30s

Chapter Roadmap

Click any topic to jump in

1
Data, Scale, Managing Complexity

Meta's thesis: frontier quality comes from better data, far more compute, and deliberately boring design choices that scale.

complexity lever
2
A Deliberately Standard Dense Transformer

No mixture-of-experts. GQA with 8 KV heads, RoPE base 500,000, a 128K-token vocabulary and a cross-document attention mask.

sized by
3
Compute-Optimal Sizing of the 405B

IsoFLOP parabolas from 6e18 to 1e22 FLOPs extrapolate to 402B params on 16.55T tokens at a 3.8e25 FLOP budget.

trained on

What the model sees

4
Data Mix + Annealing

~15T curated multilingual tokens: 50% general, 25% math/reasoning, 17% code, 8% multilingual — finished by annealing on high-quality data.

5
Extending to 128K Context

Six gated stages from 8K to 128K using ~800B tokens, only advancing once short-context scores recover and needle retrieval is perfect.

made feasible by
6
4D Parallelism on 16K H100s

TP, CP, PP and FSDP nested by bandwidth need; 38-43% BF16 MFU and >90% effective training time despite 419 unexpected interruptions.

aligned by
7
SFT + Rejection Sampling + DPO Rounds

Six rounds of reward model, best-of-K rejection sampling, SFT and DPO — no PPO — with model averaging at every stage.

extended by
8
Compositional Vision & Speech

Frozen LLM plus trained encoders: cross-attention adapters for images/video, a token-embedding adapter for speech.

evaluated by
9
Results

405B lands on par with GPT-4-class models (87.3 MMLU, 96.8 GSM8K, 89.0 HumanEval); the adapters beat GPT-4V and Whisper.

Concept by concept

9 sections, in reading order.

PRO

Unlock the full breakdown

All 9 concepts — figures, key points, formulas and interactive demos — are part of PixelBank Premium.

  1. 01Data, Scale, and Managing Complexity
  2. 02A Deliberately Standard Dense Transformer
  3. 03Compute-Optimal Sizing of the 405B
  4. 04The Pre-Training Data Mix and Annealing
  5. 05Extending the Context Window to 128K
  6. 064D Parallelism on 16K H100s
  7. 07Post-Training: SFT, Rejection Sampling, and DPO in Rounds
  8. 08Compositional Vision and Speech Adapters
  9. 09Results