Skip to main content

How to run DeepSeek-R1 32B on AMD Radeon RX 7900 XTX

Exact commands, expected tok/s, VRAM math for this specific combination.

AMD Radeon RX 7900 XTX has 24 GB of GDDR6. DeepSeek-R1 32B at q4KM wants ~22 GB of it for weights alone. Verdict: ✅ Fits natively. Expect ~25–40

Check your exact config: Will DeepSeek-R1-Distill-Qwen 32B run on the Radeon RX 7900 XTX? → Runs, 26 tok/s from 1 cited run. Each page swaps the card or the model and lists every source.

How to run DeepSeek-R1 32B on AMD Radeon RX 7900 XTX

This tutorial walks you through running DeepSeek-R1 32B on an AMD Radeon RX 7900 XTX. Exact commands, expected tokens-per-second, and the tradeoffs you should know before starting.

Does it fit?

AMD Radeon RX 7900 XTX has 24 GB of GDDR6. DeepSeek-R1 32B at q4_K_M wants ~22 GB of it for weights alone.

Verdict: ✅ Fits natively. Expect ~25–40 tok/s of generation throughput after warm-up (first-token latency is a separate metric — see the prefill discussion below).

Install Ollama (the easy path)

bash
# macOS/Linux
curl -fsSL https://ollama.com/install.sh | sh
ollama pull deepseek-r1:32b
ollama run deepseek-r1:32b

Ollama handles GPU detection automatically on NVIDIA (via CUDA), AMD (via ROCm on Linux), and Apple Silicon (via Metal). No manual configuration needed.

Install llama.cpp (more control)

llama.cpp gives you flag-level control over quantization, context length, and layer offload. Build from source:

bash
git clone https://github.com/ggerganov/llama.cpp
cd llama.cpp
make GGML_HIPBLAS=1 -j

# Download a quantized GGUF (community favorite: bartowski or TheBloke on HuggingFace)
./llama-cli -m ~/models/deepseek-r1-32b-q4_k_m.gguf \
 -n 512 -c 4096 \
 -ngl 999 \
 -p "Write a haiku about GPUs"

-ngl 999 offloads all layers to the GPU.

Expected performance

  • Community reports from LocalLLaMA suggest ~25-40 tok/s on this class of hardware.

For single-user chat these speeds feel instant. For RAG pipelines where the model re-reads long context, prefill throughput matters more than generation tok/s.

Common issues

"out of memory" on the first prompt: reduce context length (-c 2048) or quantization (q4_K_S instead of q4_K_M).

Slow first token but fast generation: that's prompt processing ("prefill"). Normal — blame the KV cache building. Subsequent messages in the same session will be snappy.

Frequent swapping / system hangs: VRAM is full AND system RAM is full. Close Chrome. Add more DDR5.


AMD Radeon RX 7900 XTX specs: 24GB memory, 355W TDP, 2022 launch. MSRP $999.

Does it fit? Full quantization matrix

Weight-only VRAM for DeepSeek-R1 32B at every common quant, plus the KV-cache overhead for a 4K-token context. KV cache scales linearly with context — see the context-length table further down.

QuantWeights+ KV @ 4K ctxTotalFits on this GPU?Quality loss
q2_K_S9.6 GB2.6 GB12.2 GB✅Severe (15-25%)
q3_K_M14.4 GB2.6 GB17.0 GB✅Noticeable (5-8%)
q4_K_M19.2 GB2.6 GB21.8 GB⚠️ tightMinimal (1-3%) — community default
q5_K_M22.4 GB2.6 GB25.0 GB❌<1%
q6_K25.6 GB2.6 GB28.2 GB❌Effectively lossless
q8_035.2 GB2.6 GB37.8 GB❌Inference-lossless
fp1664.0 GB2.6 GB66.6 GB❌Baseline (original precision)

Values are approximate — actual footprint depends on batch size, whether the KV cache is quantized (-ctk q8_0 -ctv q8_0 in llama.cpp halves it), and whether you reserve VRAM for a display. Rule of thumb: budget 5-10% headroom on top of the table.

How public benchmarks show and compared

