Meta's Llama-3.1-8B Rewrites What a Small Open Model Can Do
Meta's 8B open-weight model brings a 128K context window, multilingual support, and much stronger tool use to small-scale LLM deployments.
ProTakeaways
- Meta released Llama 3.1 8B, an open-weight model with a 128K context window and multilingual support
- Instruction tuned version jumps to 72.6 HumanEval, 84.5 GSM-8K, and 82.6 API-Bank tool use
- Pretrained on 15T+ tokens with a December 2023 knowledge cutoff, using GQA for cheap inference
- License now permits using Llama outputs to train other models, legalizing distillation workflows
- Hosted API pricing around $0.02/M input and $0.04/M output tokens across providers
- Fits in ~5.5GB at Q4_K_M quantization, runs on a single consumer GPU via vLLM or SGLang
Meta's Llama-3.1-8B is the small sibling in the Llama 3.1 family, and it has quietly become one of the most downloaded open-weight base models on Hugging Face. The release upgrades the previous 8B checkpoint with a 128K context window, native multilingual training, and much stronger tool-calling behavior, all under a license that permits commercial use for most teams. What makes it interesting at 8B scale is the combination of long context, multilingual coverage, and permissive licensing bundled into a model small enough to run on a single consumer GPU.
What actually shipped
The Meta Llama 3.1 collection includes pretrained and instruction-tuned generative models at 8B, 70B, and 405B, all optimized for multilingual dialogue and reported to outperform many open source and closed chat models on common industry benchmarks. The 8B version comes in two flavors on Hugging Face: a base pretrained checkpoint and an instruction-tuned chat model.
The core specifications that matter for deployment:
- 8 billion parameters, dense transformer, BF16 weights
- 128K token context window using Grouped-Query Attention (GQA) for cheaper inference
- Eight officially supported languages: English, German, French, Italian, Portuguese, Hindi, Spanish, and Thai
- Pretrained on ~15 trillion tokens from publicly available sources, with fine-tuning data drawn from public instruction datasets and over 25M synthetically generated examples; data cutoff is December 2023
- Released under the Llama 3.1 Community License Agreement, which allows commercial use
Inside the training run
Architecturally, Llama 3.1 is an autoregressive language model using an optimized transformer, and the tuned versions apply supervised fine-tuning (SFT) followed by reinforcement learning with human feedback (RLHF) to align with human preferences for helpfulness and safety. Nothing in the recipe is exotic. The interesting engineering is the scale and the data mix.
For the 8B specifically, Meta reports 1.46M H100-80GB GPU hours of pretraining, part of a cumulative 39.3M GPU hours across the whole 8B, 70B, and 405B family. In practical terms, the 8B was trained with roughly the same token budget as the 405B, a design choice that Meta credits for pushing small-model quality well past what parameter count alone would predict.
Benchmarks: where the 8B lands
The instruction-tuned 8B shows large jumps in the areas that matter for agent-style workloads. Compared to Llama 3 8B Instruct, the 3.1 version improves substantially on math, coding, and tool use while keeping general knowledge roughly flat.
| Benchmark | Llama 3 8B Instruct | Llama 3.1 8B Instruct |
|---|---|---|
| MMLU (5-shot) | 68.5 | 69.4 |
| MMLU CoT (0-shot) | 65.3 | 73.0 |
| HumanEval (pass@1) | 60.4 | 72.6 |
| GSM-8K (CoT) | 80.6 | 84.5 |
| MATH (CoT) | 29.1 | 51.9 |
| API-Bank (tool use) | 48.3 | 82.6 |
| BFCL (function calling) | 60.3 | 76.1 |
| Nexus (tool use) | 18.1 | 38.5 |
MATH jumping from 29 to 52 and API-Bank from 48 to 83 are the most consequential deltas. On MMLU 0-shot CoT, Llama 3.1 8B scores 73.0, rivaling Gemma 2 9B IT at 72.3, and on GSM8K it hits 84.5, surpassing Gemma 2 9B IT at 76.7. Third-party evaluations broadly agree: the Artificial Analysis Intelligence Index places Llama 3.1 Instruct 8B above average among open-weight non-reasoning models of similar size.
Where it struggles
The 8B is not a reasoning model in the modern sense. GPQA sits at 30.4, below the older Llama 3 8B Instruct score of 34.6, a reminder that the SFT and RLHF passes optimized for tool use and instruction following rather than graduate-level science QA. On MMLU-Pro it lands at 48.3, well behind the 70B at 66.4. For workloads that demand hard multi-step reasoning without external tools, the 8B is the wrong tier.
Multilingual quality also degrades outside the top four European languages. On MMLU 5-shot, Portuguese, Spanish, Italian, and French all sit around 61 to 62, while Hindi drops to 50.88 and Thai to 50.32. Usable, but worth benchmarking on your own data before shipping.
Running it locally or in production
The base checkpoint drops into the standard Transformers pipeline once you have accepted the license on Hugging Face:
from transformers import AutoTokenizer, AutoModelForCausalLM
import torch
model_id = "meta-llama/Llama-3.1-8B"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
model_id,
torch_dtype=torch.bfloat16,
device_map="auto",
)
For production serving, vLLM and SGLang both expose an OpenAI-compatible endpoint with a single command:
pip install vllm
vllm serve "meta-llama/Llama-3.1-8B"
Hosted APIs are cheap if you would rather rent than host. Llama 3.1 8B Instruct costs $0.02/M input tokens and $0.04/M output tokens on OpenRouter, with a 131,072 token context window and up to 16,384 completion tokens. For local inference, the model needs roughly 5.5 GB at Q4_K_M quantization, so it fits comfortably on a 12GB consumer GPU or a laptop with unified memory.
The license fine print
The Llama 3.1 Community License loosens one crucial restriction from earlier Llama licenses: Meta now allows developers to use outputs from Llama models, including the 405B, to improve other models. That legalizes the synthetic-data-and-distill workflow most teams were already running. The only real gating clause is the 700M monthly active user threshold, above which you have to request a separate commercial license from Meta.
Why this release still matters
The 8B is the workhorse tier for on-device assistants, RAG pipelines, and cheap batch jobs, and Llama 3.1 reset expectations for what fits in that budget. Three things changed the calculus:
- 128K context at 8B scale. Long-context serving previously meant paying for a 70B-class model or accepting the quality drop of a heavily quantized larger checkpoint. An 8B with real 128K context makes long-document RAG, code repository analysis, and multi-turn agent traces economically viable on a single GPU.
- Tool use that actually works. API-Bank jumping from 48 to 82 is the difference between a demo and a shippable agent. Combined with the longer window and stronger reasoning, this enables long-form summarization, multilingual conversational agents, and coding assistants that were previously out of reach at this size.
- A stable base for the ecosystem. The 8B has become the reference point downstream teams build on. The Hugging Face page lists over 1,400 fine-tunes and more than 300 quantizations derived from this checkpoint, which is why it keeps appearing at the top of trending charts long after release.
For anyone shipping LLM features on a budget, the 8B remains the default baseline to beat. Newer reasoning-focused small models can outscore it on specific benchmarks, but the combination of long context, real multilingual support, mature tooling, and a license that lets you distill from it into your own model keeps it firmly in the mix.