Self-hosting a language model: when it is worth it and what it takes
Running a model on your own infrastructure keeps every prompt inside your boundary. It also makes you the operator. How to decide, and what the stack looks like.
By DevOps.ae. Published 27 November 2026. 5 minute read.

There are two ways to use a language model. You can call one that somebody else runs, through their API. Or you can take a model whose weights are published and run it on machines you control.
The first is easier and usually more capable. The second keeps everything inside your own boundary. Which is right depends on a small number of questions, and most of them are about data and operations, not about AI.
Why teams self-host
The data may not leave. This is the reason that settles the matter by itself. If a regulator, a contract or your own policy says certain data stays in a country or inside your network, a model inside that boundary is the straightforward answer. Nothing has to be argued about where a prompt was processed.
Steady, high volume. A provider charges for every token. A GPU costs the same whether it is busy or idle. If you have a constant stream of work, such as classifying every support ticket or summarising every document, owned capacity can be cheaper. If your use comes in bursts, it will not be.
Control over change. A hosted model is updated on the provider's schedule. A model you run changes when you change it. For a process that has been validated, that matters.
Working when the link is down. A plant, a ship or a site with a poor connection cannot depend on an API on the other side of the world.
Why teams do not
Capability. The strongest models are not published. Anthropic's Claude models, for example, are reached through its API or through a cloud platform, and cannot be downloaded. For hard reasoning, long tasks and agents that use tools, that gap is real. For extraction, classification, search and summarising, open-weight models are often enough.
You become the operator. Someone has to serve the model, scale it, patch it, watch it and upgrade it. That work does not go away after the first week.
Idle GPUs. They are expensive and hard to share. A model that is used during office hours leaves its hardware idle for most of the week.
Evaluation is on you. When you swap a model for a newer one, nothing tells you whether your application got better or worse except a test set you built.
The middle path
Before choosing either end, check whether the choice is really that stark.
Most large providers offer their models through the major cloud platforms as well as directly. That can mean the model is called from inside your own cloud account, over private networking, under the same access controls and logging as the rest of your platform. For many data rules that is enough, and it costs far less to run than your own GPUs.
What you need to establish is exactly where a prompt is processed and what is stored afterwards. Get that in writing for the specific model and region, because it varies by both.
What the stack looks like
If you do self-host, there are five parts.
The model. An open-weight model, chosen for the job and for the memory you have. Bigger is not always better: a small model that fits on one GPU and answers in a second often beats a large one that needs four.
The model server. Software that loads the model and answers requests. vLLM is a common choice for serving many users at once. Ollama is simpler and suits a small team or a single machine. Whichever you choose, pick one that offers the API your applications already speak, so that switching between a hosted and a self-hosted model is a change of address.
GPU capacity. Usually nodes in a Kubernetes cluster, with the scheduler set up so that GPU work lands on GPU machines and nothing else does. Decide early how you will scale to zero when nobody is using it.
A gateway in front. Applications should not call the model server directly. A gateway gives each one its own key, its own limit and a record of what it used, and lets you route some requests to a hosted model without the application knowing.
An evaluation set. A few hundred real requests with answers you have judged good. It is the only way to compare two models, or two versions of one, on your own work.
Questions that size it
Answer these before anyone orders hardware.
- How many requests at once, at the busiest moment? Concurrency decides the hardware, far more than the daily total.
- How long are the inputs? Long documents need more memory per request and take longer.
- How fast must it answer? A person waiting in a chat needs the first words within a second or two. A nightly batch does not care.
- What happens when it is down? If the answer is "the business stops", you need more than one server and a fallback.
- Which data, exactly, cannot leave? Often it is a small part of the workload. That part can run in-house while the rest uses a hosted model.
A way to decide
| If this is true | It points to |
|---|---|
| Some data may never leave your network or country | Self-hosting, at least for that data |
| The work is hard reasoning or long multi-step tasks | A hosted frontier model |
| Volume is high and steady all day | Self-hosting |
| Volume is low or comes in bursts | A hosted model |
| Nobody on the team can run GPU infrastructure | A hosted model, or someone to run it for you |
| The site has no reliable connection | Self-hosting |
Many organisations end up with both: a self-hosted model for what must stay inside, and a hosted one for the work that needs the most capability, with a gateway deciding which request goes where.
In the Gulf
Two things are specific to this region. First, check what GPU capacity is actually offered in the cloud region you are required to use: availability differs a great deal from one region to the next, and our cloud regions reference shows which regions are in service. Second, find out which hosted models are served from inside the country at all. If the answer is none, the residency question has already been decided for you.
Both are ways to run an agent in Agentic as a Service.