Skip to content
AgenticAIWiki
  1. Learn
  2. Part 5
  3. 28. Open-weight models
  4. 28.1

Lesson 28.1 · 1 of 7 · 5 min read · Reviewed 24 Nov 2026

Open-weight vs closed models

By the end, you can

  • Tell open-weight and closed models apart.
  • Weigh the trade-offs between them.

Two ways to get a model

Closed (API) models Open-weight models
Access API or app; weights stay with the provider Download the weights and run them
Hosting Provider runs it You run it, or pick a host
Data Goes to the provider (or a cloud platform), under their terms Can stay entirely on your machines
Customisation Prompts, tools, retrieval, sometimes provider-run fine-tuning Full fine-tuning and modification
Capability Often the strongest available Wide range; large ones can be strong
Operations None for you GPUs, scaling, updates, security

“Open” comes in degrees

  • Open weightsOpen-weight model: A model whose trained weights are published so you can download, run and fine-tune it yourself.: you get the trained parameters.
  • Open source in the stricter sense also releases training code and often data.
  • Licences vary: some allow almost anything; some restrict commercial use, user counts or certain uses. Read the licence before you build on a model (28.2).

Common reasons to choose open weights

  1. Data must never leave your environment.
  2. You need to run offline or on devices (chapter 30).
  3. Very high volume of a narrow, simple task, where a small tuned model is cheaper.
  4. You need deep customisation (chapter 29).

Common reasons to stay with an API model

  1. You need the strongest reasoning, coding or agentic ability.
  2. You don’t want to operate GPU infrastructure.
  3. You want new capabilities as soon as they ship.

Many teams use both (28.4).

Key points

  • Open-weight models publish their trained weights so you can download, run and adapt them yourself.
  • Closed models, such as Claude, are used through an API or app; the weights stay with the provider.
  • Open weights give control over hosting, data and customisation; closed models usually lead on capability and need no infrastructure.
  • 'Open weights' isn't the same as open source: training data and code may still be private, and licences vary.
Hands-on labRuns in the Playground

Choose open or closed for three projects

Turn each project's hard constraints and preferences into a reasoned choice between an API model and an open-weight model.

You will have: A script that prints a recommendation and the deciding reason for each of three projects.

Steps

  1. Read the three project descriptions as dictionaries of constraints.
  2. Apply hard constraints first: data that must stay on your network, or offline use, means open weights.
  3. Then weigh soft factors: need for top capability and no wish to run GPUs point to an API model.
  4. Print the choice and the single reason that decided it.
  5. Add a fourth project of your own and check the output makes sense.

Done when

  • The hospital project prints open weights because data must stay on site.
  • The coding agent project prints closed API because it needs the strongest ability and no GPUs.
  • Every line names the reason, not just the choice.

Open in the Playground No API key needed.

Starter code (Python)
PROJECTS = {
    "hospital notes": {"data_must_stay": True, "offline": False, "needs_top_ability": False, "has_gpu_team": True, "narrow_high_volume": False},
    "coding agent": {"data_must_stay": False, "offline": False, "needs_top_ability": True, "has_gpu_team": False, "narrow_high_volume": False},
    "ticket tagging": {"data_must_stay": False, "offline": False, "needs_top_ability": False, "has_gpu_team": True, "narrow_high_volume": True},
}

def choose(p):
    # TODO: return (choice, reason). Hard constraints first, then soft factors.
    return "undecided", "TODO"

for name, p in PROJECTS.items():
    choice, reason = choose(p)
    print(f"{name:15} -> {choice}: {reason}")
Show a solution
PROJECTS = {
    "hospital notes": {"data_must_stay": True, "offline": False, "needs_top_ability": False, "has_gpu_team": True, "narrow_high_volume": False},
    "coding agent": {"data_must_stay": False, "offline": False, "needs_top_ability": True, "has_gpu_team": False, "narrow_high_volume": False},
    "ticket tagging": {"data_must_stay": False, "offline": False, "needs_top_ability": False, "has_gpu_team": True, "narrow_high_volume": True},
}

def choose(p):
    if p["data_must_stay"]:
        return "open weights", "data must not leave your network"
    if p["offline"]:
        return "open weights", "it must run offline or on devices"
    if p["needs_top_ability"] or not p["has_gpu_team"]:
        return "closed API", "needs the strongest ability and no GPUs to run"
    if p["narrow_high_volume"]:
        return "open weights (small, tuned)", "a narrow task at very high volume"
    return "closed API", "nothing forces self-hosting, so avoid the operations"

for name, p in PROJECTS.items():
    choice, reason = choose(p)
    print(f"{name:15} -> {choice}: {reason}")
Quick checkA hospital must process notes on machines it fully controls, with no data leaving its network. What does that point to?
How sure are you?
Pick an answer and how sure you are