Standard research · Standard sources

Open-source LLM serving stack for a small startup

Completed July 1, 2026

Open-Source LLM Serving Stack for Small Startups: Synthesis Report

Date: July 1, 2026 Scope: Evaluate open-source LLM serving engines (vLLM, SGLang, TGI, llama.cpp, Ollama) for a small startup, covering capability, architecture, TCO, performance, reliability, and developer experience. Key Findings: The gap between prototyping and production is structural; no single tool covers both. A two-tier stack (Ollama for dev, vLLM or SGLang for prod) with a unified gateway (LiteLLM) is the most pragmatic path, but hidden costs and reliability traps demand careful planning.

---

Executive Summary

For a small startup, the open-source LLM serving landscape offers powerful options but introduces a fundamental tension: low friction vs. production throughput. Our recommended stack for most startups:

  • Development & Prototyping: Ollama (single binary, immediate OpenAI API)
  • API Gateway: LiteLLM (unified routing, auth, cost tracking, cloud fallback)
  • Production Serving: vLLM (general purpose) or SGLang (JSON-heavy / agentic workloads)
  • Monitoring: Prometheus + Grafana + DCGM (GPU metrics)
  • Fallback: Hosted open-weight APIs (Together.ai, Groq) for burst capacity or edge cases

Critical thresholds:

  • < 5M tokens/month: Use hosted APIs. Self-hosting is more expensive and complex.
  • 10–50M tokens/month: Self-hosting breaks even if you have ML ops capability (~$600–1,200/mo GPU vs ~$30–80/mo API).
  • > 50M tokens/month: Self-hosting saves 40–70% vs frontier APIs.
  • Concurrency > 10 req/s or bursty traffic: Consider Kubernetes with KEDA scale-to-zero, despite added complexity.

Key risks identified:

  • vLLM OOM regressions (v0.7.x–0.8.x) and static KV cache allocation cause production crashes.
  • SGLang ecosystem maturity is lower; community support and documented failure modes are thinner.
  • Dev/prod output drift between Ollama (llama.cpp) and vLLM (PagedAttention) can mask issues.
  • GPU idle cost from self-hosting can be higher than API costs at low volume.
  • Multi-model on single GPU is not supported; running two engines simultaneously requires separate hardware.

---

2. Core Capability Comparison

CriterionvLLMSGLangTGIllama.cppOllama
Throughput (8B model, A100/H100)~12,500 tok/s (H100, large batch)*~16,200 tok/s (H100, large batch)*~1,600 tok/s~80–100 tok/s (CPU)~41 tok/s (A100)
GPU SupportNVIDIA, AMD, TPU, Trainium, GaudiNVIDIA, AMDNVIDIA, AMD, GaudiAny (CPU, Apple, NVIDIA)Via llama.cpp
CPU InferenceNoNoNoFirst-classYes
Continuous BatchingYes (PagedAttention)Yes (RadixAttention)YesYes (limited)Limited
Structured OutputGood (since v0.8.5)Excellent (XGrammar)GoodSupportedVia engine
Prefix CachingBlock-level hashToken-level radix tree (6.4× RAG gain claimed)StandardN/AN/A
Multi-LoRAYesYes (native)YesNoNo
OpenAI API CompatibleYesYesYesYesYes
Model FormatSafeTensors, AWQ, GPTQSafeTensorsSafeTensorsGGUF onlyGGUF only
Ecosystem MaturityLargest (50k+ stars)Growing (10k+ stars)Maintenance mode (Dec 2025)75k+ stars120k+ stars
Setup Friction (first prod)High (CUDA, memory tuning)High (steeper learning curve)MediumLowVery low

*Throughput numbers are from third-party benchmarks (Particula Tech, Digiteria Labs) using large batch sizes (128+) and FP8. Batch size and quantization significantly affect these values. For realistic single-batch latency, see Section 3.

---

3. Detailed Analysis