Every tok/s, FPS, and synthetic score in this article is pulled live from the SpecPicks benchmark catalog (hardware_specs, ai_benchmarks, synthetic_benchmarks). We cite the source_name on each row — the vast majority are community-reported numbers from r/LocalLLaMA and llama.cpp GitHub Discussions, with synthetic scores from PassMark, Phoronix, and Tom's Hardware's GPU hierarchy.

Where DB rows exist for a specific model+quant+GPU combination, we quote the number exactly. Where they don't, we fall back to published spec-sheet values (VRAM capacity, TDP, memory bandwidth) plus the closest community-verified ballpark — clearly flagged as a ballpark, not a measurement. We prefer "we don't know" over a fabricated number.

SpecPicks does not run paid hardware review cycles; we aggregate. If you see a number you can improve on, pull-request the row.

Measured tok/s on this GPU

Live data from ai_benchmarks for AMD Radeon RX 7900 XTX, filtered to the DeepSeek-R1 32B family where available:

ModelQuantRuntimeGen tok/sVRAM usedSource
No direct matches in the DB yet — see community thread below

For the full tok/s matrix on this card across every model we've logged, see the AMD Radeon RX 7900 XTX benchmark page.

Context length and VRAM — the hidden cost

KV cache grows linearly with context. Here's the approximate overhead on top of 19.2 GB of q4_K_M weights for DeepSeek-R1 32B:

ContextKV cacheTotal VRAM
2K tokens~1.3 GB~20.5 GB
4K tokens~2.6 GB~21.8 GB
8K tokens~5.1 GB~24.3 GB
32K tokens~20.5 GB~39.7 GB
128K tokens~81.9 GB~101.1 GB

For long-context workloads (32K and above) on consumer hardware, use llama.cpp's KV-cache quantization — -ctk q8_0 -ctv q8_0 roughly halves cache footprint with sub-1% quality loss. This is the single biggest VRAM-saving flag for long context.

Which runtime wins on this hardware?

