Skip to content
Back to Home
2023Model

Llama 2: Commercial Open-Source LLM

Meta releases Llama 2, the first commercially usable open-source large language model.

Overview

In July 2023, Meta officially released the Llama 2 series, including 7B, 13B, and 70B parameter versions. Unlike LLaMA, Llama 2 used an open license allowing commercial use. The models were fine-tuned with RLHF, performing better in dialogue and safety. Llama 2's release was a milestone for open-source LLMs, enabling enterprises and developers to deploy high-performance LLMs for free. It drove the development of the entire open-source AI ecosystem, spawning countless applications and derivative models.

Study Notes

Background, mechanics, impact, and key takeaways in one read

About 3 min read

Background & Context

On July 18, 2023, Meta and Microsoft released the Llama 2 family (7B, 13B, 70B) with free commercial use permitted for the first time. Six months earlier the leak of LLaMA 1 weights had accidentally ignited the open-source community, spawning derivatives such as Alpaca and Vicuna and proving the market's hunger for open-weight models, while showing Meta that "open-sourcing by leak" was untenable. Llama 2 answered institutionally: official weights, a commercial-use license, and RLHF-tuned chat versions. It quickly became the substrate of the open ecosystem, with Mistral, Qwen, and countless fine-tunes using it as a starting point or baseline, and the open-versus-closed debate over large models entered its hottest phase.

Key Points

  • 1Released July 18, 2023 in 7B, 13B, and 70B sizes, with free commercial use permitted.
  • 2Pretrained on 2 trillion tokens of public data with a 4096 context window.
  • 3Chat versions tuned with SFT and RLHF, including human feedback and safety red-teaming.
  • 4Weights are open but the license carries limits (special terms above 700M MAU), not fully OSI open source.
  • 5It became the substrate of the open ecosystem and pressured GPT-3.5-class closed products on price.

How It Works

Llama 2's pretraining uses a standard decoder-only Transformer, with the engineering effort concentrated in data and alignment. It trained on 2 trillion tokens of public data, deliberately excluding sites known to contain personal information, with a 4096 context; the 70B model used grouped-query attention for inference efficiency. Alignment came in two stages: supervised fine-tuning on about 27,000 high-quality instruction dialogues, then RLHF with a reward model and PPO; Meta's paper documented the safety process in detail, from red-teaming to harmfulness scoring and the helpfulness-versus-refusal trade-off. Compared with the GPT family, Llama 2's raw capability was not superior, roughly matching GPT-3.5, but it officially delivered the combination of commercial use, local deployment, and fine-tuning, and that combination was the product.

Impact & Legacy

Llama 2 was the institutional starting point of the open-model movement: it turned the gray-market pattern of leaked weights plus community fine-tuning into an officially supported mainstream, spawning tens of thousands of derivatives and a complete open toolchain (vLLM, llama.cpp, quantization) within a year. Commercially, it exerted price pressure on every closed vendor, with GPT-3.5 API prices dropping repeatedly afterward, and the expectation that open models catch up within one generation became industry standard. It also established the license paradigm of "open weights are not open source", fueling continuing debate over OSI definitions and genuine openness. Its limits are equally clear: English-centric data with limited support for languages like Chinese, usage-restrictive license terms, and Meta's more research-first strategy for Llama 3, all showing that openness has always been a strategic variable rather than a moral commitment.

Key Takeaways

  • "Open weights plus commercial license" is itself a product form; users pay for control and cost.
  • License terms like MAU thresholds and naming rules are more precise commercial design than model capability.
  • An open base's value lies not in single-point performance but in letting an ecosystem grow on it.
  • Data-composition biases propagate verbatim into every downstream fine-tune.

Glossary

Open Weights开放权重

Publishing model parameter files for download and fine-tuning, while data, code, and license may remain restricted.

RLHF (Reinforcement Learning from Human Feedback)RLHF

An alignment technique training a reward model on human preferences then optimizing the policy with RL, core to Llama 2 chat.

Grouped-Query Attention (GQA)分组查询注意力

An attention variant where multiple query groups share few key-value heads, saving memory and speeding inference with little quality loss.

Related Links

Related Events