Meta AI’s original LLaMA paper proved that an openly released 13B-parameter transformer trained on 1.0 trillion public tokens could outperform the 175B-parameter GPT-3 on most benchmarks while running on a single V100 GPU. Published in February 2023 by Hugo Touvron, Thibaut Lavril, Gautier Izacard, Edouard Grave, Guillaume Lample, and colleagues, LLaMA shifted open foundation models from copying Chinchilla’s training-optimal ratio to aggressively overtraining smaller models for cheap inference.

That choice transformed open-weights AI. By pairing modern transformer blocks (RMSNorm, SwiGLU, and RoPE) with a 100% public 1.4T-token data mix and memory-efficient attention kernels, LLaMA-65B matched Chinchilla-70B and PaLM-540B, and showed that even a 7B model kept improving well past 1 trillion tokens.

  • Inference-first overtraining: While Chinchilla prescribed ~200B tokens for a 10B model, Meta trained 7B and 13B on 1.0T tokens (~77 to 149 tokens per parameter) and 33B and 65B on 1.4T tokens, watching validation loss keep dropping smoothly past 1T tokens.
  • 13B beats 175B GPT-3: LLaMA-13B outperformed GPT-3 on BoolQ (78.1% vs 60.5%), HellaSwag (79.2% vs 78.9%), WinoGrande (73.0% vs 70.2%), RACE-high (47.2% vs 45.5%), and NaturalQuestions 64-shot (31.9% vs 29.9%), at more than 10x smaller parameter scale.
  • 65B rivals Chinchilla-70B and PaLM-540B: LLaMA-65B reached 39.9% on 64-shot NaturalQuestions (vs PaLM-540B 39.6%), 69.7% on GSM8k with maj1@100 (beating math-finetuned Minerva-62B at 68.5%), and 84.2% on HellaSwag.
  • Public-only data had one clear gap: Relying strictly on 177 GB of public books and ArXiv (versus up to 2 TB of books in Gopher, Chinchilla, and PaLM) left LLaMA-65B behind Chinchilla on 5-shot MMLU (63.4% vs 67.5%), until brief instruction tuning (LLaMA-I) lifted it to 68.9%.
LLaMA’s three-part recipe: public corpus, modern block, overtrained weights
1. Public 1.4T-token mix
Zero proprietary scrapes or undocumented books; fully reproducible from public sources.
Web + code + math + Q&A
CommonCrawl via CCNet + Wiki-ref classifier (67%), C4 (15%), permissive GitHub (4.5%), 20-language Wikipedia (4.5%), Gutenberg + Books3 (4.5%), ArXiv LaTeX (2.5%), StackExchange (2.0%).
2. Updated transformer
Three community upgrades adopted from GPT-3, PaLM, and GPT-Neo.
Pre-RMSNorm + SwiGLU + RoPE
RMSNorm stabilizes pre-norm layers; SwiGLU (hidden width 2/3 of 4d) replaces ReLU; RoPE replaces absolute position embeddings; numbers split into single digits.
3. Inference-first budget
Train past Chinchilla’s 20x ratio so serving weights fit on small GPUs.
6.7B / 13.0B (1.0T) & 32.5B / 65.2B (1.4T)
All four models share a 4M-token batch size, AdamW, and FlashAttention-style causal xformers kernels (380 tokens/sec/GPU on 2,048 A100-80GB GPUs).

Architecture and dataset specifications from Touvron et al. (2023), Section 2, Tables 1 and 2.

Why Chinchilla-optimal training is inference-suboptimal

Chinchilla answered a narrow question: given one fixed training FLOP budget, what (N, D) minimizes final training loss? Meta AI asked the operational question teams actually face in production: given a target quality level, which model is cheapest to serve repeatedly?

Even if a larger model reaches a target loss in fewer training FLOPs, every inference query pays for reading all N parameter weights from GPU memory. By training a 7B (6.7B) and 13B (13.0B) model on 1.0 trillion tokens (5x to 7x more data than Chinchilla’s 20-tokens-per-parameter prescription), Meta verified that small-model validation loss keeps falling smoothly past 1T tokens (Figure 1). A 13B model fits in a single V100 GPU, yet beats 175B GPT-3 on common sense, reading comprehension, and closed-book QA.

Meta combined three architectural improvements that became the de facto open-LLM standard: pre-normalization with RMSNorm, SwiGLU activations scaled to 2/3 * 4d hidden width, and Rotary Position Embeddings (RoPE) at every attention layer. Crucially, the SentencePiece BPE tokenizer split all numbers into individual digits and used byte fallback for unknown UTF-8 characters. On hardware, xformers causal multi-head attention avoided materializing the N x N attention matrix or computing masked causal scores, paired with manual backward passes and selective activation checkpointing (saving expensive linear outputs) plus model and sequence parallelism overlapping all_reduce communication. That yielded 380 tokens/sec/GPU on 2,048 A100-80GB GPUs, finishing the 65B 1.4T-token run in 21 days (1,022,362 GPU-hours, 449 MWh, 173 tCO2 eq).

Why naive open-source and scaling recipes fall short
Stopping at 20x tokens

Chinchilla stops a 10B model at 200B tokens, leaving huge capability gains on the table while forcing serving stacks to host heavier weights.

PyTorch autograd + naive attention

Storing causal attention weights wastes memory; manual backward passes saving linear outputs plus xformers hit 380 tok/s/GPU across 2,048 A100s.

Proprietary web + book scrapes

Undocumented 2TB book corpora block open replication; filtering public CCNet with a Wikipedia-reference classifier recovers high quality openly.

