Table of Contents
🌏 中文版
Ornith 35B-A3B scores 79.0 on SWE-bench, MiniMax M2.5 hits 80.2% — open-source models now match closed-source on coding tasks. But "the model is strong enough" and "I can actually run it" are separated by real decisions: which serving framework, what GPU, how much quantization, and when self-hosting beats API calls. This is the decision guide.
This site already has individual deep-dives on vLLM (in Chinese), Ollama (in Chinese), and llama.cpp (in Chinese). This post doesn't repeat their content — it covers the cross-framework comparison and cost math.
Four Frameworks, Four Use Cases
| Framework | Design Goal | Core Mechanism | Good For | Not For |
|---|---|---|---|---|
| vLLM | High-concurrency production | PagedAttention + continuous batching | Multi-user API serving | Local dev, consumer GPUs |
| SGLang | Prefix-heavy workloads | RadixAttention + radix tree prefix cache | Multi-turn chat, RAG, shared system prompts | Independent-request batches |
| Ollama | One-command model running | Wraps llama.cpp + Docker-style CLI | Local dev, quick model testing | High-concurrency production |
| llama.cpp | Minimal resource inference | Pure C++ + GGUF quantization | Consumer GPUs, CPU, phones, embedded | Multi-user serving (unless using server mode) |
How to Choose
Per the beri.net 2026 inference framework guide, the current consensus is "default to vLLM, switch to SGLang for prefix-heavy workloads":
- Independent requests, high concurrency → vLLM. Largest community (89K+ GitHub stars), broadest model support, most debugging resources
- Multi-turn chat, RAG, shared system prompts → SGLang. Per PremAI benchmarks, SGLang hits 16,200 tokens/sec vs vLLM's 12,500 on prefix-heavy workloads — 29% faster. The gap narrows to 1-4% on independent requests
- Local dev, trying models → Ollama.
ollama run ornith-1.5-9bhandles download, quantization, and server in one command - Extreme resource constraints (12GB GPU, CPU-only, mobile) → llama.cpp or Ollama (which uses llama.cpp under the hood)
Hardware Requirements
Running a model doesn't mean running it fast. Here are the minimum GPU memory requirements for popular open-source models (FP16 full precision vs Q4 quantized):
| Model | Total Params | Active Params | FP16 VRAM | Q4 VRAM | Minimum Hardware |
|---|---|---|---|---|---|
| Ornith 1.5-9B | 9B | 9B | ~18 GB | ~6 GB | RTX 4060 (8GB) Q4 |
| Qwen3-14B | 14B | 14B | ~28 GB | ~9 GB | RTX 4090 (24GB) Q4 |
| Ornith 1.5-35B-A3B | 35B | ~3B | ~70 GB | ~22 GB | A100 40GB Q4 / RTX 4090 Q3 |
| DeepSeek-V4-Flash | 236B | ~21B | ~472 GB | ~140 GB | 2×A100 80GB Q4 |
| Ornith 1.5-397B | 397B | — | ~794 GB | ~240 GB | 4×H100 80GB Q4 |
The MoE trap: Ornith 35B-A3B activates only 3B parameters per token (inference is fast), but all 35B parameters must be loaded into VRAM (memory requirements stay the same). Inference speed approaches a 3B model, but GPU memory needs approach a 35B model.
Quantization Format Selection
| Format | Ecosystem | Quality Loss | Memory Savings | Best For |
|---|---|---|---|---|
| GGUF Q4_K_M | llama.cpp / Ollama | Small (~1-2% perplexity) | ~75% | Consumer GPU default |
| GGUF Q5_K_M | llama.cpp / Ollama | Minimal | ~69% | Quality-sensitive but still memory-constrained |
| AWQ (4-bit) | vLLM / SGLang | Small | ~75% | Production serving, native vLLM support |
| GPTQ (4-bit) | vLLM / SGLang | Small | ~75% | Longest history, most community-quantized models |
| FP16 | All | None | 0% | Default when VRAM isn't a constraint |
| FP8 | vLLM / SGLang | Minimal | ~50% | H100/H200 native support, production recommended |
Rule of thumb: start with Q4_K_M (GGUF) or AWQ 4-bit, benchmark, and only upgrade precision if quality falls short. Most coding tasks see negligible quality loss at 4-bit quantization.
Cost Breakeven Analysis
Self-hosting costs more than GPU rental — there's also engineering time, ops overhead, and idle waste.
Cloud GPU Monthly Costs (August 2026)
| GPU | On-Demand Price | Monthly (24/7) | Source |
|---|---|---|---|
| RTX 4090 | ~$0.65/hr | ~$470 | Hyperstack |
| A100 80GB | ~$1.4-2.2/hr | ~$1,000-1,600 | Thunder Compute, CloudZero |
| H100 SXM | ~$2.2-3.5/hr | ~$1,600-2,500 | Same sources |
API Cost Comparison (per million output tokens)
| Service | Price |
|---|---|
| Claude Opus 5 | ~$75 |
| GPT-5 | ~$60 |
| DeepSeek V4 Flash API | ~$2.20 |
| MiniMax M2.5 API | ~$1.20 |
| Self-hosted A100 (high utilization) | ~$0.70 |
| Self-hosted A100 (10% utilization) | ~$7.00 |
Per our vLLM self-hosting decision guide (in Chinese), the critical variable is GPU utilization. Above 50% utilization, self-hosting almost always wins. Below 10%, it's more expensive than most APIs.
Breakeven rule of thumb: if you consistently consume 100M+ tokens/month and can maintain GPU utilization above 30%, self-hosting starts to pay off. Below that volume, APIs (especially low-cost ones like DeepSeek and MiniMax) are more economical.
Plugging Into Agentic Coding CLIs
Any self-hosted model with an OpenAI-compatible API endpoint works with mainstream agentic coding tools:
# Start vLLM server
vllm serve ornith-ai/Ornith-1.5-35B-A3B --port 8000
# Connect Claude Code
export OPENAI_API_BASE=http://localhost:8000/v1
export OPENAI_API_KEY=EMPTY
# Connect OpenCode (~/.config/opencode/opencode.json)
{
"provider": {
"local": {
"npm": "@ai-sdk/openai-compatible",
"options": { "baseURL": "http://localhost:8000/v1" },
"models": { "ornith-35b": { "name": "Ornith-1.5-35B-A3B" } }
}
}
}
vLLM and SGLang both natively support tool calling (function calling), which is essential for agentic workflows. Ollama supports it too, but with lower performance.
Watch Out For
- Context length ≠ usable context: A model may claim 128K context support, but on consumer GPUs, KV cache memory limits may restrict actual usable context to 8-16K
- Tool calling quality varies widely: Open-source models' tool calling stability still lags Claude / GPT — Ornith and MiniMax handle it relatively well, but general-purpose open models (Llama, Gemma) are prone to format errors
- Batching matters: Single-request speed differences are small, but vLLM's continuous batching can multiply throughput several times in multi-user scenarios. Local dev doesn't need this
- Quantization isn't free: Coding tasks are relatively precision-insensitive, but reasoning tasks (math, logic) degrade noticeably below Q3
References
- vLLM GitHub
- SGLang GitHub
- Ollama Website
- llama.cpp GitHub
- vLLM vs SGLang vs TensorRT-LLM 2026 Guide — beri.net
- SGLang vs vLLM Prefix-Heavy Throughput Benchmarks — GPU Insights
- SGLang 3.8% Gap Analysis — Spheron
- H100 / A100 Cloud Pricing — Thunder Compute
- GPU Rental Pricing Trends — Hyperstack
- H100 vs A100 Cost Efficiency — CloudZero
- vLLM Self-Hosting Decision Guide — this site (in Chinese)
- Ollama Complete Guide — this site (in Chinese)
- llama.cpp Inference Engine — this site (in Chinese)
- Ornith Model Family — this site
- MiniMax Model Family — this site
Loading...