Open-Source vs Closed-Source Modelsthe ecosystem map

Topic 11 of 90Module 1: Foundations4 min read

Last foundation: the landscape you'll build in.

Closed-source (API models): GPT, Claude, Gemini. You send a request over the internet, tokens come back. The weights — the actual parameter files — never leave the lab's servers.

Open-weight models: Llama (Meta), Qwen (Alibaba), Mistral, DeepSeek, Gemma (Google). You download the parameter files themselves and run them anywhere: your Mac, a rented GPU, an air-gapped server.

Closed API models (GPT, Claude, Gemini) trade control for a minutes-to-start setup and usage-scaled cost; open-weight models (Llama, Qwen, Mistral, DeepSeek) trade setup time for owning the weights forever — the pro move is prototyping closed and going open at scale, or routing between both.
Closed API models (GPT, Claude, Gemini) trade control for a minutes-to-start setup and usage-scaled cost; open-weight models (Llama, Qwen, Mistral, DeepSeek) trade setup time for owning the weights forever — the pro move is prototyping closed and going open at scale, or routing between both.

Precision matters on terminology, and sloppy usage will mark you as a beginner: most "open-source" models are really open-weight — you get the trained parameters, but usually not the training data, and often not the full training code. True open-source (data + code + weights, like OLMo from AI2) is rare. Licenses vary too: some are genuinely permissive (Apache 2.0 — Qwen, Mistral), some have restrictions (Llama's community license has clauses about very large companies and usage). Read the license before building a product — this is a real engineering-decision input, not lawyer theater.

The real decision matrix:

FactorClosed (API)Open-weight
Peak qualityUsually highest — frontier models are closedGap has narrowed dramatically; top open models beat last year's frontier
Effort to startMinutes — an API keyHours to days — hardware, serving, ops
Cost shapePer-token, scales linearly with usageFixed hardware cost; near-zero marginal cost per token
Data privacyYour data transits their serversEverything stays on your machines
CustomizationPrompting + limited fine-tune APIsFull fine-tuning, quantization, surgery — anything
ControlModel can be deprecated/changed under youYour weights are yours forever
Latency floorNetwork round-trip always includedCan be local, zero network

How to actually choose (the pattern nearly everyone converges to):

  • Prototype on closed APIs. Fastest way to prove an idea works. Never start a project by setting up GPU infrastructure.
  • Consider open weights when: volume makes per-token pricing painful; data can't leave the premises (healthcare, legal, government — a huge deal for selling AI services in markets with data-sovereignty concerns); you need deep customization via fine-tuning; or you need offline/edge operation.
  • The hybrid is the pro move: a router sends easy, high-volume requests to a cheap small open model and hard requests to a frontier API. Best economics, best quality where it counts.

Strategic note worth internalizing: open-weight models trail the frontier by roughly 6–12 months in capability, and that lag has been shrinking. Meanwhile, for any single well-defined task, a fine-tuned 8B open model frequently beats a giant general API model — a specialist beats a generalist on the specialist's turf, at 1/50th the cost. That sentence is the entire business case for Module 3, and for a large fraction of the paid AI engineering work that exists.

Summary

Closed = rent intelligence through an API; open-weight = own the parameter files. Prototype closed, go open for scale, privacy, or specialization; hybrid routing is often optimal.

Mental model

Restaurant vs kitchen. API = eating out: zero setup, pay per meal, no control over the recipe. Open weights = your own kitchen: upfront investment, then cook unlimited meals exactly your way. Serious food businesses use both.

Mistakes to avoid

  • Building infrastructure before proving the product. Validate with an API in a weekend, then optimize costs.
  • Treating "open-source" licenses as automatically permissive. Check whether it's Apache/MIT or a custom restricted license before shipping.

Exercise

Price a real scenario: a chatbot handling 1M requests/day, 1,500 tokens per request round-trip. Compute monthly cost on a frontier API (look up current per-token prices) vs renting one H100 ($2/hr) running a fine-tuned 8B model at ~1,000 tokens/sec. Then find the break-even request volume where self-hosting wins. This calculation — tokens × price vs hardware ÷ throughput — is one you'll perform for real in any AI product role.


Foundations: complete. You now hold the full picture: text → tokens → embeddings → attention-powered transformer blocks → probability → one token at a time, with learned parameters frozen at inference, in an ecosystem split between rented and owned models.

Two threads I deliberately planted for later: the n² attention cost and the 8× training memory multiplier. Modules 3 and 4 exist almost entirely to fight those two numbers.

Lesson 3 starts Module 2: Datasets & Training — SFT datasets, instruction tuning, preference data, synthetic data, curation, cleaning, formatting. This is where you shift from understanding models to shaping them, and dataset skill is genuinely the highest-leverage, most underrated skill in fine-tuning.