llama.cpp Local LLM Hardware & Setup Guide
The baseline single-user and power-user engine across NVIDIA CUDA, Apple Metal, AMD ROCm/Vulkan, Intel SYCL, and CPU-only machines. Supports fine-grained --n-cpu-moe offload, Q8_0/Q4_0 KV cache, and --jinja --cache-reuse for Coding Agents.
Supported Hardware Backends
CUDAMetalROCmVulkanSYCLCPU
Supported Quantization Formats
GGUF (Q2–Q8 / IQ / MXFP4)
Where It Shines
- •Heterogeneous multi-GPU rigs (--tensor-split 24,16)
- •Huge MoE models partially offloaded to system RAM (--n-cpu-moe)
- •Local Coding Agents (Claude Code / Cline / OpenCode) with --jinja --cache-reuse 256
Key Trade-Offs
- •Lower aggregate throughput than vLLM under heavy multi-user concurrency (8+ simultaneous requests).
- •Requires explicit -c and -fa flags to unlock long-context memory savings.
Example Launch Command
Customize llama.cpp command in CLI Generatorllama-server -hf unsloth/Qwen3-8B-GGUF:Q4_K_M -ngl 99 -c 32768 --jinja --cache-reuse 256 --flash-attn on --port 8080