Skip to Content
Self-hostingllama.cpp

llama.cpp: serve GGUF models on CPU and GPU

llama.cpp runs GGUF models on CPUs and supported GPUs, including Apple Silicon. Use its command-line tools for local inference or llama-server for an OpenAI-compatible endpoint. Choose a compatible conversion and leave memory for context and concurrent requests. See the official documentation  for current platform and model support.

When to choose llama.cpp

SignalWhat it means
GGUF weightsQuantized checkpoints tuned for llama.cpp memory profiles
CPU, edge, or Apple SiliconRuns where CUDA serving stacks do not
Minimal dependenciesSingle binary workflow without a full Python serving stack

Use vLLM or SGLang when you need multi-tenant GPU batching at datacenter scale.

Setup and operation

GuideWhat you’ll learn
Start llama-serverOpenAI-compatible server mode
Size memory and GPU offloadContext, layers, and concurrency
Run on Apple SiliconUnified memory and Metal offload

Model-specific deployment guides

Each guide links the actual upstream configuration, explains hardware and checkpoint variants, and includes a first API request. Browse all documented models for other deployment options.

llama.cpp alternatives

ToolChoose when
iwantYou want a documented model name to become a GCP endpoint without assembling VMs, engine flags, and teardown yourself.
vLLMYou manage the GPU host and need continuous batching, prefix caching, and direct control over vllm serve settings.
SGLangYou need RadixAttention prefix reuse, structured generation, or model-specific parsers on hardware you configure.
TGIYou already run Hugging Face Text Generation Inference on Kubernetes and the checkpoint is on the supported-model list.
OllamaYou want local ollama pull ergonomics, IDE chat, and low-ops serving on a single machine.
LocalAIYou need one OpenAI-compatible URL over multiple backends or gallery configurations.

All launch methods: self-hosting hub.

Related reading

Last updated on