Best GPUs for RAG Pipelines
An embedding model and a generator, sized separately.
What this workload needs
Recommended GPUs for RAG Pipelines
Ordered by suitability for this workload, not by price. Prices are per GPU-hour; the median is across providers at each provider’s lowest on-demand rate.
| GPU | VRAM | Bandwidth | FP16 TFLOPS | On-demand from | Spot from |
|---|---|---|---|---|---|
| #1L4 NVIDIA · Ada Lovelace · 23 providers | 24 GB | 300 GB/s | 121 | $0.419 median $0.805 | $0.290 |
| #2L40S NVIDIA · Ada Lovelace · 40 providers | 48 GB | 864 GB/s | 362.1 | $0.380 median $1.09 | $0.530 |
| #3A10 NVIDIA · Ampere · 13 providers | 24 GB | 600 GB/s | 125 | $0.243 median $1.21 | - |
| #4RTX 4090 NVIDIA · Ada Lovelace · 25 providers | 24 GB | 1,008 GB/s | - | $0.160 median $0.450 | $0.335 |
| #5A100 PCIE NVIDIA · Ampere · 14 providers | 40 GB | 1,555 GB/s | 312 | $0.334 median $1.12 | $0.790 |
| #6H100 SXM NVIDIA · Hopper · 62 providers | 80 GB | 3,350 GB/s | 990 | $1.68 median $3.20 | $0.790 |
| #7RTX A4000 NVIDIA · Ampere · 16 providers | 16 GB | 448 GB/s | 76.7 | $0.081 median $0.166 | - |
Sample RAG Pipelines GPU Pricing
| Provider | Price / hr |
|---|---|
$0.120/hr 8× | |
$0.290/hr 1× | |
$0.790/hr 1× | |
$0.990/hr6mo 1× | |
$1.20/hr 1× | |
$1.20/hr 4× | |
$1.60/hr 8× | |
$2.50/hr 8× | |
$3.30/hr12mo 8× |
Showing 9 of 498 price points. Visit individual GPU pages above for full pricing.
How to choose a GPU for rag pipelines
A retrieval-augmented generation pipeline is not one model but at least two, and they have different hardware profiles. The embedding model is small, runs over large batches during ingestion, and is throughput bound. The generator is the large language model that consumes retrieved context, and it is latency and memory bound. Sizing one GPU for both usually overprovisions for one job and underprovisions for the other.
Embedding is the easier half. Common embedding models are a few hundred million parameters and fit in a handful of gigabytes, so an entry or mid-tier GPU saturates on batch size long before it runs out of memory. Ingestion is also a batch job rather than a serving path, which makes it a good candidate for spot capacity and for scaling to zero between corpus updates.
Generation is where the cost sits, and RAG makes it harder than plain chat in one specific way: retrieved context makes prompts long. Prefill cost scales with prompt length, and the KV cache grows with it too, so a RAG deployment needs materially more memory headroom per concurrent request than the same model serving short prompts. Size for your retrieval budget — top-k times chunk size — not for the question alone.
Reranking sits between the two and is often forgotten. A cross-encoder reranker runs over every retrieved candidate rather than once per query, so its throughput requirement scales with your candidate count. If your pipeline reranks, budget for it as a third model rather than as a rounding error on the generator.
Related Reading
Frequently Asked Questions
Do I need a GPU for embeddings?
For one-off ingestion of a small corpus, CPU is often adequate. For large corpora or frequent re-indexing, a GPU is typically an order of magnitude faster per document and cheaper overall despite the higher hourly rate. Entry and mid-tier GPUs are usually sufficient, since embedding models are small.
Should the embedding model and LLM share a GPU?
They can, and co-locating avoids a second instance. But the two have different scaling profiles — embedding is throughput bound and bursty, generation is latency bound and continuous — so at production volume separate GPUs usually give better utilization and more predictable serving latency.
How does long context affect GPU requirements for RAG?
Retrieved context lengthens every prompt, which increases both prefill compute and KV cache size per request. A RAG deployment therefore needs more VRAM headroom per concurrent user than the same model handling short prompts. Size the KV cache for top-k times chunk size, plus the answer.