---
title: "06 — Types of AI Models: Open, Closed, Pre-trained, and Self-hosted"
uid: types-of-ai-models
tags: ["closed-source", "self-hosted", "models", "pre-trained", "roadmap:ai-engineer", "open-source", "fundamentals"]
excerpt: "'Open source good, closed source bad' breaks the moment you pick a real model. The three independent axes that actually decide: open/closed, pre-trained/from-scratch, self-hosted/cloud."
date: 2026-08-13T03:28:38+0000
source: https://www.aveshina.my.id/en/blog/types-of-ai-models
---

My model choices used to collapse onto one lazy axis — open source good, closed source bad — and that heuristic broke the moment I had to pick something real. The mental model that unblocks every downstream decision: **the open/closed axis, the pre-trained/from-scratch axis, and the self-hosted/cloud axis are independent.** [1] A model can be open-weight _and_ pre-trained _and_ self-hosted, or closed _and_ pre-trained _and_ cloud-only, or any other combination. Most of my earlier confusion came from conflating these into one fuzzy "open source good, closed source bad."

The framing that finally landed is three separate questions, asked in order:

- **Trained or not?** Am I starting from a pre-trained model, or training one from scratch?
- **Open or closed?** Are the weights available for me to inspect, modify, and deploy — or is the model only accessible through a vendor's API?
- **Where does it run?** On the vendor's cloud, on my own infrastructure, or on a user's device?

Each question has its own tradeoffs, and a model's position on all three determines what I can and cannot do with it.

```figure
<svg viewBox="0 0 720 300" xmlns="http://www.w3.org/2000/svg" class="my-6 w-full max-w-2xl" role="img" aria-label="Three independent axes of model choice. A 2x2 grid with columns open vs closed and rows cloud vs self-hosted, with example chips in each quadrant. Below the grid, a horizontal arrow labelled 'from scratch → pre-trained' showing where a model sits on the training axis.">
  <g font-family="ui-sans-serif, system-ui, sans-serif" text-rendering="geometricPrecision">

    <!-- grid headers -->
    <text x="200" y="24" font-size="11" font-weight="700" fill="#1e1b4b" text-anchor="middle">Open weights</text>
    <text x="520" y="24" font-size="11" font-weight="700" fill="#1e1b4b" text-anchor="middle">Closed (API only)</text>

    <!-- row labels -->
    <text x="50" y="100" font-size="11" font-weight="700" fill="#1e1b4b" text-anchor="middle">Cloud</text>
    <text x="50" y="200" font-size="11" font-weight="700" fill="#1e1b4b" text-anchor="middle">Self-hosted</text>

    <!-- quadrants -->
    <rect x="100" y="50" width="220" height="100" rx="8" fill="#dcfce7" stroke="#16a34a" stroke-width="1.5"/>
    <text x="210" y="78" font-size="10.5" font-weight="700" fill="#052e16" text-anchor="middle">open + cloud</text>
    <text x="210" y="100" font-size="10" fill="#052e16" text-anchor="middle">e.g. hosted Llama,</text>
    <text x="210" y="114" font-size="10" fill="#052e16" text-anchor="middle">DeepSeek, Qwen via API</text>
    <text x="210" y="134" font-size="9.5" font-style="italic" fill="#052e16" text-anchor="middle">weights exist, run by a provider</text>

    <rect x="420" y="50" width="220" height="100" rx="8" fill="#fef9c3" stroke="#ca8a04" stroke-width="1.5"/>
    <text x="530" y="78" font-size="10.5" font-weight="700" fill="#422006" text-anchor="middle">closed + cloud</text>
    <text x="530" y="100" font-size="10" fill="#422006" text-anchor="middle">e.g. GPT, Claude, Gemini</text>
    <text x="530" y="114" font-size="10" fill="#422006" text-anchor="middle">via vendor API</text>
    <text x="530" y="134" font-size="9.5" font-style="italic" fill="#422006" text-anchor="middle">no weights, easiest path</text>

    <rect x="100" y="170" width="220" height="100" rx="8" fill="#e0e7ff" stroke="#6366f1" stroke-width="1.5"/>
    <text x="210" y="198" font-size="10.5" font-weight="700" fill="#1e1b4b" text-anchor="middle">open + self-hosted</text>
    <text x="210" y="220" font-size="10" fill="#1e1b4b" text-anchor="middle">e.g. Llama on your GPUs,</text>
    <text x="210" y="234" font-size="10" fill="#1e1b4b" text-anchor="middle">Ollama on a laptop</text>
    <text x="210" y="254" font-size="9.5" font-style="italic" fill="#1e1b4b" text-anchor="middle">max control, your hardware</text>

    <rect x="420" y="170" width="220" height="100" rx="8" fill="#fee2e2" stroke="#dc2626" stroke-width="1.5"/>
    <text x="530" y="198" font-size="10.5" font-weight="700" fill="#7f1d1d" text-anchor="middle">closed + self-hosted</text>
    <text x="530" y="220" font-size="10" fill="#7f1d1d" text-anchor="middle">— not really possible —</text>
    <text x="530" y="234" font-size="10" fill="#7f1d1d" text-anchor="middle">no weights to run</text>
    <text x="530" y="254" font-size="9.5" font-style="italic" fill="#7f1d1d" text-anchor="middle">category is empty by definition</text>
  </g>
</svg>
```

