Dograh

Self Hosted LLM Guide: Deploy, Compare, and Run in 2026

Self Hosted LLM Guide: Deploy, Compare, and Run in 2026
TechnicalNovember 27, 2026·11 min read

Self Hosted LLM Guide: Deploy, Compare, and Run in 2026

Pritesh Kumar
Pritesh Kumar·Co-founder, Dograh AI

Building Dograh, the open-source alternative to Vapi. OSS and Voice AI. Exit founder and YC alum.

A self-hosted LLM is a language model whose weights and inference server run on infrastructure you control, such as a GPU server, a Kubernetes cluster or your own cloud account, instead of a vendor's endpoint. Downloading the weights is the easy part. Running it means sizing memory, serving many sessions at low latency, securing the endpoint and owning uptime.

Key Takeaways

  • The weights fit long before the KV cache and concurrent calls do.
  • Report p95 time to first audio, never average throughput on its own.
  • A private endpoint still needs authentication, TLS, patching and a named owner.

Pulling the weights takes an afternoon, while the service around them takes a quarter. We cover the deployment boundaries, memory sizing, serving stacks, cost and security of a self-hosted model for phone calls, then show how Dograh, the open-source AI voice agent platform we build, runs calls around it.

What a self-hosted LLM actually means

Self-hosting means the weights and the inference stack run on infrastructure you control, from a laptop or one GPU server to a Kubernetes cluster or a private cloud account. Downloading the weights does not give you a service. Something has to load the model, schedule requests against it and restart it after a crash, and someone has to patch it and watch it at 3 a.m. The inference server manages context length, batching and the key-value cache, so concurrency is won or lost there, and in a voice system the application on top decides when to speak.

Model size explains why this became an infrastructure job. OpenAI's largest GPT-2 held 1.5 billion parameters and trained on roughly 40 GB of text, while GPT-3 reached 175 billion parameters, about 117 times as many, and used roughly 570 GB, as this review of large language model history records. Teams self-host for data residency, customization, independence from a provider's terms or lower cost at steady high volume.

Choosing a deployment boundary

Pick the boundary before you pick the GPU. It decides who patches, who answers an alert at 2 a.m. and how much of the stack you can show an auditor.

OptionBest forOperational loadMain constraint
Local workstationDemos, prompt work and single-user testsLowSmall model size, short context and no uptime guarantee
Single GPU serverSmall production voice lines and pilotsMediumOne failure domain and limited concurrency headroom
Kubernetes with vLLMMulti-tenant production and autoscalingHighGPU scheduling, networking, storage and upgrade complexity
On-prem GPU clusterRegulated high-volume workloadsHighPower, cooling, rack density and capacity planning
Customer-controlled private cloud (your VPC)Isolation without owning hardwareMedium to highEgress rules, IAM discipline and GPU availability
Managed private cloudTeams without inference operations staffLow to mediumLess direct control over upgrades and incident response

A single GPU server is where most voice pilots should begin, because it is easy to benchmark, though redundancy means buying a second box. Choose the smallest boundary that meets your data residency rule and your peak concurrency, then run your latency test there. If the model shortlist is still open, our comparison of open-weight LLMs for voice agents covers tool calls and speed, which matter more on a phone line than general chat quality.

Dograh

Open Source Alternative to Vapi / Retell

Self-hosted voice agent platform — no per-minute fees

dograh-hq/dograh

Star on GitHub

Sizing GPU memory and quantization

Parameter count is the first number in a sizing decision and the least useful one on its own. At FP16 the weights take roughly two bytes per parameter, so a 7B model needs about 14 GB before the runtime, the context or concurrent sessions. Quantization closes much of that gap. In an evaluation of quantized code models, 4-bit quantization cut CodeLlama 7B from 13.48 GB to 4.00 GB, roughly 70% less memory, while Python MultiPL-E pass@1 moved only from 29.8% to 29.1%.

