5.1The open-weight landscape
What "open" really means for LLMs, how to decode their licenses, and how three years of releases turned open weights from a leak into a frontier.
What does “open” actually mean?
When a lab “open-sources” a language model, what usually lands on Hugging Face is a folder of large files: the parametersParameter (weight)A number inside a model that is adjusted during training. Modern LLMs have billions to trillions of them. (billions of numbers in safetensors files), a config.json describing the architecture, a tokenizerTokenizerThe component that splits text into tokens and maps them to integer IDs (and back)., and a model cardModel cardThe documentation page shipped with a model (usually on Hugging Face): architecture, parameter counts, context length, training data, license, intended use, recommended sampling settings and benchmark results.. That is enough to run the model, fine-tune it, quantize it and build products on it. This lesson calls that open weightsOpen-weight modelA model whose trained parameters are publicly downloadable. This is not necessarily 'open source': training data and code may not be released..
What you usually don’t get is the recipe: the trillions of tokens of training data, the data-cleaning pipeline, the training code and the thousands of decisions made along the way. You can use the model, but you cannot rebuild it, and you cannot fully audit what went in.
The Open Source Initiative drew this line formally in its Open Source AI DefinitionOpen Source AI Definition (OSAID)The Open Source Initiative's definition of open-source AI (version 1.0). Besides freely licensed weights, it requires the complete training and inference code and sufficiently detailed information about the training data. (OSAID 1.0). To count as open source AI, a system must make three things available under open terms:
- Data information: a detailed description of the training data, including where public and third-party data came from, so a skilled person could build a substantially equivalent system.
- Code: the complete source code used to train and run the system, under OSI-approved licenses.
- Parameters: the weights (and, as examples the definition gives, intermediate checkpoints and optimizer state).
By that standard almost every famous “open” model is open-weight, not open source. The clearest exceptions are research-first families such as Ai2’s OLMo, which releases data, code, logs and intermediate checkpoints, and NVIDIA’s Nemotron, which publishes large parts of its training datasets.
A closed model is a bakery: you can buy a slice (an API call), but you never see the kitchen. An open-weight model is a whole cake delivered to your house. You can eat it whenever you like, slice it however you want, add your own frosting (fine-tuning), and nobody watches you eat.
What you don’t get is the recipe (training code) or the list of ingredients and where they were bought (training data). The license is the note taped to the box: “enjoy, resell slices, but if you open a bakery chain with more than 700 million customers, call us first.” Open source AI, in the OSI sense, means the cake and the recipe and the shopping list.
Decoding the license
The license is the most overlooked line on a model card and often the most important. They fall into a few families:
- Apache 2.0. The gold standard of permissive: commercial use, modification and redistribution allowed, plus an explicit patent grant. Used by Qwen3, gpt-oss, Gemma 4 and most Mistral releases.
- MIT. Even shorter, equally permissive, but without an explicit patent clause. DeepSeek moved its models to MIT with R1, and GLM-4.5 and GLM-5 use it too.
- Modified MIT. MIT plus a condition. Kimi K2’s license, for example, requires very large products (over 100M monthly active users or US$20M monthly revenue) to display “Kimi K2” in their UI.
- Community licenses. Meta’s Llama licenses allow commercial use but require a separate license from Meta if your products had more than 700M monthly active users, a visible “Built with Llama”, an acceptable-use policy, and names starting with “Llama” for distributed derivatives.
- Custom licenses with MaaS or attribution clauses. The 2026 wave (Kimi K3, Mistral Large 4, Meta’s Muse Spark Open, Qwen3.8’s 2.4T flagship) is mostly permissive but singles out Model-as-a-ServiceModel-as-a-Service (MaaS)Selling access to a model as a hosted API. Several 2026 open-weight licenses require a separate agreement for MaaS providers above a revenue threshold. providers above a revenue threshold, or requires a “built with” notice.
- Use it in a commercial product: Yes. No revenue or user caps.
- Fine-tune and release your own version: Yes. Mark modified files and keep the license.
- Redistribute the weights: With conditions. Include the license text and any NOTICE file.
- Sell it as a hosted API (MaaS): Yes. Nothing in the license restricts this.
- Show the model’s name in your UI: Yes. Not required. Attribution lives in the notices, not the UI.
- Patent protection: Yes. Contributors grant an explicit patent license (lost if you sue over patents).
Open source? OSI-approved license. The weights are “open source” as far as the license goes, but OSI’s Open Source AI Definition also asks for training-data information and training code.
Watch out: Some vendors add a separate usage policy next to an Apache release. Check the model card as well as the LICENSE file.
A simplified summary for orientation, not legal advice. Licenses change between versions; the LICENSE file shipped with the weights is what counts.
Things to try:
- Compare Apache 2.0 and MIT on “patent protection”. It is the one place where they meaningfully differ.
- Open the Llama license and read the naming rule. A fine-tune you publish has to be called “Llama-something”.
- Open the 2026 custom licenses and notice who the conditions target: hosted-API resellers and giant consumer apps, not individual developers.
Why open weights matter
If the closed frontier models are a bit better, why does anyone care? Five reasons keep coming up.
Research. You cannot study what you cannot touch. Interpretability work, new fine-tuning methods, quantization schemes and safety evaluations all need direct access to weights and activations. Much of what this course teaches about mixture of expertsMixture of Experts (MoE)An architecture in which each token is routed to a few of many 'expert' sub-networks, so total parameters can be huge while compute per token stays small., MLAMulti-head latent attention (MLA)DeepSeek's attention variant that compresses keys and values into a small latent vector per token, greatly reducing KV-cache size. and reasoning training is known in detail because DeepSeek, Moonshot and Alibaba published both weights and technical reports.
Privacy and control. A model running on your own hardware never sends a prompt to someone else’s server. For hospitals, law firms and anyone handling regulated data, that can be the difference between “allowed” and “forbidden”.
Cost. At high volume, serving your own model can be much cheaper than paying per token, especially with sparse MoE models whose compute per token is a small fraction of their size. Open weights also create competition among inference providers serving the same model.
Sovereignty. Governments and companies outside the US increasingly want AI they can host, audit and keep running regardless of another country’s export rules or a vendor’s business decisions.
Fine-tuning. With weights in hand you can specialize a model on your data using methods like LoRA (see fine-tuning with LoRA), distill it into something smaller, or strip it down for a phone. An API gives you at most the knobs the vendor exposes.
The flip side is real too: once weights are released they cannot be recalled, and safety tuning can be fine-tuned away. That tension shapes how labs stage releases, and it is part of why some 2026 releases arrived weeks after their API launch.
A short history: from leak to frontier
Three years took open weights from an accidental leak to models with over two trillion parameters. Explore the releases below, then read the story underneath.
DeepSeek-R1
An MIT-licensed reasoning model matching closed reasoning models on math and code, with the recipe published. The “DeepSeek moment”: open weights caught up on reasoning almost overnight.
2023: the leak and the community. Meta’s LLaMA was released in February 2023 to approved researchers, and the weights leaked within about a week. A wave of community fine-tunes and tools (llama.cpp made it possible to run models on laptops) showed the appetite. Llama 2 in July made commercial use legitimate, Mistral 7B in September showed a small lab could beat bigger models under Apache 2.0, and Mixtral 8x7B in December brought sparse MoE to the open world.
2024: the base-model era. Llama 3 and 3.1 (up to 405B dense parameters) and Qwen2.5 (0.5B to 72B, trained on 18T tokens) became the default foundations for thousands of fine-tunes. Quietly, DeepSeek-V2 introduced MLA and fine-grained MoE, the ideas that would matter most a year later. In December, DeepSeek-V3 arrived: 671B total parameters, 37B active, trained in FP8 for a reported 2.788M H800 GPU-hours.
January 2025: the “DeepSeek moment”. DeepSeek-R1 matched the leading closed reasoning models on math and code benchmarks, shipped under MIT, and came with a paper explaining how reinforcement learning produced the reasoning. The gap between open and closed suddenly looked like months, not years, and every major lab took notice.
2025: everyone goes MoE. Qwen3 (April) brought hybrid thinking to every size from 0.6B to 235B. Kimi K2 (July) reached a trillion parameters and was built for agents. GLM-4.5, MiniMax-M1 and OpenAI’s gpt-oss (its first open-weight LLM since GPT-2) followed. Architecture research went public too: DeepSeek Sparse Attention, Kimi Linear, Qwen3-Next’s hybrid linear attention.
2026: the trillion-parameter wave. DeepSeek-V4 (1.6T), Kimi K3 (2.8T), Qwen3.8’s 2.4T flagship, Mistral Large 4 (about 1T) and Meta’s new Muse Spark Open (816B) pushed open weights past a trillion parameters, almost all with 1M-token context. Licenses diversified at the same time, adding MaaS and attribution clauses. Not everything is open, though: Alibaba’s Qwen4-Max (November 2026) is, per press reports, API-only so far.
How to read a model card
Every one of these releases comes with a model card and a config.json. Here is what to look for, in roughly this order:
- Parameters: total and active. For an MoE, “1T total / 32B active” means memory scales with 1T but compute per token with 32B. Dense models have one number. Some cards also count embeddings or extra modules (DeepSeek-V3’s 685B checkpoint includes a 14B multi-token-prediction module on top of 671B).
- Architecture. Dense or MoE; number of experts and how many are active; attention type (GQA, MLA, sliding window, linear or sparse hybrids). These determine memory and long-context cost.
- Context length. Watch for “native” versus “extended” (via techniques like YaRN), e.g. Qwen3.5’s 262,144 native, extendable to about 1M.
- Training tokens. How much text the model saw (DeepSeek-V3: 14.8T, Qwen3: about 36T). Many 2026 cards no longer disclose this.
- License. See above. Check the LICENSE file, not just the tag.
- Recommended sampling. Reasoning models are often sensitive to temperatureTemperatureA sampling knob that divides logits before softmax. Low values make output more deterministic; high values make it more random. and top-pTop-p (nucleus) samplingSample from the smallest set of tokens whose probabilities add up to at least p.. Qwen3’s card, for instance, recommends temperature 0.6 and top-p 0.95 in thinking mode, and warns against greedy decoding, which can cause endless repetition.
- Chat template and modes. How to switch thinking on or off, how tool calls are formatted (gpt-oss requires its “harmony” format).
- Benchmarks. Useful, but self-reported, and not always comparable across vendors. More on that in comparing open models.
MATH CORNER · optionalWhat a model card tells you about hardware
Two numbers on a model card predict most of the cost of running it.
Memory for weights scales with total parameters and bytes per parameter :
Compute per generated token scales with active parameters. A forward pass costs about 2 FLOPs per active parameter (one multiply, one add):
Worked example: Qwen3-30B-A3B (B, B):
| precision | bytes / param | weight memory | FLOPs / token |
|---|---|---|---|
| BF16 | 2 | ≈ 60 GB | ≈ 6 GFLOP |
| INT8 | 1 | ≈ 30 GB | ≈ 6 GFLOP |
| 4-bit | 0.5 | ≈ 15 GB | ≈ 6 GFLOP |
Compare a dense 32B model: similar memory, but about 64 GFLOP per token, roughly 10× more compute per token. That is why MoE models feel so fast for their size. The catch is that you still need memory for all 30B parameters (plus the KV cache), because any token might route to any expert.
The same arithmetic explains headlines like “gpt-oss-120b fits on one 80 GB GPU”: 117B parameters at roughly 4 bits for the MoE weights (MXFP4) is around 60 GB.
In code
You can read the architecture straight from the config file without downloading any weights:
import json
from huggingface_hub import hf_hub_download
path = hf_hub_download("deepseek-ai/DeepSeek-V3", "config.json")
cfg = json.load(open(path))
print(cfg["num_hidden_layers"]) # 61
print(cfg["hidden_size"]) # 7168
print(cfg["n_routed_experts"], # 256 routed experts
cfg["n_shared_experts"], # 1 shared expert
cfg["num_experts_per_tok"]) # 8 routed experts per token
print(cfg["kv_lora_rank"]) # 512: the MLA latent size
For licenses, the Hub exposes a license tag in the card metadata, but always open the LICENSE file itself: the tag for a custom license (e.g. other or a vendor-specific name) tells you nothing about its terms.
- “Open weights means open source.” Under the OSI’s definition, open source AI also needs the training code and detailed data information. Most famous open models release only weights plus a report.
- “An Apache or MIT tag means no strings attached.” Usually true for the license, but check the model card for separate usage policies, and check that code and weights share the same license.
- “Open models are always a year behind.” Since DeepSeek-R1 in January 2025 the gap on many public benchmarks has been measured in months. Benchmarks don’t capture everything, though, so judge on your own tasks.
- “A 1T-parameter MoE is as slow as a 1T dense model.” Compute per token follows active parameters (32B for Kimi K2), so it generates more like a 30B-class dense model. It still needs the memory of a 1T model.
Check your understanding
Q1.A lab releases weights, inference code and a technical report under Apache 2.0, but not its training data or training code. Under the OSI's Open Source AI Definition, this is…
Q2.Which license difference matters most between Apache 2.0 and MIT for a company worried about patents?
Q3.A model card says 235B total, 22B active. Roughly how much memory do the weights need in BF16, and what drives compute per token?
Q4.You fine-tune Llama 4 Scout and publish the result. What does the Llama 4 Community License require?
Q5.What made DeepSeek-R1 (January 2025) a turning point?
Further reading
- docsThe Open Source AI Definition 1.0 — OSI's definition: data information, code and parameters.
- docsLlama 4 Community License Agreement — Read the MAU cap, naming rule and attribution clause in the original.
- docsKimi K3 License — An example of the 2026 'MIT-style plus MaaS and attribution' licenses.
- docsModel Cards on the Hugging Face Hub — What model cards contain and how their metadata works.
- paperDeepSeek-R1: Incentivizing Reasoning Capability in LLMs via Reinforcement Learning — The paper behind the January 2025 'DeepSeek moment'.
- blogOlmo 3 announcement — What a fully open release (data, code, checkpoints) looks like.