## Pre-trained models: the starting point for almost everyone

A **pre-trained model** is one that has already been trained on a large dataset by someone else [2]. It arrives with weights that encode general capabilities — language understanding, common knowledge, basic reasoning — and I either use it as-is or fine-tune it for a specific task. Pre-training is the expensive, compute-heavy step; starting from a pre-trained model is what makes AI Engineering accessible to people who don't have GPU clusters.

The key realization: pre-training is the _default_, not the exception. As an AI Engineer I almost never train from scratch. The decision isn't "train or not" — it's "which pre-trained model, and do I fine-tune it." That's why the rest of the roadmap spends so little time on training and so much on choosing, applying, and adapting models.

## Open versus closed: the weights question

The most consequential axis is whether the model's **weights are publicly available** [3].

- **Open-weight (often loosely called "open source") models** publish the trained weights — sometimes the architecture and training detail too. Llama, DeepSeek, Qwen, Gemma, and Mistral's open releases sit here. I can inspect them, modify them, host them myself, and fine-tune them on my own data. The tradeoff is that "open weights" isn't the same as "fully open" — many releases restrict commercial use or don't release the training data and code — but the key capability, _running and modifying the model_, is there.
- **Closed models** keep the weights proprietary. GPT, Claude, and Gemini are the canonical examples. I access them only through the vendor's API. I cannot inspect or modify them, and I depend on the vendor for availability, pricing, and behavior changes.

The honest tradeoff: closed models have historically led on raw capability and are the easiest path to a working feature. Open models give me control, privacy, predictable costs, and the ability to run offline or on my own infrastructure [3]. Neither is universally better; the right choice depends on the constraints of the problem — latency, data sensitivity, cost ceiling, and how much I need to customize.

## Self-hosted versus cloud: where it runs

The deployment axis is partly a consequence of the open/closed axis — closed models can only ever run in the vendor's cloud — but it deserves its own decision because of what it costs and buys [4].

**Self-hosted** means running the model on infrastructure I control: my own GPUs, a rented server, or even a laptop. The payoff is control over data (nothing leaves my network), predictable cost (no per-token API bill), and the ability to run offline. The cost is hardware, ops burden, and usually lower raw capability than the biggest closed models. Self-hosting earns its place when data sensitivity is high, when traffic is high enough that API costs would dominate, or when the model needs to run at the edge.

**Cloud** (vendor-hosted) means calling an API. The payoff is zero ops, elastic scale, and access to the most capable models. The cost is per-token pricing, data leaving my network, and dependence on the vendor's uptime and roadmap. For most early-stage features and most teams, this is the right starting point — the operational simplicity is hard to beat.

