If you need a desktop model API, try Ollama after checking that it supports your model and hardware. If several users will share a GPU, compare vLLM and SGLang under the same model and workload; include Ollama when it meets your deployment needs. For repeated long prompts, test prefix reuse in each candidate. These are conditional starting points for evaluation, with no measured speed ranking.

Review scope: This guide examines official documentation and selected source code. We did not run GPU inference or benchmark these engines. The hardware and workload below are a proposed test plan. There are no measured tokens-per-second, latency, or memory results in this article.

Compare the deployed model, not three names

vLLM, SGLang, and Ollama can all sit between an application and a language model, but an engine name does not identify the weights, quantization, backend, or serving configuration. Ollama’s model definition can specify a model file, template, context size, and generation parameters. vLLM and SGLang also expose configuration that changes how requests are served.[65][5][62]

A comparison of a 4-bit GGUF model in one engine with an AWQ model in another answers a useful question: which deployed stack fits this machine and workload? It does not isolate the engine’s contribution. Record that distinction before calling either result faster.

Swipe or scroll horizontally to view all columns.

Documentation comparison prepared 8 November 2026; no GPU benchmark runs.
Candidate to evaluate Reason to include it What to check before comparing
vLLM Examine paged KV storage and automatic prefix caching for an application with overlapping prompts.[3][1] Exact model/backend support, GPU memory allocation, context limit, scheduling and cache settings.
SGLang Examine prefix reuse and serving behavior with the runtime’s configurable cache and request settings.[63][62] Supported model/backend, memory budget, request limit and cache eviction policy.
Ollama Start with a local model/API workflow and inspect model residency and parallel request behavior.[32] Model tag/digest, template, context, CPU/GPU placement and parallelism.

PagedAttention, RadixAttention, and GGUF are not three competing answers to one architecture question. PagedAttention concerns attention and KV storage.[3] SGLang’s radix cache concerns reuse of shared prefixes.[63] GGUF is a model file format, not a request scheduler.[58] vLLM explicitly labels its original PagedAttention design page historical and says it no longer describes current code.[3] Use it to explain the concept, then inspect the current version’s configuration and behavior. A useful benchmark states which mechanism is active instead of treating those labels as interchangeable.

Fit the model before timing it

Weight memory gives a quick feasibility check. Using a deliberately rough 70-billion-parameter model, one byte per parameter is about 70 GB, or 65.2 GiB. Four bits per parameter is about 35 GB, or 32.6 GiB. Both exceed a 24 GB GPU before KV cache, runtime buffers, and quantization overhead. These are arithmetic estimates, not measurements of a particular model file.

A single RTX 4090 therefore cannot hold that entire hypothetical 70B FP8 weight set in its 24 GB VRAM. CPU offload or another placement strategy changes the system being tested. A nominal 32B model at four bits starts near 16 GB, or 14.9 GiB, for the parameter bits alone; that is not a promise that a chosen artifact, context length, and concurrent workload will fit.

Save the actual weight files and their hashes, model revision, quantization method, tokenizer and chat template. With Ollama installed and a model already loaded, inspect its GPU, CPU, or mixed placement using the documented command:[32]

ollama ps

Record the reported placement with the run. A result that silently moved work to the CPU is not comparable to a fully GPU-resident run without that qualification. This inspection command does not run a benchmark.

Treat Apple Silicon as a separate platform track. Ollama documents Metal GPU support; SGLang has an Apple Silicon runtime using MLX, and vLLM Metal is a plugin with MLX as its primary compute backend.[35][30][27] Do not repeat the blanket claim that vLLM or SGLang cannot run on a Mac. Equally, support for a Mac backend does not establish feature parity or performance for every model. Check the selected backend and version, and never turn an RTX-versus-Mac result into a same-hardware engine ranking.

A measurement plan you can reproduce

The following settings are proposed study choices. They are not an experiment we completed. Download the benchmark protocol ZIP package or the protocol JSON file. The ZIP contains the protocol and a README, with no benchmark client, ready-to-run test harness, or measured results.

Measurement plan: fix weights and workload, isolate cold and warm cache conditions, and retain raw records with the exact environment.
Proposed comparison procedure. This original editorial diagram contains no measured performance results.

Swipe or scroll horizontally to view all columns.

