Can I run Llama 3.1 8B on the GeForce RTX 5090?
Runs greatQ4_K_M fits in VRAM with 24.8 GB to spare: Runs great, est. 209.3 tok/s (184.2–234.4, calibrated estimate ±12%).
32 GB VRAM · 1,792.0 GB/s · FP16 104.8 TFLOPS. Assumes 32 GB of DDR5-5600 system RAM, Windows with this GPU driving the display, 8k context and an f16 KV cache.
Every quant of Llama 3.1 8B on the GeForce RTX 5090
| Quant | File size | Verdict | Speed | Memory | Runs as | Notes |
|---|---|---|---|---|---|---|
| Q2_K | 3.18 GB | Runs great | est. 294.9 tok/s259.5–330.3calibrated estimate ±12% | 5.4 / 32.0 GB | Full GPU | — |
| IQ4_XS | 4.45 GB | Runs great | est. 227.1 tok/s199.8–254.3calibrated estimate ±12% | 6.7 / 32.0 GB | Full GPU | — |
| Q4_K_Mbaseline | 4.92 GB | Runs great | est. 209.3 tok/s184.2–234.4calibrated estimate ±12% | 7.2 / 32.0 GB | Full GPU | — |
| Q8_0 | 8.54 GB | Runs great | est. 130.5 tok/s114.8–146.1calibrated estimate ±12% | 10.8 / 32.0 GB | Full GPU | — |
Where the memory goes at Q4_K_M
- Weights
- 4.9 GB
- KV cache
- 1.1 GB
- Compute buffer
- 0.6 GB
- OS reserve
- 0.6 GB
- Free
- 24.8 GB
Context length vs. KV cache
| Context | KV f16 | KV q8_0 | KV q4_0 |
|---|---|---|---|
| 4k | 6.0 GBRuns great est. 229.9 tok/s202.3–257.5calibrated estimate ±12% | 5.7 GBRuns great est. 240.9 tok/s212.0–269.8calibrated estimate ±12% | 5.6 GBRuns great est. 247.3 tok/s217.6–276.9calibrated estimate ±12% |
| 8k | 6.6 GBRuns great est. 209.3 tok/s184.2–234.4calibrated estimate ±12% | 6.1 GBRuns great est. 228.3 tok/s200.9–255.7calibrated estimate ±12% | 5.8 GBRuns great est. 240.0 tok/s211.2–268.8calibrated estimate ±12% |
| 16k | 7.7 GBRuns great est. 177.5 tok/s156.2–198.8calibrated estimate ±12% | 6.7 GBRuns great est. 206.7 tok/s181.9–231.5calibrated estimate ±12% | 6.2 GBRuns great est. 226.8 tok/s199.5–254.0calibrated estimate ±12% |
| 32k | 10.0 GBRuns great est. 136.1 tok/s119.8–152.5calibrated estimate ±12% | 8.0 GBRuns great est. 173.8 tok/s152.9–194.6calibrated estimate ±12% | 6.9 GBRuns great est. 204.2 tok/s179.7–228.7calibrated estimate ±12% |
| 64k | 14.6 GBRuns great est. 92.9 tok/s81.7–104.0calibrated estimate ±12% | 10.6 GBRuns great est. 131.8 tok/s116.0–147.6calibrated estimate ±12% | 8.5 GBRuns great est. 170.2 tok/s149.8–190.7calibrated estimate ±12% |
| 128k | 23.8 GBRuns great est. 56.8 tok/s49.9–63.6calibrated estimate ±12% | 15.8 GBRuns great est. 88.9 tok/s78.2–99.6calibrated estimate ±12% | 11.5 GBRuns great est. 127.8 tok/s112.5–143.1calibrated estimate ±12% |
S = Runs great · A = Runs well · B = Runs slowly · F = Won't run
At Q4_K_M the verdict stays Runs great up to 128k context with an f16 KV cache, and up to 128k with q8_0.
Estimated speed
- Generation
- est. 209.3 tok/s (184.2–234.4, calibrated estimate ±12%)
- Prompt processing
- about 14,672 tok/s (8,803–20,541, rough estimate ±40%)
Measured on this exact combination
No public measurement for this exact combination yet; the numbers above are estimates.
If this is not enough
A larger model that also runs well on the GeForce RTX 5090
Runs greatQwen3.5 35B-A3B: Runs great, est. 235.0 tok/s (188.0–282.0, calibrated estimate ±20%)
A larger quant that still runs great
Runs greatQ8_0 (8.54 GB): Runs great, est. 130.5 tok/s (114.8–146.1, calibrated estimate ±12%)
How to run it
Commands for the Q4_K_M file. Both tools download from Hugging Face on first run.
File: Meta-Llama-3.1-8B-Instruct-Q4_K_M.gguf (4.92 GB) from bartowski/Meta-Llama-3.1-8B-Instruct-GGUF.
llama-server -hf bartowski/Meta-Llama-3.1-8B-Instruct-GGUF:Q4_K_M -c 8192 -ngl all -fa on- -ngl all loads every layer on the GPU.
- -fa on enables flash attention (needed for KV cache quantization).
- --cache-type-k q8_0 --cache-type-v q8_0 shrinks the KV cache to 0.57 GB at 8k context.
PowerShell (quit the Ollama tray app first):
$env:OLLAMA_CONTEXT_LENGTH="8192"; ollama serve
ollama run hf.co/bartowski/Meta-Llama-3.1-8B-Instruct-GGUF:Q4_K_M- Ollama defaults to 4k context on GPUs under 24 GB. Set OLLAMA_CONTEXT_LENGTH when starting the server, or /set parameter num_ctx inside the chat.
/set parameter num_ctx 8192
Related pages
Guide: How much VRAM do local LLMs need? 8–32 GB tiers (2026)
Other models on the GeForce RTX 5090
Llama 3.1 8B on other hardware
Frequently asked questions
Can I run Llama 3.1 8B on the GeForce RTX 5090?
Q4_K_M fits in VRAM with 24.8 GB to spare: Runs great, est. 209.3 tok/s (184.2–234.4, calibrated estimate ±12%). Q4_K_M needs 6.6 GB at 8k context; this setup has 31.4 GB of usable memory and 28.0 GB of free system RAM.
How much context can Llama 3.1 8B use on the GeForce RTX 5090?
At Q4_K_M the verdict stays Runs great up to 128k context with an f16 KV cache (17.2 GB of KV) and up to 128k with a q8_0 KV cache (9.2 GB). The model supports up to 128k.
Which quant should I use, and how fast is it?
Q4_K_M (4.92 GB) is the recommended balance: Runs great, est. 209.3 tok/s (184.2–234.4, calibrated estimate ±12%). The largest tracked file that still gets Runs great is Q8_0 (8.54 GB), est. 130.5 tok/s (114.8–146.1, calibrated estimate ±12%).
Speeds are estimates from memory bandwidth, calibrated against public benchmarks, and each one comes with an error band and a confidence label. Real results vary with drivers, backend, context length and thermals.