Skip to content
Series
9 posts

Self-Hosted Inference

The trade-offs of running your own inference service: hardware, model-serving frameworks, cost, and operations, weighed against just calling a cloud API.

Series guide

Self-Hosted Inference Overview: When Running Your Own Models Makes Sense

The key question in self-hosted inference isn't how fast the engine is — it's your GPU utilization. A fully saturated A100 costs ~$0.70 per million output tokens; at 10% utilization that becomes $7, more than most cloud APIs. This overview maps seven tools across three layers to help you decide which layer you need.

vLLM: The Default Choice for Self-Hosted Inference — and When It's Over-Engineering

vLLM is the de facto standard for self-hosted LLM inference (97,383 GitHub stars, verified 2026-11-23), built on managing the KV cache the way an OS manages paged memory. But the selection question isn't how fast it is — it's your GPU utilization. Using Red Hat's measured 793 output tokens/second, a fully saturated A100 costs roughly $0.70 per million output tokens; at 10% utilization that becomes $7, more than most cloud APIs.

TGI: HuggingFace's LLM Inference Server, and Why It Entered Maintenance Mode

Text Generation Inference (TGI) is HuggingFace's own LLM inference server, built in Rust and Python. It pioneered continuous batching and Flash Attention in open-source inference engines. It entered maintenance mode in December 2025 and the GitHub repository was archived in March 2026; HuggingFace recommends migrating to vLLM or SGLang. TGI still matters: it defined the architectural baseline that successor engines inherited, and many HuggingFace Inference Endpoints still run it.

TensorRT-LLM: NVIDIA's GPU-Only LLM Inference Engine, and Why It Dropped the Compile Step

TensorRT-LLM is NVIDIA's open-source LLM inference library (Apache 2.0). It pushes NVIDIA GPUs to their limit with NVIDIA's own CUDA kernels, FP8/NVFP4 quantization, in-flight batching, and multi-dimensional parallelism. It used to require compiling the model offline into a TensorRT engine; the PyTorch architecture became the default in 1.0, and version 1.3 (November 2026) removed the TensorRT backend entirely, so it now loads Hugging Face weights directly, like vLLM. The constraint that has not changed: NVIDIA GPUs only.

Trying vLLM on a Free Google Colab T4: See What an Inference Engine Does in 15 Minutes

Mainline vLLM doesn't support Mac GPUs (Apple Silicon only has the community vLLM-Metal plugin), but Colab's free T4 (compute capability 7.5, exactly vLLM's minimum) can. Serve the 0.6B Qwen3 as an OpenAI-compatible API with vllm serve, fire 8 requests at once, read /metrics, and you can watch continuous batching happen.