Test dimension Proposed condition What the run must retain
Hardware One NVIDIA GPU track; an optional Apple Silicon track reported separately CPU/RAM, exact GPU or SoC, available memory, OS, driver/backend, power and thermal state
Model The same source model and tokenizer where supported Revision, weight hashes, format, quantization, dtype, template and placement
Input/output Input targets of 512, 2,048 and 8,192 tokens; output target of 256 tokens Actual post-template input tokens and actual generated tokens, including early stops
Load 1, 4, 16 and 32 requests in flight Closed-loop client settings, request timestamps, queue limits and failures
Repetition 10 warm-up requests, then 200 measured requests per cell, repeated independently three times Raw records for every attempt, run boundaries and restart/cache policy
Cache study Cold cache, warm shared prefix, and unrelated-prefix control Saved prompts, cache state and hit counters where available

Start with a model that fits all intended cells. A concurrency level that cannot fit is a failure to report, not a reason to quietly change quantization midway through a chart. A closed-loop test holds the number of in-flight requests steady by submitting a replacement when one finishes. It does not reproduce every production traffic pattern; a later arrival-rate experiment should be identified separately.

Freeze the software too. Record the installed package or commit, container digest when used, startup command, and relevant configuration. A link to a latest documentation page is not a reproducible engine version. Documentation examples may also enable features that your installed version handles differently.

Measure waiting, generation, and failures separately

For an interactive app, record client-observed time to first token (TTFT): the interval from sending the request to the first non-empty generated content. An HTTP header or role-only streaming message is not the first answer. Report a median and p95 alongside the sample count. Measure total completion time separately so a fast opening does not hide a slow full response.

Aggregate output throughput needs a common wall-clock denominator:

aggregate output tokens/second =
    total successfully generated output tokens / full measurement-window seconds

Retain failed attempts and partial responses in separate fields. Dividing each response’s tokens by its own generation time and averaging those ratios does not produce total service throughput under concurrency.

Ollama’s generation response exposes fields including eval_count, eval_duration, prompt_eval_count, prompt_eval_duration, load_duration, and total_duration; its duration fields use nanoseconds.[33] Its server-side generation ratio can help diagnose a request:

server generation tokens/second = eval_count / (eval_duration / 1e9)

That diagnostic ratio is not client-observed TTFT or an aggregate wall-clock result. Keep model-loading time, prompt processing, queueing, and generation distinct. Likewise, a streamed chunk may contain several tokens, so chunk arrival intervals cannot automatically be labeled inter-token latency.

For concurrency, plot latency and throughput together. Keep timeout, HTTP error, out-of-memory, and cancellation counts visible. Ollama explicitly documents parallel request processing when memory permits, queueing, and an overload response when its queue fills.[32] Calling it a single-thread-only server would obscure configuration that the test needs to record. SGLang’s official benchmark documentation includes serving benchmark options; use a common client and equivalent measurement definitions when comparing multiple servers.[29]

Test prefix caching without preloading the answer

Prefix caching can reuse computation for prompt tokens already present in cache. vLLM’s documentation explains that APC reduces prefill work for a matching prefix; it does not reduce the computation of generating each new output token.[1] Its implementation uses block-based prefix caching, while SGLang exposes radix-cache behavior and eviction controls.[2][63]

For a proposed agent workload, save a shared system prefix of roughly 2,000 tokens and give each request a different suffix. Compare a cold run with a warm run and an unrelated-prefix control. Preserve tokenized inputs: matching visible text does not prove the final templates produce identical prefix token IDs.

Warm-up is a common source of accidental cache contamination. A request intended to stabilize the runtime can also preload the exact prefix being measured. Isolate conditions with a documented reset or restart, then perform only the warm-up allowed by that condition. Report how this was done and whether cache hits were actually observed.

Avoid the claim that Ollama can never reuse prefixes across requests. The reviewed source contains cache-related behavior in its llama runner integration and a prefix cache in its MLX runner.[44][45] That source inspection does not establish a universal user-facing guarantee or a measured gain for every model. It does establish that a blanket “no shared cache” assertion is too strong. Identify the active runner, then test it.

An agent may spend much of its time searching, waiting on tools, or producing a long answer. Even a substantial reduction in prefill time may have a modest effect on the whole task. Report the model-call measurements and any complete workflow timing separately. Do not infer a percentage improvement from the presence of a cache feature.

