Meta's Llama-2-70B Breaks Open the ChatGPT-Class Assistant for Everyone
Meta's 70-billion-parameter open chat model brings RLHF-tuned dialogue to anyone with the compute, closing much of the gap to closed-source assistants.
ProTakeaways
- Meta released Llama-2-70b-chat-hf, the 70B RLHF-tuned chat model in Hugging Face format.
- Pretrained on 2T tokens with 4k context and grouped-query attention for fast inference.
- Uses SFT plus RLHF (PPO and rejection sampling) with over 1M human-annotated examples.
- Scores 68.9 MMLU, matching GPT-3.5 on MMLU and GSM8K per the paper.
- Custom commercial license, gated access, English-only intended use.
- Runs via Transformers, vLLM, SGLang, Ollama, and quantized llama.cpp builds.
Meta's Llama-2-70b-chat-hf is the Hugging Face Transformers port of the largest fine-tuned member of the Llama 2 family, and arguably the single most consequential open-weights release of its generation. The Llama 2 collection spans pretrained and fine-tuned generative text models from 7 billion to 70 billion parameters, and this repository holds the 70B chat variant, tuned for dialogue and converted to the Transformers format. If you have been waiting for an open model that can credibly stand in for ChatGPT in production, this is the one to benchmark against.
Why a 70B chat model matters
Until this release, the pattern was familiar: base open models existed, but the polished, aligned chat variants stayed locked behind APIs. Prior public releases like BLOOM, LLaMa-1, and Falcon matched the performance of closed pretrained competitors like GPT-3 and Chinchilla, yet none were suitable substitutes for closed product LLMs such as ChatGPT, BARD, and Claude, which are heavily fine-tuned to align with human preferences. That alignment step demands significant compute and human annotation, and it is rarely transparent or easily reproducible.
Llama-2-70b-chat-hf breaks that pattern. Across a wide range of helpfulness and safety benchmarks, the Llama 2-Chat models outperform most open models and achieve comparable performance to ChatGPT according to human evaluations. Teams can now host a genuinely competitive assistant on their own hardware, under a permissive commercial license.
Under the hood
Llama 2 is an auto-regressive language model built on an optimized transformer architecture, with the tuned versions using supervised fine-tuning (SFT) and reinforcement learning from human feedback (RLHF) to align with human preferences for helpfulness and safety. The pretraining recipe brings several concrete upgrades over Llama 1:
- Trained on 40% more tokens, with a longer 4k-token context and grouped-query attention for fast inference of the 70B.
- All models trained with a global batch size of 4M tokens.
- Pretraining data cutoff of September 2022, with some tuning data extending later, drawn entirely from publicly available sources plus more than one million new human-annotated examples for fine-tuning.
Most of the interesting engineering lives in the alignment pipeline. Fine-tuning starts with SFT, bootstrapped from publicly available instruction data, before RLHF finishes the job. Meta found that quality mattered more than quantity: third-party SFT data was lacking in diversity and quality, high-quality SFT data improved results, and only about 27,540 annotations were used at this stage.
For the reward-model-driven stage, two algorithms drove iterative fine-tuning: Proximal Policy Optimization (PPO) and rejection sampling. PPO generates one response and evaluates it; rejection sampling generates k responses and scores each one. Rejection sampling was done on the 70B model, with smaller models then fine-tuned on the resulting data. That distillation trick is why the smaller Llama 2 chat variants punch above their weight.
The compute bill
The scale of the training run is a reminder of why so few labs can produce a model like this from scratch. Pretraining consumed a cumulative 3.3 million GPU hours on A100-80GB hardware at a TDP of 350 to 400 watts, with estimated total emissions of 539 tCO2eq, 100% offset by Meta's sustainability program. The 70B alone accounted for roughly 1.72 million of those GPU hours.
How it performs
On academic benchmarks, the 70B pretrained base sets a new bar for open models: 68.9 on MMLU, 37.5 on code (average pass@1 across HumanEval and MBPP), 35.2 on math (GSM8K and MATH average), and 54.2 on AGIEval. The chat variant also moves the needle on safety scores. Llama 2-70B lands close to GPT-3.5 on MMLU (5-shot) and GSM8K (8-shot) and is on par or better than PaLM (540B), though a large gap remains to PaLM-2-L and GPT-4.
The rough shape of what this model is good and bad at:
- Strong at: multi-turn dialogue, instruction following in English, general world knowledge, safe refusals, and serving as a solid backbone for downstream fine-tuning.
- Weak at: non-English tasks (the model card explicitly scopes it to English), matching GPT-4 on hard reasoning and code, long documents beyond 4k tokens, and tool use out of the box.
- Quirks: the RLHF tuning is famously cautious, and over-refusals on benign prompts are a common community complaint.
Running it yourself
Access is gated on Hugging Face and requires accepting Meta's community license, but once approved the model plugs straight into the standard Transformers pipeline. A minimal example:
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("meta-llama/Llama-2-70b-chat-hf")
model = AutoModelForCausalLM.from_pretrained(
"meta-llama/Llama-2-70b-chat-hf", device_map="auto"
)
messages = [{"role": "user", "content": "Who are you?"}]
inputs = tokenizer.apply_chat_template(
messages, add_generation_prompt=True, tokenize=True,
return_dict=True, return_tensors="pt").to(model.device)
out = model.generate(**inputs, max_new_tokens=40)
print(tokenizer.decode(out[0][inputs["input_ids"].shape[-1]:]))
The card also documents one-liner deployment paths with vLLM and SGLang that expose an OpenAI-compatible HTTP API, and quantized builds are available for llama.cpp, Ollama, and LM Studio if you want to fit the weights onto smaller GPUs or a beefy workstation. Chat prompts need a specific format, including INST and SYS tags, BOS and EOS tokens, and precise whitespace and linebreaks, so lean on apply_chat_template rather than hand-rolling prompts.
The license fine print
The Llama 2 Community License permits commercial use with two catches worth knowing. First, if your product had more than 700 million monthly active users at the time of release, you need a separate license from Meta. Second, you cannot use Llama 2 outputs to train other large language models outside the Llama family. Everything else, including fine-tuning, redistribution of derivatives, and hosted inference, is fair game.
What this changes for the field
The accompanying paper is unusually detailed about the RLHF pipeline, reward modeling, and safety tuning, which is arguably as important as the weights themselves. Meta increased safety with dedicated data annotation and tuning, ran red-teaming exercises, employed iterative evaluations, and documented the fine-tuning methodology in depth. Two assumptions this release forces the community to update:
- You do not need a private lab to ship a ChatGPT-class assistant. The recipe is public, the weights are downloadable, and the alignment stack is reproducible.
- RLHF is available to everyone, not only closed labs. The paper effectively hands a working PPO-plus-rejection-sampling pipeline to anyone willing to run it, and the entire post-Llama 2 open-source ecosystem, from Mistral fine-tunes to countless domain-specific chat models, is built on that foundation.
If you are choosing an open backbone for a coding copilot, an internal assistant, or a research testbed, Llama-2-70b-chat-hf is the reference point every subsequent open model gets measured against. It is no longer the ceiling, but it remains the floor of what serious open chat models are expected to do.