Velamuvi AIAcademy

Lesson 9 of 11 · The Landscape

Open vs Closed Models

Closed API models vs open-weight models: what open weights mean, licences to check, ways to run them, and the privacy, cost, control and safety trade-offs.

  • 6 min read
  • Intermediate
  • Reviewed
In this lesson you will learn
  • The difference between closed, open-weight and fully open-source models
  • Why the licence of an open model matters
  • The ways to run an open model
  • How to weigh quality, privacy, cost, control and effort

Two ways to get a model

Well-known closed model families include OpenAI's GPT models, Anthropic's Claude and Google's Gemini. Well-known open-weight families include Meta's Llama, Mistral's models, Alibaba's Qwen, DeepSeek, Google's Gemma and OpenAI's gpt-oss. Model names and rankings change quickly; the trade-offs below change much more slowly.

Open weights is not the same as open source

"Open source" in software means the source code is available under a licence that lets anyone use, change and share it. For AI models, the "source" would include the training data and training code, not just the finished weights. Most "open" models publish only the weights.

Read the licence

Open-weight models come with very different licences:

  • Permissive licences such as Apache 2.0 or MIT allow almost any use, including commercial, with few conditions.
  • Custom licences may restrict commercial use, require attribution, set conditions for very large companies, or forbid certain uses.

Before building a product on an open model, check that its licence allows what you plan to do.

How to run an open model

OptionWhat it meansGood for
On your own computerTools such as Ollama, LM Studio or llama.cpp run smaller models on a laptop or desktopLearning, privacy, offline use
On your own servers or cloud GPUsYou run the model on machines you controlStrict data control, high volume, customisation
Through a hosting providerA company runs open models and charges per token, like a closed APIOpen models without managing hardware

The trade-offs

Closed model (API)Open-weight model
Top-end qualityUsually the strongest availableClose behind, sometimes level
Getting startedAn API key and a few lines of codeHardware, setup and maintenance (unless hosted)
Data privacyData is sent to the provider (under its terms)Can stay entirely on your machines
CostPay per token; nothing to runHardware or hosting cost; cheap per token at high volume
ControlProvider can change or retire modelsYou keep the exact version forever
CustomisationLimited fine-tuning, if offeredFull fine-tuning and modification

The program below turns a list of requirements into a rough recommendation.

Try it yourselfPython
# Which kind of model each requirement points towards
favours = {
    "data must never leave our servers": "open",
    "need the very best quality on hard tasks": "closed",
    "want full control and deep fine-tuning": "open",
    "nobody on the team can run GPU servers": "closed",
    "millions of simple requests a day": "open",
    "want new features as soon as they appear": "closed",
}

def recommend(requirements):
    score = {"open": 0, "closed": 0}
    for requirement in requirements:
        side = favours[requirement]
        score[side] += 1
        print(f"  {requirement:42} -> {side}")
    if score["open"] > score["closed"]:
        return "open-weight model"
    if score["closed"] > score["open"]:
        return "closed model through an API"
    return "either: try both on your own test set"

print("A hospital analysing patient notes:")
print("  Recommendation:", recommend([
    "data must never leave our servers",
    "want full control and deep fine-tuning",
    "need the very best quality on hard tasks",
]))
print()
print("A three-person startup building a prototype:")
print("  Recommendation:", recommend([
    "nobody on the team can run GPU servers",
    "want new features as soon as they appear",
]))

Real decisions weigh requirements differently (data rules can be absolute), but listing them like this makes the conversation concrete.

Common mistakes

Practice exercise

Before building on an open model, check its licence. Find the models with permissive licences.

Your solutionPython
licences = {
    "Model A": "Apache 2.0",
    "Model B": "custom licence, no commercial use",
    "Model C": "MIT",
    "Model D": "closed (API only)",
}
permissive = ["Apache 2.0", "MIT"]

# Print the models whose licence is in the permissive list, one per line,
# then a line like: 2 models can be used and modified freely
Knowledge check

A clinic must keep patient notes on its own servers. Which option fits that rule?

Summary

  • Closed models are used through a provider's API; open-weight models can be downloaded and run yourself.
  • Most open models are open-weight, not fully open-source; always check the licence.
  • Run open models locally, on your own servers, or through a hosting provider.
  • Closed: top quality and easy start. Open: privacy, control, customisation and low cost at volume.
  • Many teams use a hybrid of both.

Next: model sizes, memory, quantisation and speed.

Finished reading? Tick it off to track your progress.