Model classFP16 weights4-bit weightsPlanning GPU memoryTypical fit
7BAbout 14 GBAbout 4 GB24 GB for production headroomSmall voice agents, classification and extraction
13BAbout 26 GBAbout 7 to 8 GB48 GB or two 24 GB GPUsBetter reasoning with moderate concurrency
34BAbout 68 GBAbout 18 to 20 GB80 GB GPU or multi-GPUComplex tool use and higher quality demands
70BAbout 140 GBAbout 35 to 40 GBMultiple 80 GB GPUsHigh-end reasoning where the latency budget allows

Every row understates the card you need, because the key-value cache grows with prompt length and concurrency. A 7B model that fits easily in 24 GB at 4-bit can still run short of KV cache memory at ten concurrent calls carrying long transcripts. The server then makes requests wait or recomputes them, and the agent's replies stall. Start with the smallest model that passes your task evals and benchmark it at your target context length and concurrency with real transcripts. A small 4-bit loss is fine for classification and unacceptable for complex tool use. Our guide to GPU sizing for self-hosted voice agents works this method through for concurrent calls.

Serving a model inside a voice agent

A voice agent is a chain, and the model is one link in it. Audio arrives through telephony, turn-taking decides whether the agent should wait or respond, speech-to-text produces a transcript, the language model writes a reply and text-to-speech turns it into audio. The slowest link sets what the caller hears.

A five-step comic of one turn on a phone call. In step 1 a caller speaks and audio arrives by phone. In step 2 an ear and a speech-and-silence strip show turn-taking deciding to wait or reply. In step 3 a speech-to-text box turns the words into a transcript. In step 4, highlighted, a server rack with a GPU card runs your LLM, which writes the reply. In step 5 a loudspeaker plays the reply back to the caller. A line at the bottom says measure the whole turn before you tune the GPU.
A fast model cannot hide a slow link elsewhere in the chain. Measure p95 time to first audio across the whole turn before you tune the GPU.

The research behind vLLM reports 2 to 4 times higher serving throughput than earlier systems with no change in model accuracy, credited to managing key-value cache memory in pages, as this Berkeley EECS report on efficient LLM serving explains. That suits phone traffic, where calls start and end at different moments and each turn is a short burst of tokens. For production GPU serving, vLLM or SGLang handle high concurrency with continuous batching, and llama.cpp or Ollama fit single-user and edge installs. Hugging Face Text Generation Inference is now in maintenance mode with its repository archived, so start new deployments on vLLM or SGLang.

Test each against a replay set from your own call recordings, with interruptions, tool calls and your peak concurrency. Aggregate throughput hides a bad p95, and p95 is the delay one turn in twenty runs past, so report p95 time to first audio. Speech-to-text deserves the same test on your own recordings. For a view of the wider market, this roundup of top speech to text tools compares dictation, meeting transcription and media editing apps, which are built for people typing by voice rather than for phone agents.

Finding the cost break-even per call

Break-even is a per-call figure, set by whether self-hosting costs less per resolved call than your current endpoint at your concurrency and uptime target.

Cost lineWhat to countCommon omission
GPU or serverPurchase or rental, depreciation and refresh cycleAssuming the GPU runs at full utilization
Power and coolingRack power, cooling capacity and electricity rateTreating power as part of the cloud bill
RedundancyFailover GPU, spare capacity and load balancingSizing for average load instead of peak calls
StorageRecordings, transcripts, logs, embeddings and backupsRetention growth after the pilot
NetworkingEgress, private links and telephony media streamsData transfer between services
ObservabilityTracing, QA, log storage and alertingDebugging cost during incidents
OperationsPatching, upgrades, on-call and incident responseEngineering time after launch
Security and complianceAccess control, scanning, audit logs and reviewsProving the boundary during audits
Model and speech providersAPI keys or self-hosted STT and TTS capacityVoice-specific latency and quality tuning

Utilization decides most verdicts. A GPU at half load doubles its effective cost per token, and voice traffic is quiet overnight, so size self-hosted capacity for the steady base and let a managed endpoint absorb the peaks. The McKinsey research on open source in the age of AI, run with the Mozilla Foundation and the Patrick J. McGovern Foundation, found that open-source AI tools lead on cost benefits while proprietary tools reach value faster. The Congressional Research Service report on data center energy notes projections that U.S. data center energy use could double or triple by 2028, reaching up to 12% of U.S. electricity.