## Context isolation: a note on multi-model design

One pattern that cuts across these axes is **context isolation** — keeping different tasks or knowledge domains in separate, focused agents rather than one generalist model trying to do everything [5]. Instead of a single LLM juggling support, sales, and billing, I might run three specialized models (or three fine-tuned variants) each with their own context and data. The point: model choice isn't always "one model for everything." Sometimes the right architecture is several scoped models, each picked for its narrow job.

## How I use this

I run a decision tree in my head before any new feature. First, can I use a pre-trained model as-is? Almost always yes. Second, what are my constraints — is the data too sensitive to leave my network, is the latency budget too tight for a cloud round-trip, is the cost ceiling too low for per-token pricing at my expected volume? Those constraints fix the open/closed and self-hosted/cloud choices. Third, do I need to customize behavior beyond what prompting and retrieval give me — if yes, fine-tuning an open model becomes worth considering. Naming each axis separately is what stops me from defaulting to "the biggest closed model" out of habit, and from romanticizing "open source" when the operational cost of self-hosting would sink the project.

## References

[1] Towards Data Science, "Recap of all types of LLM Agents," 2024. [Online]. Available: [http://towardsdatascience.com/recap-of-all-types-of-llm-agents/](http://towardsdatascience.com/recap-of-all-types-of-llm-agents/)

[2] Y. Liu et al., "Pre-trained Models: Past, Present and Future," Science Direct, 2021. [Online]. Available: [https://www.sciencedirect.com/science/article/pii/S2666651021000231](https://www.sciencedirect.com/science/article/pii/S2666651021000231)

[3] Hatchworks, "Open Source vs Closed LLMs Guide," 2024. [Online]. Available: [https://hatchworks.com/blog/gen-ai/open-source-vs-closed-llms-guide/](https://hatchworks.com/blog/gen-ai/open-source-vs-closed-llms-guide/)

[4] Plural.sh, "Self-Hosted LLM: A Practical Guide for DevOps," 2024. [Online]. Available: [https://www.plural.sh/blog/self-hosting-large-language-models/](https://www.plural.sh/blog/self-hosting-large-language-models/)

[5] BentoML, "Serverless vs. self-hosted LLM inference," 2024. [Online]. Available: [https://bentoml.com/llm/llm-inference-basics/serverless-vs-self-hosted-llm-inference](https://bentoml.com/llm/llm-inference-basics/serverless-vs-self-hosted-llm-inference)

```quiz
Q: The three independent axes for classifying AI models are…
- cost, speed, and accuracy
- trained vs from-scratch, open vs closed, and self-hosted vs cloud
correct: 1
explain: A model's position on each axis is independent. A model can be pre-trained, open-weight, and self-hosted — or pre-trained, closed, and cloud-only — in any combination.

Q: Why is the "closed + self-hosted" quadrant effectively empty?
- because closed models don't release weights, so there's nothing to run on your own hardware
- because self-hosting is always more expensive
correct: 0
explain: Self-hosting requires the weights. Closed models keep weights proprietary, so by definition you can only access them through the vendor's API.

Q: As an AI Engineer, "train a model from scratch" is usually…
- the default starting point
- almost never the right move; you start from a pre-trained model and possibly fine-tune
correct: 1
explain: Pre-training is the expensive step. The AI Engineer's default is to start from a pre-trained model and adapt it, not to train new capabilities from scratch.

Q: The main reason to choose a self-hosted open model over a cloud closed model is…
- self-hosted models are always more capable
- data sensitivity, predictable cost, offline/edge needs, or heavy customization
correct: 1
explain: Cloud closed models usually lead on raw capability and are operationally simpler. Self-hosting earns its place through control, privacy, cost predictability, and customization.

Q: "Context isolation" as an architecture pattern means…
- training one giant model to do everything
- using multiple scoped models or agents, each focused on a specific task or domain
correct: 1
explain: Instead of one generalist, run several focused models with their own context. This reduces interference between tasks and lets each model be picked for its narrow job.
```
