Llama 2 open weights: the license, the sizes, and the 4k context
Meta released Llama 2 on 18 July 2023 in 7B, 13B, and 70B sizes for research and commercial use. The license lines to read before you download weights.

Meta released Llama 2 on July 18, 2023, free for research and commercial use. The release is weights and starting code for pretrained models and for conversational fine-tunes, in 7B, 13B, and 70B. Microsoft is the preferred partner. The launch post also names the Azure AI catalog, Windows, AWS, Hugging Face, and other hosts.
I am reading that from a privacy and data-platform seat. Open weights are a procurement conversation when the prompt contains data you cannot send to an API. The license is not Apache-2.0. The 4k context is the practical limit beside the legal one. GPT-4, from its March launch, is the closed model already on the table: an 8,192-token API at $30 per million input tokens and $60 per million output tokens, and limited access to a 32,768-token model at $60 and $120 per million. Llama 2 is the copy you run yourself.
What did Meta release on July 18?
The paper separates what was trained from what shipped. 7B, 13B, and 70B are the released weights. A 34B model was trained and reported, and it was not released, “due to a lack of time to sufficiently red team.”
The paper says the pretraining corpus is 40% larger and the context length doubled. Grouped-query attention is on the 70B. Llama 2-Chat is the dialogue tune. On the human evaluations they ran, they say the chat models may be a suitable substitute for closed models. That is their claim about those evals.
Hugging Face’s launch post is the short table. It lists a 4k context and 2 trillion pretraining tokens, written there as 2,000B. Commercial use is allowed under the Llama 2 license. Grouped-query attention is listed for the 70B, matching the paper. 2,000B is the pretraining corpus. 4k is the request. “Context length doubled” is the paper’s comparison with the previous setup. The length available this week is the 4k on the table, for the 7B, the 13B, and the 70B.
Llama 2-Chat is the fine-tune a chat box will call. The pretrained weights are the starting point for a fine-tune you train. Both include starting code. A hosted endpoint on Azure, AWS, Hugging Face, or another named host is an API call. The weights are the path for a prompt that has to stay on hardware you operate.
What does the Llama 2 license say?
The contract is the Llama 2 Community License, release date July 18, 2023. The license is not Apache-2.0. Two sentences do the work, and I would paste both into the review.
“You will not use the Llama Materials or any output or results of the Llama Materials to improve any other large language model (excluding Llama 2 or derivative works thereof).”
That clause is the one I would not skip. A local model can keep a prompt on hardware you control, and the sentence still covers the completion. The parenthesis is the exception: Llama 2, or derivative works of Llama 2. Completions used to improve any other large language model are the use it forbids. Generating Llama 2-Chat answers and folding them into training for a different model is that case. I would have the team name the model they intend to improve before the download starts.
Section 2 is the scale gate: “if, on the Llama 2 release date, the licensee’s (or affiliates’) products had more than 700 million monthly active users in the preceding calendar month, you must request a license, which Meta may grant or not.”
As I read it, the date is July 18, 2023, and the measurement is the preceding calendar month. The products that count are the licensee’s, or the licensee’s affiliates’. Over 700 million monthly active users, you request a license. Meta may grant it, and Meta may not. I would have counsel confirm that month’s count, affiliates included, and file the answer with the license.
Redistribution requires an attribution file. The line it has to carry is: “Llama 2 is licensed under the LLAMA 2 Community License, Copyright © Meta Platforms, Inc. All Rights Reserved.”
I would ship that string as the attribution file. The LLAMA 2 capitalization and the copyright notice are part of the line. The acceptable use policy is incorporated, so it travels with the license. There is no trademark license. California law governs.
How big are the fp16 weights?
The names are decimal billions of parameters: 7, 13, and 70. This table is fp16 only, 2 bytes per parameter. A gibibyte is that byte count divided by 1024 cubed. The script does that sum and stops. There is no KV cache, and there is no optimizer state. It does not download a checkpoint. The 34B model is absent because it was not released.
# weight_bytes.py — fp16 weights only. No KV cache, no optimizer state.
print(f"{'model':<8} {'params':>8} {'fp16 GiB':>10}")
for name, billions in [("7B", 7), ("13B", 13), ("70B", 70)]:
gib = billions * 1_000_000_000 * 2 / (1024 ** 3)
print(f"{name:<8} {billions:>6}B {gib:>10.2f}")
Output (Python 3):
model params fp16 GiB
7B 7B 13.04
13B 13B 24.21
70B 70B 130.39
The 7B weights are 13.04 GiB. The 13B weights are 24.21 GiB. The 70B weights are 130.39 GiB. The diagram sets those files next to the two license clauses.
The boxes are the fp16 footprints. The gate is the 700 million monthly active user clause, and the line under the boxes is the ban on using outputs to improve any other large language model. I would pick a size by whether 13.04, 24.21, or 130.39 GiB fits on hardware I can dedicate. The 34B stays off that list. The script is weights only, so the cache a running server adds is a separate line in the design doc.
Why does 4k context decide whether the prompt fits?
Hugging Face lists 4k. The paper’s doubled context is the comparison they published. 4k is the budget on the models they shipped.
GPT-4, from the March 14, 2023 launch in the system card note, takes 8,192 tokens at $0.03 per 1K prompt tokens and $0.06 per 1K completion tokens, which is $30 and $60 per million. Limited access to the 32,768-token model, about 50 pages, is $0.06 and $0.12 per 1K, which is $60 and $120 per million. OpenAI said long-context quality on that longer model was still being improved. Those are paid calls. Llama 2’s forward pass is the machine you already have, inside 4k.
A prompt that needs 8,192 tokens is past this release, and so is a prompt that needs the 32,768-token model. A prompt that cannot be sent to an API stays off GPT-4 at either window. Open weights cover that case inside 4k. Instructions, the document, and room for the completion share that 4k. Under the line, on hardware you control, the weights match both constraints.
Pretraining tokens are the training run. The request stays 4k on every released size, including the 130.39 GiB file and the 70B with grouped-query attention. Llama 2-Chat and the pretrained checkpoints are both covered by the output sentence.
What I would do
I would keep the answers in the repo, next to the download script.
Name the model you will improve. Serving Llama 2, or fine-tuning a derivative of it, is the exception. Improving any other large language model with the completions is the ban. I would want that name in writing before the weights land on disk.
Check the threshold on the release date. If, on July 18, 2023, the licensee’s products or its affiliates’ products had more than 700 million monthly active users in the preceding calendar month, the next step is a request. Meta may grant the license or not. Under the line, I would still record the check, so a later user count is not treated as this clause.
Fit the prompt in 4k on hardware you control when the text cannot go to an API. The fp16 footprints are 13.04, 24.21, and 130.39 GiB of weights only. Past 4k, if the text is allowed to leave, the March GPT-4 windows are 8,192 tokens at $30 and $60 per million and the limited 32,768 at $60 and $120 per million. Past 4k, if the text has to stay put, this release’s window is still 4k.
I would ship the attribution file with any redistribution, using Meta’s sentence, LLAMA 2 capitalization included. I would keep the acceptable use policy with the license, leave the marks unused, and note California law for counsel. I would test Llama 2-Chat on the dialogues I care about, and treat “may be a suitable substitute for closed models” as their description of the human evals they ran.
Update, 29 October 2026
The later open-weights release to read against this license is DeepSeek R1. R1 shipped under MIT, and its API outputs may be used for fine-tuning and distillation. I would read that grant next to the Llama 2 sentence that bars using outputs to improve any other large language model, and next to the 700 million monthly active user request. The 4k half of this note continues in what a context window is, where a long window is a budget you measure on a real request.