Self-hosted AI means running open-weight models — Llama, Qwen, Mistral, DeepSeek and similar — on infrastructure you control, served through an inference engine such as vLLM, Text Generation Inference or llama.cpp, instead of calling a hosted provider's API. The models are free to use; the serving, tuning and operating are not.
The honest starting position is that self-hosting is a scaling optimisation, not a starting strategy. Teams that begin self-hosted usually spend their first months solving infrastructure problems instead of finding out whether the AI feature is useful at all. Building against an API first, measuring real token consumption, and then deciding is almost always the cheaper path — and it leaves a working baseline to compare quality against when you do migrate.
The quality gap has narrowed enough to change the conversation. Current open-weight models sit within roughly five to ten percent of frontier hosted models on most general tasks, which is close enough that for well-defined, narrow work — classification, extraction, summarisation, routing — the difference frequently does not matter. It still matters for complex reasoning, long-context work and reliable tool use, so the model choice follows the task rather than the benchmark table.
Where self-hosting is not a cost decision at all is data residency. Regulated healthcare, financial and legal work sometimes cannot send content to a third-party API under any commercial terms, and government or defence contracts may require processing inside a specific jurisdiction or an air-gapped environment. In those cases the economics are irrelevant — the question is only whether the workload can be served well enough on infrastructure you control.
The tooling has matured enough that serving a model is no longer the hard part. Ollama handles local download and management across operating systems and is the fastest route to a working prototype. vLLM is the production default, built for throughput and memory efficiency under real request loads. llama.cpp runs almost anywhere including CPU-only hardware, which matters for edge and cost-constrained deployments. LocalAI packages an OpenAI-compatible API into a container, so existing application code often works unchanged.
Around those sit the interfaces and gateways that make a deployment usable by people rather than scripts. Open WebUI provides a browser interface close to what staff already expect from commercial chat tools. AnythingLLM adds document indexing, vector storage and multi-user workspaces. LM Studio suits desktop evaluation when you are still choosing a model. LiteLLM is worth knowing about regardless of hosting decision: it maps one OpenAI-compatible interface onto many providers, self-hosted or cloud, which is exactly the provider boundary that keeps a migration cheap later.