# Benchmark Findings > Single run per config (`runs_per_config=1`). Results are point estimates with no averaging — treat variance figures as indicative only. ## Setup | Parameter | Value | |-----------|-------| | Model | Mistral-7B-Instruct-v0.3 | | GPU | NVIDIA GeForce RTX 3070 | | VRAM | 8 GB | | Date | 2026-05-24 | | Runs per config | 1 (high variance — re-run with ≥3 for production numbers) | --- ## Results Summary ### Throughput (tokens/sec) — avg across prompts in category | Backend | Quantization | Short | Medium | Long | |---------|-------------|------:|-------:|-----:| | llama.cpp | Q4_K_M | 73.9 | 74.4 | 76.2 | | HF | 4-bit | 18.7 | 19.1 | 15.7 | | vLLM | awq-4bit | 9.4 | 9.4 | 9.1 | ### Time-to-First-Token p50 (seconds) | Backend | Short | Medium | Long | |---------|------:|-------:|-----:| | llama.cpp | 0.035 | 0.050 | 0.048 | | vLLM | 0.268 | 0.185 | 0.212 | | HF | 0.239 | 0.207 | 0.292 | ### Peak VRAM delta during inference (MB) | Backend | Quantization | Avg | Max | |---------|-------------|----:|----:| | HF | 4-bit | 244 | 287 | | llama.cpp | Q4_K_M | 16 | 57 | | vLLM | awq-4bit | — | — | > vLLM VRAM reporting returned 0 for all runs — its pre-allocated KV-cache pool is not captured by the delta measurement. HF/llama.cpp figures are inference-time deltas above baseline, not total model VRAM. --- ## Key Observations ### 1. llama.cpp dominates on this single-GPU, single-request setup llama.cpp Q4_K_M achieved **~74–76 tok/s**, roughly **8× vLLM** and **4× HF Transformers**. This is the opposite of the expected ranking. The likely causes: - **vLLM's AWQ kernel support on RTX 3070 (Ampere sm_86)** may not be fully optimized. AWQ fused kernels are primarily tuned for Ada/Hopper and newer Ampere variants. - **No batching advantage**: vLLM's strength is continuous batching across concurrent requests. At batch size 1 (our setup), its engine overhead is pure cost with no payoff. - **vLLM startup amortization**: with `runs_per_config=1`, the engine warm-up cost inflates per-prompt latency. - **llama.cpp Q4_K_M** runs natively on the GPU with highly optimized CUDA GEMM kernels that perform well on smaller GPUs. ### 2. vLLM TTFT is not actually bad — it just looks worse than llama.cpp llama.cpp achieved median TTFT of **35–50 ms** across all categories, versus vLLM's **185–268 ms**. However, vLLM's TTFT is consistent and predictable (range ~17–22 ms across medium/long), suggesting the engine is warmed up after the first request. The high TTFT variance on short prompts (0.17s–0.66s) reflects cold-start on the first call. ### 3. HF Transformers beats vLLM on this workload HF 4-bit averaged **~18 tok/s**, 2× vLLM's ~9 tok/s. This is surprising but consistent with vLLM's AWQ kernel issue hypothesis — HF bitsandbytes 4-bit quantization is simpler but has well-tested CUDA kernels across GPU generations. ### 4. VRAM overhead: HF is the heaviest HF reported a **244 MB average** inference-time VRAM delta (peak 287 MB). llama.cpp used a **16 MB average** delta. These are incremental allocations above the model load baseline, not total consumption — the 7B model itself occupies ~4 GB at 4-bit precision on all backends. ### 5. vLLM generated far more tokens than the other backends vLLM long-prompt runs produced 466–982 tokens per response (no apparent `max_tokens` cap enforced), while llama.cpp consistently hit 257 and HF ranged 79–170. This inflated vLLM total latency figures and makes raw latency comparisons unfair — but tokens/sec normalizes for this. --- ## Takeaways - **For single-user, 8 GB GPU inference**: llama.cpp Q4_K_M is the clear winner on both throughput and latency. It requires no server, runs lean, and is well-optimized for Ampere GPUs. - **vLLM's advantage appears only at scale**: concurrent users, high request throughput, or multi-GPU setups. At batch size 1 on an RTX 3070, it underperforms both alternatives. - **HF Transformers** is the best middle ground if you need Python-native integration and aren't running llama.cpp. It's easy to tune and well-supported. - **Re-run with `runs_per_config ≥ 3`** before drawing firm conclusions — single-sample results have high variance, especially on TTFT where engine warm-up dominates the first call. - **Investigate vLLM + fp16 (no AWQ)**: if vLLM's poor result is AWQ kernel-related, a plain fp16 vLLM run (if VRAM allows) would confirm or refute this.