Check the application contract before switching servers

An OpenAI-compatible endpoint can reduce application changes, but compatibility is scoped. vLLM documents supported server APIs, SGLang documents OpenAI-compatible completions, and Ollama lists the API features it implements.[54][61][34] None of those labels proves that every application option, tool-call format, structured-output constraint, streaming event, or error behaves identically.

Before migration, save a small acceptance set from your own app. Include a normal answer, a long prompt, a structured response, and any tool-call behavior the app needs. Check output validity and stop behavior before measuring speed. A server that returns quickly but violates the required schema is not a successful result for that workload.

Keep the service local or access-controlled during evaluation. Model downloads and optional cloud features are separate from where inference runs; Ollama’s FAQ distinguishes local operation and cloud-related settings.[32] The earlier guide to local models versus cloud APIs explains that broader data-flow decision. This article narrows the question to the server and model configuration you actually deploy.

Choose the next test from your constraint

Swipe or scroll horizontally to view all columns.

Your constraint Useful next action Evidence needed for the decision
A desktop app needs a local model API Try the supported Ollama model/backend path and confirm placement. Load/start behavior, valid app responses, memory and interactive latency.
Several users share a GPU service Put vLLM and SGLang through the same model/workload cells; include Ollama if it meets deployment needs. Throughput at an acceptable p95, failure rate, memory and operational effort.
Many requests share a long system prompt Run the isolated cold/warm prefix study for every candidate. Observed cache state, TTFT distributions and complete-task timing if relevant.
A Mac is the available machine Check the exact Ollama, SGLang MLX or vLLM Metal model/backend path before installing. Current support, actual residency, correctness and separately reported Mac measurements.

Choose a latency or capacity target before looking for a winner. If the application needs valid responses within a particular p95, the result is the configuration that meets that target at the required load. Keep the environment manifest, request records, and analysis beside the chart so a future version can be tested against the same question.

Sources

[1] https://docs.vllm.ai/en/latest/features/automatic_prefix_caching — vllm apc
[2] https://docs.vllm.ai/en/latest/design/prefix_caching — vllm prefix design
[3] https://docs.vllm.ai/en/latest/design/paged_attention — vllm paged attention
[5] https://docs.vllm.ai/en/latest/cli/serve — vllm serve cli
[27] https://raw.githubusercontent.com/vllm-project/vllm-metal/main/README.md — vllm metal readme
[29] https://docs.sglang.io/docs/developer_guide/benchmark_and_profiling.md — sglang benchmark md
[30] https://docs.sglang.io/docs/hardware-platforms/apple_metal.md — sglang metal md
[32] https://docs.ollama.com/faq.md — ollama faq md
[33] https://docs.ollama.com/api/generate.md — ollama generate md
[34] https://docs.ollama.com/api/openai-compatibility.md — ollama openai md
[35] https://docs.ollama.com/gpu.md — ollama gpu md
[44] https://raw.githubusercontent.com/ollama/ollama/02480ca2a47153e1f9c31cbe1e05536da97ce1ba/llm/llama_server.go — ollama llama server pinned
[45] https://raw.githubusercontent.com/ollama/ollama/02480ca2a47153e1f9c31cbe1e05536da97ce1ba/mlxrunner/prefix_cache.go — ollama prefix cache pinned
[54] https://raw.githubusercontent.com/vllm-project/vllm/4ba787ec9959e566d3b587a796dff07673324da5/docs/serving/online_serving/openai_compatible_server.md — vllm openai pinned
[58] https://raw.githubusercontent.com/ggml-org/ggml/57e2c2ca2a7cae756b1c4dfafa0cdfef9051d234/docs/gguf.md — gguf spec pinned
[61] https://docs.sglang.io/docs/basic_usage/openai_api_completions.md — sglang openai completions
[62] https://docs.sglang.io/docs/advanced_features/server_arguments.md — sglang server args md
[63] https://docs.sglang.io/docs/advanced_features/radix_eviction_policy.md — sglang radix eviction md
[65] https://docs.ollama.com/modelfile.md — ollama modelfile md

← Back to Benchmarks
Tech Guides
Turn a PDF Into Editable Markdown With Docling ↗