Three mainstream runtimes target AMD Radeon RX 7900 XTX; the right one depends on your workload:

  • Ollama — easiest. Auto-detects CUDA (NVIDIA), ROCm (AMD on Linux) and Metal (Apple Silicon), handles model downloads, and exposes an OpenAI-compatible API out of the box. Wraps llama.cpp; you give up fine-grained control for zero setup.
  • llama.cpp — direct flag-level control over quant, context, KV-cache precision, batch size, split layers across GPUs. Where the LocalLLaMA community benchmarks its numbers (see the Apple-Silicon megathread #4167 for reference tok/s across M-series chips).
  • vLLM — built for production serving. Tensor parallelism, PagedAttention, continuous batching. Linux + NVIDIA CUDA primary target. If you're not serving multiple concurrent users, the overhead isn't worth it.

For head-to-head numbers and install commands across all three, see our Ollama vs llama.cpp vs vLLM guide.

Troubleshooting — three failure modes and fixes

1. First token takes 5-30 seconds, then generation is fast. That's normal prefill: the model is processing your prompt before it can start generating. On a long prompt (4K+ tokens) prefill dominates the first-token latency. If it's unexpectedly slow, check that you actually offloaded layers to the GPU — on the RX 7900 XTX use rocm-smi (Linux + ROCm) or radeontop; it should show near-100% utilisation during prefill. If utilisation is flat, your inference is running on CPU.

2. "Out of memory" halfway through a long chat. The KV cache grew past what the card can hold. Drop to a smaller quant (q4_K_M → q3_K_M), cut -c context length, or enable KV-cache quantization (-ctk q8_0 -ctv q8_0 in llama.cpp). On Ollama set num_ctx smaller in your Modelfile.

3. Tok/s is ~30% of what LocalLLaMA threads report. Three usual suspects: (a) power/thermal throttling — check sustained clocks during a long prompt; (b) PCIe x8 or x4 link when you expected x16 — check with rocm-smi --showbus or lspci -vv -s <bus-id> and look at LnkSta for negotiated width; (c) running the wrong binary, e.g. a non-HIP llama.cpp build on this AMD card. Rebuild with make GGML_HIPBLAS=1 -j and confirm the binary links against ROCm/HIP.

Sources

  1. r/LocalLLaMA (community tok/s threads)
  2. llama.cpp GitHub Discussions #4167 — Apple Silicon benchmark thread
  3. Tom's Hardware GPU Hierarchy

Products mentioned

Small-model (7–9B) reference throughput

These figures are for 7–9B models, not the 30–35B models this article covers. The table holds model size fixed so the cards can be compared with each other; for the size in the title, use the article's own figures.

Median generation throughput at 7–9B models (Llama 3.1 8B, Qwen 3 8B), Q4 quantization, from community-reported runs SpecPicks tracks. Each row pools runs from different sources, runtimes and models in that class, so the rows are not a matched head-to-head; where the article compares cards on the same rig, its own figures are the like-for-like result. Street price is the second-lowest listing priced within the last 24 hours at 0.5–2× launch MSRP, so no single listing sets it, and a street figure well above MSRP says so in its cell; where too few listings pass that check the row shows launch MSRP instead. Rows marked for comparison are not the cards this article is about — they are included so the throughput column has something to be read against.

GPUVRAM Llama-3-8B class, Q4Street price Sources
Radeon RX 7900 XTX 24 GB 138.6 tok/s9 runs · 3 sources $999MSRP SpecPicks median of 9 runs; sources: GitHub / 1337hero, llama.cpp GitHub issue #20934, Markaicode / LocalScore
NVIDIA RTX A5000 24GBfor comparison 24 GB 133 tok/s4 runs · 3 sources $1,999MSRP SpecPicks median of 4 runs; sources: llama.cpp GitHub (CUDA scoreboard), knightli.com (llama.cpp CUDA…, MyAIHardware
NVIDIA GeForce RTX 4090for comparison 24 GB 129.2 tok/s8 runs · 7 sources $1,599MSRP SpecPicks median of 8 runs; sources: GPU-Benchmarks-on-LLM-Inference…, Awesome Agents LLM Leaderboard, Database Mart, Hardware Corner +3 more

Products mentioned in this article

Amazon & eBay listings, plus full specs and alternatives on each product page.

As an Amazon Associate, SpecPicks earns from qualifying purchases; we also earn on qualifying eBay purchases via the eBay Partner Network. Prices shown were last tracked at crawl time and may vary — check the listing for the current price.

Watch a review

AMD Radeon RX 7900 XTX Review & GPU Benchmarks: Gaming, Thermals, Power, & Noise — Gamers Nexus on YouTube

Frequently asked questions

What is the expected performance of DeepSeek-R1 32B on AMD Radeon RX 7900 XTX?
Community benchmarks suggest a performance range of 25-45 tokens per second, depending on the runtime and quantization settings. First-token latency may be slower due to prompt processing, but subsequent tokens generate quickly. This performance is suitable for single-user chat and smaller-scale RAG pipelines.
What are the common issues when running DeepSeek-R1 32B on AMD Radeon RX 7900 XTX?
Common issues include 'out of memory' errors, slow first-token latency, and system hangs due to VRAM and RAM being fully utilized. Solutions include reducing context length, using lower quantization levels, enabling KV-cache quantization, and closing background applications to free up memory.
How does context length affect VRAM usage for DeepSeek-R1 32B?
The KV cache grows linearly with context length, adding significant VRAM overhead. For example, a 4K-token context requires approximately 2.6 GB of additional VRAM, while a 32K-token context requires around 20.5 GB. Using KV-cache quantization can reduce this overhead by roughly half with minimal quality loss.
What are the advantages of using Ollama versus llama.cpp for this setup?
Ollama offers ease of use with automatic GPU detection and minimal setup, making it ideal for users seeking simplicity. In contrast, llama.cpp provides granular control over quantization, context length, and layer offloading, which is preferred by advanced users optimizing for specific workloads.
Can the AMD Radeon RX 7900 XTX handle DeepSeek-R1 32B at higher quantization levels like q6_K or fp16?
No, the AMD Radeon RX 7900 XTX's 24 GB VRAM is insufficient for higher quantization levels like q6_K or fp16, which require 28.2 GB and 66.6 GB respectively. These configurations exceed the card's capacity, making them unsuitable without significant compromises or multi-GPU setups.

— Mike Perry · Updated 2026-08-18

Sapphire 11322-01-40G Nitro+…
Sapphire 11322-01-40G Nitro+…
$1,799
View on Amazon →

Amazon Associate — prices tracked 2026-10-20, may vary.