Meta Llama — Library index

Canonical reference for Meta’s Llama family — the dominant open-weight large-language-model lineage. Covers the full release history (Llama 2 → 3 → 3.1 → 3.2 → 3.3 → Llama 4 Scout/Maverick MoE, with Behemoth’s never-shipped status), the Llama Community License and what “open weight” actually means here (it is not OSI-approved open source), the Llama Stack API/agent standardization layer, the Purple Llama safety tooling (Llama Guard, Prompt Guard, Code Shield, LlamaFirewall), the deployment paths (self-host, on-device, managed), the vast fine-tuning derivative tree, and where Llama fits in an architecture decision. House style and source-URL conventions match the rest of the Compute library; this sub-library is the Meta-specific counterpart to Claude/, OpenAI/, GoogleGemini/, and AWSBedrock/ (the other model-provider sub-libraries).

Llama matters because it is the open-weight default — the family that, for two years, defined what “you can download the weights and run it yourself” meant in practice. Even as the quality frontier of open weights shifted to China-origin labs in 2025 (DeepSeek-V3.x, Qwen 3) and back to Europe (Mistral Large 3, Apache-2.0), the Llama lineage remains the gravitational center of the open-weight tooling ecosystem: HuggingFace transformers, vLLM, SGLang, llama.cpp, Ollama, LM Studio, the GGUF quantization format, and many thousands of derivative fine-tunes all grew up around Llama checkpoints. When an engineer says “we’ll just run an open model on our own GPUs,” Llama is still the reflexive first thought even when a competitor wins on a given benchmark.

The caveat — and it is a load-bearing one — is the license. Meta calls Llama “open” and the weights are genuinely downloadable, but the Llama Community License is a custom, source-available agreement with restrictions no OSI-approved license carries: a 700-million-monthly-active-user scale cap on free commercial use, a ban on using Llama to train competing models, and a mandatory acceptable-use policy. That distinction drives real architecture and procurement decisions, so this sub-library treats it as a first-class topic alongside the models.

This sub-library lives inside Math-and-Compute/Compute/ as a sibling of Claude/, OpenAI/, GoogleGemini/, AWSBedrock/, Vercel/, and CloudflareWorkers/. Notes are version-pinned to 2026-05-30. The Llama landscape moves on a multi-month cadence (Meta’s frontier momentum stalled through 2025 — Behemoth never shipped, and the closed Muse Spark launch in April 2026 effectively closed the window for a public Behemoth release), so verify model sizes, license clauses, and benchmark claims against llama.com and the per-model HuggingFace model cards before quoting.

See also

  • _index — the broader Compute domain index (this sub-library is one node under it)
  • llm-landscape — the cross-vendor model catalog; this sub-library is the Meta-specific deep dive of the “Open-weight Western → Meta — Llama” section there, and the Llama facts here are reconciled against it (Behemoth announced but never publicly released; Scout/Maverick are the shipped Llama 4 weights)
  • _index — sibling vendor sub-library (Anthropic; the closed-frontier counterpart)
  • _index — sibling vendor sub-library (OpenAI)
  • _index — sibling vendor sub-library (Google; note Gemma is Google’s open-weight line, the closest analogue to Llama)
  • _index — sibling sub-library; Bedrock is one of the managed hosting paths for Llama (meta.llama* model IDs), so it is also a deployment cross-reference
  • transformer-architecture — the decoder-only transformer + RoPE + MoE substrate Llama is built on
  • fine-tuning-rlhf — SFT + DPO + RLHF, the post-training that turns base Llama into the -Instruct checkpoints (and that the derivative-model tree re-applies)
  • inference-optimization — quantization (GGUF, GPTQ, AWQ), KV-cache, speculative decoding — the techniques that make Llama runnable on commodity hardware
  • model-serving-infrastructure — vLLM / SGLang / TGI / llama.cpp, the open-model serving stacks built around Llama
  • llm-evaluation — how the benchmark numbers quoted in these notes are produced and why they’re contested
  • prompt-engineering-agent-systems — vendor-neutral agent discipline; Llama Stack is Meta’s opinionated take on it

Library contents

Foundations

FileWhat it covers
llama-models-and-ecosystemThe whole picture in one deep note — full lineage (Llama 2 → 3 → 3.1 → 3.2 → 3.3 → Llama 4 Scout/Maverick, Behemoth status); the Llama Community License and the open-weight-vs-OSI-open distinction; Llama Stack; the Purple Llama safety stack (Llama Guard, Prompt Guard, Code Shield, LlamaFirewall); deployment paths (self-host vLLM/SGLang, on-device llama.cpp/ExecuTorch, managed Bedrock/Azure/Together/Fireworks/Groq); the fine-tuning derivative tree; benchmarks vs frontier closed models; and the architecture-decision framing

