What are open-weight models? Open weights vs open source AI
Open-weight models publish their trained weights but not always the data or code. How that differs from open source AI, and why it matters to builders.

An open-weight model is a model whose trained parameters, the weights, are published for anyone to download, run and usually fine-tune on their own hardware. That is different from open source AI: an open-weight release often ships no training data, no training code, and a license with conditions, while the Open Source Initiative’s definition asks for all three of data information, code and parameters under terms that allow any use. Llama, Gemma, Qwen, DeepSeek, Mistral and OpenAI’s gpt-oss are open-weight; only a few, such as AI2’s OLMo, also publish the data and code that made them.
What do you actually get with open weights?
A folder of files. The big ones hold the parameters, today usually in the safetensors format; the small ones hold the tokenizer, a config describing the architecture, and a model card with the license. What the weights let you do is run inference and keep training. What they do not let you do is see what the model was trained on or reproduce the training run.
The safetensors layout is simple enough to write by hand. The spec: “8 bytes: N, an unsigned little-endian 64-bit integer, containing the size of the header”, then a JSON header mapping each tensor name to its dtype, shape and byte offsets, then the raw bytes. This script builds a two-tensor file that way and reads it back, the way a loader does.
# weights_file.py: what "the weights" physically are. Python 3, stdlib only.
# Writes a tiny file in the safetensors layout, then reads it back the way a loader does:
# 8 bytes of header length (little-endian u64), a JSON header, then raw tensor bytes.
import json, struct, random
random.seed(0)
tensors = {
"embed.weight": ([4, 3], [random.uniform(-1, 1) for _ in range(12)]),
"lm_head.weight": ([3, 4], [random.uniform(-1, 1) for _ in range(12)]),
}
header, blob = {"__metadata__": {"format": "pt"}}, b""
for name, (shape, values) in tensors.items():
data = struct.pack(f"<{len(values)}f", *values) # float32, little-endian
header[name] = {"dtype": "F32", "shape": shape,
"data_offsets": [len(blob), len(blob) + len(data)]}
blob += data
head = json.dumps(header).encode()
with open("tiny.safetensors", "wb") as f:
f.write(struct.pack("<Q", len(head)) + head + blob)
# Read it back.
raw = open("tiny.safetensors", "rb").read()
n = struct.unpack("<Q", raw[:8])[0]
meta = json.loads(raw[8:8 + n])
print("file size:", len(raw), "bytes, header:", n, "bytes")
for name, info in meta.items():
if name == "__metadata__":
print("metadata:", info)
continue
a, b = info["data_offsets"]
vals = struct.unpack(f"<{(b - a) // 4}f", raw[8 + n + a:8 + n + b])
print(f"{name:<15} {info['dtype']} {info['shape']} first values {[round(v, 3) for v in vals[:3]]}")
print("everything the file contains:", list(meta))
Output (Python 3.13.11):
file size: 293 bytes, header: 189 bytes
metadata: {'format': 'pt'}
embed.weight F32 [4, 3] first values [0.689, 0.516, -0.159]
lm_head.weight F32 [3, 4] first values [-0.436, 0.512, 0.237]
everything the file contains: ['__metadata__', 'embed.weight', 'lm_head.weight']
A real checkpoint is the same thing with hundreds of tensors and hundreds of gigabytes of bytes. The last line is the point of the exercise: the file holds names, shapes and numbers. Nothing in it tells you which documents the model read, how they were filtered, or what the reward model preferred. That information exists only if the publisher chooses to write it down somewhere else.
The format also matters for security. The project lists the alternative it replaces, Python pickle, as “Unsafe, runs arbitrary code”; loading a pickled checkpoint can execute whatever the file author put in it. A safetensors loader only parses JSON and copies bytes.
Open weights vs open source AI: what’s the difference?
The Open Source Initiative published the Open Source AI Definition 1.0 on October 28, 2024. It carries over the four freedoms of open source software, to use, study, modify and share the system for any purpose, and says that exercising them requires “the preferred form for making modifications”, which for a machine learning system means three things:
- Data information: enough detail about the training data that “a skilled person can build a substantially equivalent system”, including “a listing of all publicly available training data and where to obtain it.” Unshareable data must be described, not necessarily released.
- Code: “the complete source code used to train and run the system.”
- Parameters: the weights.
Measured against that, most famous open-weight models are not open source AI. They publish the third item and a license. The common gaps:
- No data information. Most releases describe the training mix in a paragraph or not at all.
- No training code. You get inference code; the pipeline that produced the weights stays private.
- Use restrictions. The Llama 3.1 license (July 23, 2024) requires a separate license from Meta for any company whose products had “greater than 700 million monthly active users in the preceding calendar month”, and asks for a “Built with Llama” attribution. A clause that excludes some users fails the “any purpose” freedom.
At the other end, OLMo from AI2 (February 2024) was released “alongside open training data and training and evaluation code”, explicitly in contrast to models that “have only released model weights and inference code.”
In between sit permissive open-weight releases: no data, but a standard license with no user caps. Mistral released Mixtral 8x7B under Apache 2.0, DeepSeek R1 shipped under MIT, and OpenAI’s gpt-oss-120b and gpt-oss-20b are Apache 2.0.
Why do open-weight models matter to a builder?
Data never leaves your infrastructure. From a data-platform and privacy-compliance seat, this is the line I would circle first. With an API, every prompt is sent to a vendor and governed by their retention terms. With weights on your own GPUs, the prompt and the output stay inside your boundary, which turns a long vendor review into an internal one. That was the procurement argument I made when Llama 2’s weights came out, and it has only grown stronger as the models improved.
You can change the model. Weights are the precondition for fine-tuning, LoRA adapters, quantization and distillation. A closed API offers whatever tuning the vendor exposes.
The model does not disappear. A hosted model can be deprecated on the vendor’s schedule. A checkpoint you have downloaded keeps working, so an eval you ran last year still describes the model you run today.
Cost control. You pay for hardware instead of tokens. At high, steady volume that can be cheaper; at low or spiky volume it usually is not.
Size options. Open families ship in many sizes, from phone-sized to frontier-sized. gpt-oss-120b has 117B parameters with 5.1B active and, per its model card, can “run on a single 80GB GPU”; gpt-oss-20b runs “within 16GB of memory.” That range is what makes small language models and local deployment practical.
Where do open-weight models fall short?
You inherit the operations. Serving, scaling, monitoring, patching and GPU capacity become your problem. A hosted API is a lot of engineering you do not have to do.
You cannot audit the training data. For copyright, bias and contamination questions, a weights-only release gives you nothing to inspect. If a benchmark leaked into training, you cannot check.
The license is a contract. Read it like one. User caps, attribution rules and acceptable-use policies differ by family and by version.
Safety tuning can be removed. Anyone can fine-tune a released model, including to strip refusals. That is a policy argument against open weights; for a builder it means the safety behavior of an open model is only what you test and enforce in your own stack.
Weights files are supply chain. A checkpoint from an unknown uploader is untrusted code if it is a pickle and an untrusted model either way. Use the publisher’s official repository and the safetensors format.
What I would do
I would sort candidate models into three bins before benchmarking any of them: fully open (weights, data information and code, like OLMo), permissive open-weight (Apache 2.0 or MIT, like Mixtral, gpt-oss and DeepSeek R1), and restricted open-weight (custom licenses with caps or use policies). For an enterprise deployment I would start with the permissive bin, record the exact license file hash next to the model hash, and pull only safetensors from the publisher’s own repository. Then I would run my own evals, because the model card’s numbers were not measured on my data. If the use case involves regulated or customer data, I would make self-hosted open weights the default and require a reason to send that data to an API.
FAQ
Is Llama open source?
Not by the OSI’s definition. Llama’s weights are downloadable, but the license restricts some users (companies above 700 million monthly active users need a separate license) and the training data and code are not released. The accurate term is open-weight.
What is the difference between open weights and open source?
Open weights means the trained parameters are published. Open source AI, as the OSI defines it, also requires enough information about the training data to rebuild a substantially equivalent system, the complete training and inference code, and terms that allow any use.
Can I use open-weight models commercially?
Usually yes, but it depends on the license. Apache 2.0 and MIT models, such as Mixtral, gpt-oss and DeepSeek R1, allow commercial use with standard conditions. Custom licenses can add user caps, attribution and acceptable-use rules.
Are open-weight models safe to download?
The safetensors format holds only tensors and a JSON header, so loading it does not run code. Older pickle-based checkpoints can execute arbitrary code when loaded. Download from the publisher’s official repository either way.
Sources
- Open Source Initiative, The Open Source AI Definition 1.0 (read 2026-10-31) and release announcement, October 28, 2024
- Meta, Llama 3.1 Community License Agreement, version release date July 23, 2024
- Groeneveld et al. (AI2), OLMo: Accelerating the Science of Language Models, February 1, 2024
- Jiang et al. (Mistral AI), Mixtral of Experts, January 8, 2024
- OpenAI, model cards for gpt-oss-120b and gpt-oss-20b on Hugging Face (read 2026-10-31)
- Hugging Face, safetensors format specification (read 2026-10-31)