Can I Run Qwen2.5-Coder-32B-Instruct on NVIDIA RTX 5090 (32GB)?
The RTX 5090 (32GB GDDR7, 1,792 GB/s) is an unmatched single-GPU workstation for Qwen2.5-Coder-32B, running Q4_K_M at ~66.9 tok/s (32K smooth context) or fitting Q6_K entirely in VRAM at ~50.5 tok/s.
Interactive VRAM & Speed Simulator
Toggle quantization precision and drag context length to inspect real-time GPU residency on RTX 5090 32GB.
Estimated Total VRAM
Est. Decode Speed
Blazing (>50 tok/s)
Weights + Buffer
KV Cache: 2.00 GB (FP16)
CUDA Layer Residency
8.62 GB free headroom
100% resident in CUDA memory — zero CPU spill.
llama-cli -hf bartowski/Qwen2.5-Coder-32B-Instruct-GGUF:Q4_K_M -ngl 99 -c 8192 -fa on
Quantization Comparison Table (8K Context)
Static GGUF footprint breakdown across Q4_K_M through FP16 on RTX 5090 32GB.
| Quant | Weights | Total VRAM (8K) | GPU Layers | Est. Speed | Status | Practical Notes |
|---|---|---|---|---|---|---|
| Q4_K_M 4.85 bpw | 19.88 GB | 22.88 GB | 64/64 | 66.9 tok/s | Smooth | Fits 100% in CUDA memory (8.6 GB headroom). |
| Q5_K_M 5.7 bpw | 23.37 GB | 26.36 GB | 64/64 | 58.1 tok/s | Smooth | Sweet spot: higher fidelity with 5.1 GB headroom. |
| Q6_K
Recommended
6.6 bpw | 27.06 GB | 30.05 GB | 64/64 | 50.5 tok/s | Smooth | Sweet spot: higher fidelity with 1.4 GB headroom. |
| Q8_0 8.5 bpw | 34.85 GB | 37.84 GB | 52/64 | 5.0 tok/s | Partial Offload | Fits 52/64 layers on GPU; remaining layers spill to system RAM over PCIe. |
| FP16 16 bpw | 65.60 GB | 68.59 GB | 27/64 | OOM | OOM | Requires 68.59 GB vs 31.5 GB usable CUDA memory; too large to run practically. |
One-Click Launch Commands (Ollama & llama.cpp)
Pre-tuned flags for NVIDIA RTX 5090 (32GB) using optimal -ngl 99 and 32K context.
ollama run qwen2.5-coder:32b
OLLAMA_FLASH_ATTENTION=1 OLLAMA_KV_CACHE_TYPE=q8_0 OLLAMA_NUM_CTX=32768 ollama run qwen2.5-coder:32b
llama-cli -hf bartowski/Qwen2.5-Coder-32B-Instruct-GGUF:Q4_K_M \ -ngl 99 -c 32768 -fa on --cache-type-k q8_0 --cache-type-v q8_0
llama-server -hf bartowski/Qwen2.5-Coder-32B-Instruct-GGUF:Q4_K_M \ -ngl 99 -c 32768 -fa on --host 127.0.0.1 --port 8080
Context Window & Memory Bottleneck Analysis
- KV Cache per 4K Tokens (FP16)
- +1.00 GB / 4K
- Max Smooth Context (Q4_K_M)
- 32K
- Hardware Memory Bus
- 1792 GB/s
With 31.5 GB of usable GDDR7 VRAM and a 1,792 GB/s memory bus, Qwen2.5-Coder-32B runs effortlessly at Q4_K_M (19.88 GB weights), leaving 10.63 GB for KV cache—enough for 32K native FP16 context (28.87 GB total). Pushing to 64K FP16 context (16.00 GB KV) reaches 36.87 GB and requires Q8_0 KV quantization.
Key Bottleneck Signals
- Q4_K_M + 32K FP16 KV cache totals 28.87 GB, keeping 100% of layers and context on GDDR7.
- Q6_K (27.06 GB weights, 30.05 GB total at 8K) fits smoothly in 32 GB VRAM and streams at ~50.5 tok/s.
- 1,792 GB/s bandwidth eliminates the memory-wall bottleneck typical of 32B dense coding models.
- Q8_0 (34.85 GB weights, 37.84 GB total at 8K) exceeds 32 GB VRAM and spills 11 layers onto PCIe (~5.0 tok/s).
Recommended Optimizations
- Run Q6_K at 8K–12K for peak coding accuracy (~50.5 tok/s), or Q4_K_M for 32K–64K multi-file diffs.
- Enable -fa on --cache-type-k q8_0 --cache-type-v q8_0 to fit a full 64K context at Q4_K_M inside 31.5 GB.
- Expose llama-server on localhost:8080 as a fast local OpenAI-compatible backend for Cursor, Cline, or Continue.
Frequently Asked Questions
Can the RTX 5090 32GB run Qwen2.5-Coder-32B in Q8_0? +
Not without CPU spill. Q8_0 requires 37.84 GB at 8K context, forcing ~11 of 64 layers onto system RAM (~5.0 tok/s). Use Q6_K (30.05 GB total) for near-lossless quality fully inside 32 GB GDDR7.
How many tokens per second does Qwen2.5-Coder-32B get on an RTX 5090? +
Driven by 1,792 GB/s GDDR7 bandwidth, Q4_K_M hits ~66.9 tok/s at 8K context, while Q6_K still streams at ~50.5 tok/s—faster than most cloud API responses.
Can I run a 64K context window for multi-file coding on RTX 5090? +
At native FP16 KV cache, 32K context fits cleanly (28.87 GB total). To reach 64K on Q4_K_M without PCIe spill, enable Flash Attention with Q8_0 KV cache quantization (~8 GB KV instead of 16 GB).
Should developers pick Q4_K_M or Q6_K on RTX 5090 for coding agents? +
Use Q6_K for architectural reasoning and complex edits under 12K context, and switch to Q4_K_M when feeding 32K–64K multi-file diffs or needing ~67 tok/s autocomplete.
Compare Related Hardware & Models
Explore alternative GPUs for Qwen2.5-Coder 32B or other open-weight models benchmarked on RTX 5090 32GB.