Systems and dataset tradeoffs from Touvron et al. (2023), Sections 1, 2.1, and 2.4.

Public-only curation: high quality without secret corpora

Earlier open models like OPT-175B and BLOOM-176B struggled to match proprietary baselines like Chinchilla or PaLM-62B. Meta bridged that gap without private scrapes by stacking aggressive quality filtering over seven public sources (Table 1).

Five Common Crawl dumps (2017 to 2020) passed through CCNet line deduplication, fastText English language filtering, and n-gram perplexity filtering, plus a custom linear classifier trained to distinguish pages cited as Wikipedia references from random web pages. To keep web diversity without over-relying on one filter, Meta kept 67.0% CCNet (3.3 TB, 1.10 epochs) alongside 15.0% Google C4 (783 GB, 1.06 epochs).

The remaining 18% packed dense technical and structured knowledge: 4.5% permissive-license GitHub (Apache, BSD, MIT only, regex-cleaned and exact-deduplicated), 4.5% Wikipedia across 20 Latin and Cyrillic languages (2.45 epochs), 4.5% Gutenberg plus Books3 deduplicated at 90% overlap (2.23 epochs), 2.5% ArXiv LaTeX with preambles/bibliographies stripped and macros inline-expanded (1.06 epochs), and 2.0% StackExchange Q&A sorted by answer score (1.03 epochs).

That mix gave LLaMA-65B surprising strength in code and math without domain-specific finetuning: 23.7% pass@1 on HumanEval and 37.7% on MBPP (beating PaLM-540B’s 36.8%), plus 50.9% on GSM8k (69.7% with maj1@100 majority voting, beating math-tuned Minerva-62B’s 68.5%). Even LLaMA-13B reached 15.8% on HumanEval, beating 137B LaMDA (14.0%).

Benchmark wins, MMLU’s book gap, and safety checks

Across 20 benchmarks, LLaMA’s strength depended heavily on what kind of knowledge each task tested. Explore five key comparisons from Sections 3 through 5 below.

Five empirical comparisons across the LLaMA family

Select a domain (or use Left and Right arrow keys) to compare LLaMA 7B through 65B against GPT-3 175B, Chinchilla 70B, and PaLM 540B.

LLaMA-13B vs. GPT-3 175B on reasoning and QA

Inference win

Training 13B on 1.0T public tokens beats 175B GPT-3 across most commonsense and closed-book QA benchmarks on a single V100 GPU.

Why naive setup fails
Matching 175B parameters at serving time forces multi-GPU tensor parallelism and huge memory bandwidth on every generated token.
Paper's mechanism
5x Chinchilla overtraining (1.0T tokens) plus RMSNorm, SwiGLU, and RoPE packs 175B-class capability into 13B weights.
Measured evidence
13B vs GPT-3 175B: BoolQ 78.1 vs 60.5; HellaSwag 79.2 vs 78.9; WinoGrande 73.0 vs 70.2; ARC-e 74.8 vs 68.8; NaturalQuestions 64-shot 31.9 vs 29.9.
Production lesson
Smaller overtrained weights shift the bottleneck from serving hardware cost to upfront pretraining data quality.

Source: Touvron et al. (2023), Sections 3 through 5.

Without clicking through the tabs, here are the five takeaways:

  • 13B vs. 175B: Overtrained on 1.0T tokens, LLaMA-13B runs on one V100 GPU and outperforms 175B GPT-3 on BoolQ (78.1%), HellaSwag (79.2%), WinoGrande (73.0%), and NaturalQuestions (31.9%).
  • Math and code: Digit-splitting tokenization plus ArXiv and GitHub data carried 65B to 69.7% (maj1@100) on GSM8k and 37.7% on MBPP without specialized finetuning.
  • MMLU’s book gap: Having only 177 GB of books/papers kept base 65B at 63.4% vs Chinchilla’s 67.5%, though brief instruction tuning (LLaMA-I) jumped to 68.9%.
  • Training diagnostics: QA and HellaSwag tracked training perplexity cleanly past 1T tokens, while SIQA proved too noisy and WinoGrande flattened between 33B and 65B.
  • Base-model safety: Unaligned LLaMA-65B scored 0.53 truthful+informative on TruthfulQA and 79.0 on CrowS-Pairs religious bias, confirming pretraining alone does not align a model.

Caveats and how open models evolved after LLaMA 1

Three caveats frame how engineers should read the 2023 LLaMA paper today.

First, the paper reported no component ablations. Meta swapped in RMSNorm, SwiGLU, RoPE, digit-split BPE, AdamW, and a brand-new CCNet/Wikipedia-reference mixture all at once. As Touvron et al. noted, attributing exact percentage gains to architecture versus data curation versus the 1T+ token budget cannot be done from this paper alone.

Second, the original weights were gated under a non-commercial research license and limited to a 2,048-token context. That licensing restriction spurred open-corpus reproductions like RedPajama, while the short context window spurred RoPE extension techniques like Position Interpolation and YaRN. Later generations in Meta’s own family pushed the same overtraining thesis much further: Llama 3 scaled pretraining past 15 trillion tokens and introduced grouped-query attention and 4D parallelism.

Third, carbon accounting covered more than the final run. While the final 65B training run emitted 173 tCO2 eq (449 MWh), five months of development across 2,048 A100 GPUs consumed roughly 2,638 MWh (1,015 tCO2 eq). Meta’s argument was amortization: train once, release weights openly, and let the community avoid re-running pretraining from scratch.

For builders choosing or training models today, LLaMA 1 established the operating rule that still governs production AI: parameter count is a terrible proxy for capability, data quality and token budget beat bloated weights every time, and inference footprint should drive architecture size before training starts.