This sub-library currently consolidates everything into a single deep note (the Llama story is one coherent narrative — model history, license, tooling, and deployment are tightly coupled). If it grows, the natural split is one note per pillar (llama-models, llama-license, llama-stack, purple-llama-safety, llama-deployment-and-finetuning), mirroring the flat-folder layout used in Claude/ and AWSBedrock/.

How to use this library

  1. “Should we use Llama at all?” — start at the architecture-decision section of llama-models-and-ecosystem, then read the license section carefully (the 700M-MAU cap and competing-model ban are the two clauses that most often kill the choice for large or AI-native companies).
  2. Picking a Llama model size — the lineage tables in llama-models-and-ecosystem map size to use case: 1B/3B for on-device, 8B for cheap self-host, 70B (3.3) for the quality/cost sweet spot, Scout/Maverick MoE for long-context and frontier-adjacent quality.
  3. Deploying Llama — the deployment section covers the three paths: self-host (vLLM / SGLang — see model-serving-infrastructure), on-device (llama.cpp / ExecuTorch / GGUF — see inference-optimization), and managed (Bedrock — see _index — / Azure / Together / Fireworks / Groq).
  4. Adding safety guardrails — the Purple Llama section covers Llama Guard (input/output classification), Prompt Guard (injection/jailbreak detection), Code Shield, and LlamaFirewall (the 2025 agent-security framework that composes them).
  5. Fine-tuning Llama — the derivative-tree section, paired with fine-tuning-rlhf for the SFT/DPO/RLHF mechanics and the peft / LoRA / QLoRA tooling.
  6. Comparing to the closed frontier — the benchmarks section, cross-referenced to llm-landscape for the full multi-vendor picture and _index / _index / _index for the closed-model details.

Conventions used in this library

  • Model names are quoted verbatim (e.g. Llama-3.3-70B-Instruct, Llama-4-Scout-17B-16E-Instruct, Llama-Guard-3-8B). HuggingFace repo IDs are namespaced meta-llama/…; Bedrock IDs differ (e.g. meta.llama3-3-70b-instruct-v1:0) and are cross-referenced to bedrock-models-and-providers.
  • Parameter counts for MoE models are written active / total (e.g. “17B active / 109B total”) because that distinction governs both serving cost and memory footprint.
  • Pricing, where quoted for managed hosts, is in USD per million tokens (MTok). Where multiple \$ symbols appear on the same line they are backslash-escaped to avoid Obsidian MathJax interpretation.
  • “Per ai.meta.com 2025-04” or “per llama.com 2026-05” tags a claim sourced from Meta’s official blog/site as of the cited date; benchmark numbers are flagged as time-stamped, contested claims because LMArena-style scores have been shown to depend on which checkpoint was submitted (see the Maverick “experimental chat version” episode in the deep note).
  • Originators and years are cited inline for the architectural primitives (RoPE, GQA, MoE, the iRoPE long-context scheme).
  • Equations, where they appear, are in fenced code blocks (the repo’s house KaTeX rule — never $-delimited inline math).

Sources read while building this sub-library (2026-05-30 pass)

  • ai.meta.com/blog/llama-4-multimodal-intelligence/ (Llama 4 herd announcement — Scout/Maverick/Behemoth sizes, experts, context, codistillation)
  • www.llama.com/ + www.llama.com/llama4/license/ + www.llama.com/llama3_1/license/ (Community License text, 700M-MAU clause, acceptable-use policy)
  • ai.meta.com/blog/meta-llama-3-1/ (Llama 3.1 405B/70B/8B, 128K context, multilingual)
  • ai.meta.com/blog/llama-3-2-connect-2024-vision-edge-mobile-devices/ (Llama 3.2 vision 11B/90B + edge 1B/3B)
  • github.com/meta-llama/llama-stack + github.com/meta-llama/llama-stack-apps (Llama Stack API/agent layer)
  • github.com/meta-llama/PurpleLlama + www.llama.com/llama-protections/ (Llama Guard, Prompt Guard, Code Shield)
  • meta-llama.github.io/PurpleLlama/LlamaFirewall/ + arxiv.org/abs/2505.03574 (LlamaFirewall — PromptGuard 2, AlignmentCheck, CodeShield; May 2025)
  • groq.com/blog/...llama-3-3-70b... + Llama 3.3 model card (3.3 70B matching 3.1 405B)
  • [[Compute/Tier3/llm-landscape]] (the in-repo cross-vendor catalog, refreshed 2026-05-30 — reconciled for consistency)

Where Meta’s official material is silent but behavior is observable (e.g. real long-context quality vs the on-paper 10M number, the gap between LMArena-submitted and released-weight checkpoints), entries are labelled “Observed / contested — verify” so a future reader knows to re-check.