Explain what NVIDIA CAGRA buys you over CPU HNSW and the operational catch that decides whether you should reach for it.
CAGRA (NVIDIA's GPU graph-ANN, inside the RAFT library) gives you roughly 5-10x QPS over CPU HNSW at the same recall.
A CPU is like one really smart accountant doing additions one at a time. A GPU is like a stadium full of slightly dumber accountants who can all add at the same time. For vector search, where you need to compute thousands of small dot products, the stadium wins by a huge margin, often 10x faster. **But** the stadium has a tiny private vault, way smaller than the accountant's filing cabinet, and renting the stadium is much more expensive per square foot. So you bring the stadium in when you have a lot of queries pouring in and need them answered now; you don't bring it in just to store a billion items cheaply.
Detailed answer & concept explanation~5 min readEverything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example.
Everything important, quickly.
4 min: name RAFT/CAGRA + the throughput win + HBM and cost catches + Milvus/Vespa integration + the decision rubric (QPS-binding vs cost-binding).
| Property | CPU HNSW | CAGRA (GPU) | DiskANN |
|---|---|---|---|
| Primary storage | RAM | GPU HBM | SSD |
| Per-query latency | ~1-3 ms | ~0.2-1 ms | ~5-15 ms |
| Sustained QPS | 100-1000/core | 10k-100k/GPU | 100-500/box |
| $/byte of storage | 1x baseline | 5-10x worse | 0.1-0.3x baseline |
| Max single-node index | ~1TB RAM | 80-192GB HBM | Multi-TB SSD |
| Best for | Default production | High QPS, low latency, mid-scale | Cost first billion scale |
Real products, models, and research that use this idea.
- Milvus 2.4+ ships CAGRA as a first class index type, recommended for high-QPS RAG and recommendation backends.
- Vespa offers CAGRA integration via its tensor framework for hybrid scoring at scale.
- NVIDIA cuVS is the standalone library teams use to wire RAFT/CAGRA into custom serving stacks.
- Production vLLM + CAGRA deployments at frontier AI labs keep embedding and retrieval co-located on the same GPU, eliminating CPU-GPU transfer.
- BAAI and Anthropic published 2024-2025 benchmarks showing CAGRA reaching 5-10x QPS over CPU HNSW on 10M-100M-vector benchmarks at the same recall.
What an interviewer would ask next. Try answering before peeking at the approach.
QHow does CAGRA pair with PQ to handle indexes that exceed HBM?
QWhy is the GPU embedding co-location story the killer use case in 2026?
Don't say thisRed flags and common mistakes that signal junior thinking. Click to expand.
Red flags and common mistakes that signal junior thinking. Click to expand.
Assuming GPU-ANN is universally better than CPU HNSW because GPUs are faster. The cost per byte of memory inversion means GPU-ANN is the wrong choice for cost first storage bound workloads; it shines only when QPS or latency is the binding constraint.
The night-before-the-interview bullets. Scan these on the way to the call.
Primary sources. Skim if you want the original framing.
Same topic, related formats. Practice these next.