Choosing an open-source inference framework starts with how many people you will serve and what hardware you have — not with benchmark scores. Of the four mainstream options, Ollama and llama.cpp fit one person on one machine, while vLLM and SGLang fit turning a model into a service for many people; pick the wrong direction and everything after is rework. All four are free and open source — the real costs are the GPU, the electricity, and the operations time.
Split first by headcount and hardware
- One person, trying it out on your own machine: Ollama. One command installs it, pull a model by name and start chatting; it runs on Mac, Windows, and Linux, and can fall back to CPU when VRAM runs short — for anyone who just wants it running fast.
- One person, wanting to tune the details: llama.cpp. You work directly with GGUF files, quantization levels, and launch flags; it runs from a Raspberry Pi to a workstation and is the low-level engine Ollama has long relied on — for tinkerers and for unusual hardware.
- A small team, dozens of people sharing: vLLM. Continuous batching plus PagedAttention gives high VRAM efficiency, making it the most common default for a self-hosted API service — for anyone who needs a model as a stable service.
- A small team, with lots of agents or structured output: SGLang. RadixAttention reuses shared prefixes, which saves more when system prompts and tool calls repeat a lot — Is SGLang worth self-hosting? does that math.
| Framework | Learning curve | Hardware | Concurrency | License |
|---|---|---|---|---|
| Ollama | One command | Consumer GPU or CPU | One request at a time by default | MIT |
| llama.cpp | Needs command line and quantization know-how | Almost any hardware | Parallel slots, fits one user | MIT |
| vLLM | Needs a Python environment and GPU drivers | Data-center GPUs mainly | Continuous batching, high concurrency | Apache-2.0 |
| SGLang | About the same as vLLM | Data-center GPUs mainly | Continuous batching, shared-prefix reuse | Apache-2.0 |
Who should stay away — and the alternatives
Do not use Ollama for high-concurrency production traffic: in public benchmarks, at 50 concurrent requests its total throughput is only a small fraction of vLLM's and SGLang's, and queues can stretch to minutes — fine for a prototype, time to switch for production. Likewise, do not install vLLM or SGLang on a personal laptop just to try things out: they need a Python environment, GPU drivers, and multi-GPU parallelism, and the setup cost far outweighs the benefit when Ollama does the job in one command. And do not recommend llama.cpp to a friend who just wants to chat: its strength is control and portability, at the price of tuning everything yourself, with no graphical interface and no out-of-the-box experience. The decision rule is one line: count the people first, then look at the hardware — one person picks Ollama, a tinkerer picks llama.cpp, serving many people picks vLLM, agent-heavy work picks SGLang; and if you have no GPU at all, use a cloud API first instead of rushing into self-hosting.