Take a clinic running 10 concurrent lines for 8 hours a day, 20 days a month, with a 3-minute average call. If all ten lines stay busy the whole time, that is about 32,000 calls and 96,000 call minutes a month. Divide monthly infrastructure plus operations by 32,000 and compare the result with the fully loaded managed cost per call. In voice the language-model bill is often the smallest line, since speech recognition, speech synthesis and telephony can each cost more, so run a two-week pilot on real calls before committing a budget.

Join the Dograh Community

Dograh is an OSS alternative to Vapi. Join our Slack community for queries, releases, best practices & community interactions.

Security work you take on

Keeping prompts inside your network cuts third-party exposure. It does not give you authentication, TLS, egress control, patching or an audit trail. An empirical study of publicly reachable LLM services identified 320,102 public-facing LLM services across 15 frameworks, a sign of how often a model download gets treated as a finished deployment. Voice widens the surface, since telephony webhooks, media streams and speech services carry data beside the model endpoint.

Keep the inference endpoint on a private network or behind an authenticated gateway, give each service its own scoped token, run TLS between every hop and restrict egress to an allowlist. Patching needs a named owner and a schedule, logs should be append-only, and a backup only counts once someone has restored it. The DevArmor breakdown of agentic AI risks maps the OWASP Top 10 for LLM applications onto agent stacks and is a good list to hand a reviewer.

Call recordings and transcript retention raise residency questions of their own, which our voice AI data security guide covers setup by setup. Self-hosting supports compliance, and no diagram makes it a certification. Before you buy hardware, write down which fields are regulated, confirm the model's license allows commercial use and name who answers at 2 a.m.

Running the call around your model with Dograh

Dograh is the orchestration layer that runs the call flow, tools and telephony, and the speech and language models are a separate layer you choose. For the language model, the platform connects to OpenAI-compatible endpoints such as Ollama and vLLM, so the server you sized above plugs in as a provider. Self-hosted speech-to-text and text-to-speech connect through Speaches, an OpenAI-compatible server, so open models such as Whisper and Kokoro can run on your own hardware as well. Turn-taking, tool calls and transfers to a person stay in Dograh whichever language model you pick. Voicemail and call screening handling on outbound calls needs separate speech and language models rather than a realtime speech-to-speech model.

Named model configurations let one agent point at your vLLM server while another uses a hosted model, so you can compare both on the same replay set. In BYOK mode a backup LLM can take over if the main model errors or goes quiet past a set time, which covers the single-server failure domain. Once Langfuse tracing is set up, each call's trace goes there, and pointing it at a Langfuse instance you host keeps prompts and transcripts inside your perimeter.

The platform itself runs without a GPU. The Docker setup downloads a compose file and a starter script that brings up the API, the UI, PostgreSQL, Redis and MinIO, and a remote server needs at least 8 GB of RAM and 4 vCPUs. A self-hosted install runs 10 concurrent calls by default, which you can raise with DEFAULT_ORG_CONCURRENCY_LIMIT.

Running the platform on your own servers carries no per-minute platform fee, though servers, model keys and phone minutes still cost money, and your team looks after the database and upgrades. Support comes from the open-source community, with custom SLAs on Enterprise. If you would rather not run it yourself, Dograh Cloud hosts it for a 1¢-a-minute platform fee. Either way, Dograh keeps its code open, so your security team can read how calls are handled before the first one crosses your boundary.

Glossary

KV cache
Memory the inference server holds for each active session's attention keys and values, growing with context length and the number of concurrent calls.
Quantization
Storing model weights at lower precision, such as 4-bit instead of 16-bit, to cut GPU memory at a small quality cost that depends on the task.
Continuous batching
A serving method that adds and removes requests from the running batch as tokens are generated, so a new call joins without waiting for others to finish.
Time to first audio
The delay between a caller finishing speaking and the first sound of the agent's reply, covering turn detection, transcription, the model and speech synthesis.

Frequently Asked Questions

Built with Outrank tool

Get started with Dograh

Build, deploy, and scale AI agents with Dograh. Join the community of developers building the future.