IN THIS BREAKDOWN · 10 SECTIONS
You can read 18% of this breakdown.
The paper in one minute
Chinchilla showed how to reach a given loss with the least training compute. Meta's LLaMA team pointed out what that objective ignores: a model is trained once and served millions of times, so for a target quality the cheapest model to own is often a smaller one trained much longer. Chinchilla's rule would put a 10B model at about 200B tokens; the LLaMA authors found a 7B model still improving after 1 trillion.
So they trained four models, 6.7B, 13.0B, 32.5B and 65.2B parameters, on 1.0 to 1.4 trillion tokens, using only publicly available data: two-thirds filtered CommonCrawl, plus C4, permissively licensed GitHub code, Wikipedia in 20 languages, public-domain and Books3 books, arXiv LaTeX and Stack Exchange. The architecture is a standard decoder-only Transformer with three borrowed improvements: RMSNorm applied before each sub-layer (from GPT-3), the SwiGLU activation (from PaLM) and rotary position embeddings (from GPT-Neo).
The results made the case. LLaMA-13B beat GPT-3 on most of 20 benchmarks while being more than ten times smaller, small enough to run on a single GPU. LLaMA-65B was competitive with Chinchilla-70B and PaLM-540B, with the best zero- and few-shot closed-book QA scores reported at the time. Its one clear weakness was MMLU, where it trailed Chinchilla by about four points. Meta released the weights to the research community, and LLaMA became the base for many of the open models that followed in 2023.
Research notes: the problem, approach and results
LLaMA-13B outperforms GPT-3 on most benchmarks despite being more than ten times smaller (abstract, Table 3)
training tokens for LLaMA-33B and 65B; 7B and 13B saw 1.0T (Table 2)
to train LLaMA-65B at 380 tokens per second per GPU on 2,048 A100 80GB GPUs (Section 2.4)
Chinchilla's scaling laws say how to minimize training compute for a target quality, but serving cost is paid on every request and falls with model size. The best models in early 2023 were also trained on private or undocumented data and could not be studied or rebuilt.
Train a family of 7B to 65B decoder-only Transformers far longer than Chinchilla's optimum, on 1.0 to 1.4 trillion tokens from public sources only: filtered CommonCrawl, C4, GitHub, Wikipedia, books, arXiv and Stack Exchange. Use pre-normalization with RMSNorm, SwiGLU and rotary embeddings, and release the weights to researchers.
LLaMA-13B outperformed GPT-3 (175B) on most benchmarks, and LLaMA-65B was competitive with Chinchilla-70B and PaLM-540B, beating Chinchilla on every common-sense benchmark but BoolQ. It lagged on MMLU (63.4% against 67.5%), which the authors attribute to using only 177 GB of books and papers.
Why it matters to an FDE
LLaMA is the paper that made "smaller model, more tokens" the default for anything that serves real traffic, and it is the template for the open-weight models a customer will ask you to deploy.
Design for inference cost. Generating a token costs about 2 FLOPs per parameter. A 13B model that matches a 175B model on the customer's task is roughly thirteen times cheaper per token and fits on hardware they already own. LLaMA put that trade at the center of model choice.
Open weights change the deployment options. With weights in hand a team can run the model inside its own network, fine-tune it with LoRA or QLoRA, quantize it, and audit its behavior. All of that is impossible behind an API. The first LLaMA release was for research use, so check the license of any specific model before planning production.
Public data has gaps. The authors explain their MMLU deficit by the small amount of books and academic text in a purely public corpus. When a customer's domain is underrepresented on the open web, expect a base model to be weaker there whatever its size.
Understand the mechanism. Try it on a real problem.
Unlock this breakdown and 290 more papers.
Premium opens every paper in full, plus every answer, concept, course and guide on the site. One payment for six months of access.
6 months · One payment · No auto-renewal
- ◇1 architecture diagram
- </>1 runnable code experiment
- ▦2 results tables
- ?5 interview questions with answers
- 03Key takeaways
The inference-budget argument, the data mix, three architecture changes and the results that held
Free account - 04How it works
Data cleanup per source, the architecture and optimizer, and the efficiency work
Premium - 05The numbers that matter
Model shapes, benchmark tables against GPT-3, Chinchilla and PaLM, and the training bill
Premium - 06Try it yourself
Rebuild the parameter counts, recompute the training bill, and size the models for inference
Premium - 07Where it breaks
Benchmark gaps, base-model limits, bias and toxicity, research-only weights and slips
Premium - 08Using it on a deployment
Picking a size, memory planning, fine-tuning and quantization paths, and license checks
Premium - 09Interview angles
Five questions this paper prepares you for, with answer hints
Premium - 10Read next
Where to go from here on this site
Premium