3.1 Performance & Latency

  • Throughput: SGLang leads on smaller models (8B) by ~29% over vLLM on H100 (Turion.AI, Apr 2026). On 70B+ models, the gap narrows to single digits. vLLM outperforms TGI by 15–20% and Ollama by ~19× on A100 (Red Hat Developer, Aug 2025).
  • Latency at low concurrency: Ollama (Q4_K_M) provides ~45ms time-to-first-token (TTFT) vs vLLM FP16 ~82ms on single-user scenarios (SitePoint, Mar 2026). Quantization matters more than engine at low load.
  • Tail Latency: vLLM's P99 TTFT can explode under load. At 16 concurrent requests, P99 TTFT jumped 772% (4,607ms → 40,113ms) on H100 (vLLM GitHub Issue #42484, May 2026). SGLang claims 3× lower median TTFT and 10× lower ITL than vLLM with multi-step enabled (SGLang project benchmarks, self-reported).
  • Structured Output: SGLang's XGrammar provides near-zero overhead JSON-mode, critical for agentic workflows. vLLM's structured output has measurable overhead at high batch sizes.

3.2 Reliability & Failure Modes

  • vLLM OOM crashes are the #1 production failure mode (vLLM GitHub Issue #15942, Apr 2025). Versions 0.7.x–0.8.x introduced regressions that crash the server under concurrent load. Workaround: pin to v0.6.1 or tune gpu-memory-utilization and max-model-len carefully.
  • Startup fails on small GPUs: vLLM fails to load even Qwen3-4B on RTX 5080 16GB without manual tuning (Issue #38516). User-hostile for teams without deep GPU knowledge.
  • SGLang maturity risk: Smaller community means fewer battle-tested deployments and slower bug fixes. No major OOM regression documented, but ecosystem less forgiving.
  • Ollama: Reliable for prototyping but throughput collapses under load (>5 concurrent users). No production-grade auth or monitoring.

3.3 Total Cost of Ownership (TCO)

VolumeHosted API (open-weight)Self-Hosted vLLMVerdict
< 5M tokens/month~$5–$30/mo~$150–$400/mo (GPU + ops overhead)APIs win
10–50M tokens/month~$30–$80/mo~$600–$1,200/mo (reserved A100)Self-hosting if ML ops skill exists
100M+ tokens/month~$600–$800/mo~$2,500–$4,000/mo (multi-GPU)Self-hosting cheaper by 40–70%

Hidden TCO factors:

  • GPU idle time: Low-volume startups often waste GPU capacity. Scale-to-zero via K8s + KEDA reduces waste but adds ops cost.
  • Engineering overhead: Initial setup costs $500–$2,000/month in labor (KickLLM). A 3-person team spending 4 weeks on setup is a sunk cost.
  • Spot instance risk: Spot GPUs cut costs 60–70% but 2-min reclaim windows require checkpointing or API fallback.
  • Quantization quality trade-off: INT4 can degrade 5–15% accuracy on reasoning tasks vs BF16.

3.4 Developer Experience & DevOps

  • Ollama: Best for dev. Single command install, auto-GPU detection, immediate OpenAI API. But dev/prod parity is broken when switching to vLLM.
  • LiteLLM gateway: Provides a unified /chat/completions endpoint. Switching backend is a config change. Adds latency (~5ms) and a component to maintain.
  • vLLM production setup: Requires 30+ minutes for first deployment with nginx + auth + monitoring. Needs Python environment, CUDA toolkit, model path, memory tuning.
  • Kubernetes threshold: Most sources suggest K8s overhead pays off above ~3 GPU nodes or >10 req/s. However, for bursty startups (1 req/s → 50 req/s during demos), a single VM can crash; K8s with KEDA scale-to-zero may be worth it earlier.
  • Model behavior drift: Same prompt can produce different outputs between Ollama (llama.cpp) and vLLM (PagedAttention) due to different quantization defaults and sampling logic. This complicates debugging.

---

4. Decision Matrix: Engine Choice

Use CaseRecommended EngineRationale
Prototyping / DevOllamaZero setup, immediate API
Simple chatbot, low concurrency (< 5 req/s)vLLM (standalone, single GPU)Widest model support, largest community
JSON-heavy / agentic / tool callingSGLangXGrammar zero-overhead structured output, radix prefix caching
Edge / CPU / no GPUllama.cppOnly realistic CPU option
High throughput, multi-GPUvLLM or SGLang (with tensor parallelism)Best benchmarks, but monitor OOM risks
Existing TGI userStay on TGI until migration pressure, then choose vLLMTGI in maintenance mode; start planning migration
Bursty traffic / scale-to-zero neededvLLM + K8s (KEDA)K8s overhead justified if burst > 10x base load

---

5. Contradictions & Caveats

  1. Throughput numbers are incomparable across sources due to different batch sizes, quantization levels (FP8 vs FP16), and GPU models. A startup should run its own benchmark on target hardware with representative payloads.
  2. SGLang's 6.4× prefix caching gain is for perfect prefix reuse (e.g., identical chat histories). Real RAG queries see partial reuse; gain may be 2–3×, not 6×.
  3. vLLM stability is source of contention: some agents flag OOM regressions as critical, others ignore them. This is a real risk for startups without dedicated ops.
  4. K8s threshold is based on blog anecdotes, not rigorous load testing. Startups with bursty traffic should evaluate K8s earlier.
  5. TGI maintenance status is confirmed by HuggingFace official docs (March 2026). Agents citing Dec 2025 are consistent with the announcement timeline.

---

6. Practical Recommendations

  1. Start with hosted open-weight APIs (Together.ai, Groq, Fireworks) for initial product validation. This avoids all serving complexity.
  2. When you need self-hosting (data privacy, cost > $2K/mo API), begin with vLLM on a single GPU VM (RTX 4090 for 7B models, A100 for 70B). Use LiteLLM as the gateway to keep API interface stable.
  3. Pin vLLM to version 0.6.1 to avoid OOM regressions. Test newer versions in a staging environment.
  4. For JSON-heavy agent loops, evaluate SGLang in a side-by-side trial with your actual prompts. Its throughput advantage on structured output may justify the narrower ecosystem.
  5. Monitor GPU memory usage (Prometheus + DCGM) and set gpu-memory-utilization 0.85 to leave headroom for burst.
  6. Implement fallback via LiteLLM to hosted APIs when local capacity is exceeded or crashes occur.
  7. Do not assume dev/prod parity; budget time for output differences between Ollama and vLLM during testing.
  8. Re-evaluate Kubernetes when you have sustained >10 req/s or burst >3× average, or when spot instance reclaim becomes frequent.
  9. Avoid TensorRT-LLM unless you have NVIDIA-specific expertise; the compilation step and lock-in outweigh benefits for small teams.
  10. Plan for scaling up hardware – single GPU will not serve > 50 concurrent users. Budget for multi-GPU tensor parallelism or multiple replicas behind a load balancer.

---

7. Next Steps for a Small Startup

  • Month 1: Use Together.ai or Groq for production. Build product around OpenAI-compatible API.
  • Month 2: Set up Ollama locally for offline testing. Implement LiteLLM as gateway to unify API calls.
  • Month 3: If API costs exceed $1,000/mo, provision a single RTX 3090 (or A100) spot instance with vLLM. Pin version, set up monitoring.
  • Month 4–6: Evaluate SGLang for agentic workflows. Run stress tests with representative loads.
  • Month 6+: If concurrency grows >10 req/s or bursty patterns cause downtime, add Kubernetes with KEDA scale-to-zero.

---

8. References (Selected)

  • Red Hat Developer, “Comparing vLLM and llama.cpp performance”, Aug 2025.
  • HuggingFace TGI documentation, maintenance announcement, Mar 2026.
  • vLLM GitHub Issues #15942 (OOM regression), #38516 (startup failure), #42484 (P99 TTFT spike).
  • Turion.AI, “vLLM vs SGLang vs TGI Benchmarks”, Apr 2026.
  • SitePoint, “Ollama vs vLLM vs TGI: Benchmarking”, Mar 2026.
  • Digiteria Labs, “TensorRT-LLM vs vLLM vs TGI on CoreWeave”, Feb 2026.
  • GigaGPU, “Startup LLM deployment blueprint”, May 2026.
  • Markaicode, “vLLM vs Kubernetes: When to add orchestration”, May 2026.
  • AIFoss, “30-minute vLLM production setup”, 2026.
  • SGLang project benchmarks, docs.sglang.ai.

---

This synthesis integrates findings from five research agents and two adversarial critiques. The report is current as of July 1, 2026. Benchmarks and source quality are mixed; independent validation is recommended before committing to a stack.