Qwen2.5 Coder 32B VRAM Requirements

32.76B parameters, 64 layers, 8 key-value heads. At Q4_K_M with a 8K context it needs 20.0 GB — 17 of 30 accelerators here can hold it.

Your setup

About 22.1 GB of that is usable for a model.

The usual choice for running locally. Quality loss is small and it is what most GGUF downloads default to.

8K tokens max 32K

Longer context costs memory linearly — this model uses 256.0 KB per token.

Running Qwen2.5 Coder 32B

20.0 GB of memory needed

Runs comfortably on a GeForce RTX 4090

Weights
17.2 GB
KV cache
2.0 GB
Headroom
2.1 GB
Max context
17K
20.0 GB used 22.1 GB usable

Where the memory goes

Qwen2.5 Coder 32B memory breakdown
Component Memory
Model weights (Q4_K_M)17.2 GB
KV cache at 8K tokens2.0 GB
Runtime allowance0.8 GB
Total20.0 GB

Weights are only half the question

A 32.8B model at Q4_K_M is 17.2 GB of weights. That part is fixed — it is the file on disk, and it does not change while the model runs. What changes is the key-value cache, which grows with every token of context you give it.

Qwen2.5 Coder 32B spends 256.0 KB per token. At 8K that is 2.0 GB, comfortably smaller than the weights. At its full 32K it is 8.0 GB — still under the weights, which is unusual for a long-context model. That is the trap: the model loads fine and then fills the card once a conversation gets long.

The reason the cache is as small as it is comes down to grouped-query attention. Qwen2.5 Coder 32B has 40 query heads but only 8 key-value heads, and the cache is sized by the latter. Calculators that use the query head count overstate it 5-fold, which is where the wildly pessimistic numbers people quote usually come from.

By quantisation

Qwen2.5 Coder 32B memory by quantisation
Format Bits/weight Weights Total at 8K
FP16 / BF161661.0 GB63.8 GB
Q8_08.532.4 GB35.2 GB
Q6_K6.625.2 GB28.0 GB
Q5_K_M5.521.0 GB23.8 GB
Q4_K_M4.517.2 GB20.0 GB
Q3_K_M3.914.9 GB17.7 GB

By context length

Qwen2.5 Coder 32B memory by context length at Q4_K_M
Context KV cache Total
2K tokens0.5 GB18.5 GB
4K tokens1.0 GB19.0 GB
8K tokens2.0 GB20.0 GB
16K tokens4.0 GB22.0 GB
32K tokens8.0 GB26.0 GB

Will it run on your hardware?

Which accelerators run Qwen2.5 Coder 32B at Q4_K_M
Accelerator Memory Runs it Headroom Max context
GeForce RTX 509032 GBYes9.4 GB32K
GeForce RTX 409024 GBYes2.1 GB17K
GeForce RTX 309024 GBYes2.1 GB17K
GeForce RTX 508016 GBNo——
GeForce RTX 4080 SUPER16 GBNo——
GeForce RTX 5070 Ti16 GBNo——
GeForce RTX 4070 Ti SUPER16 GBNo——
GeForce RTX 507012 GBNo——
GeForce RTX 407012 GBNo——
GeForce RTX 3060 12GB12 GBNo——
GeForce RTX 4060 Ti 16GB16 GBNo——
GeForce RTX 308010 GBNo——
Radeon RX 7900 XTX24 GBYes2.1 GB17K
Radeon RX 7900 XT20 GBNo—2K
Radeon RX 9070 XT16 GBNo——
2× RTX 3090 (48 GB)48 GBYes24.2 GB32K
2× RTX 4090 (48 GB)48 GBYes24.2 GB32K
4× RTX 3090 (96 GB)96 GBYes68.3 GB32K
Mac (M4 Max, 64 GB)64 GBYes28.0 GB32K
Mac (M4 Max, 128 GB)128 GBYes76.0 GB32K
Mac (M4 Pro, 48 GB)48 GBYes16.0 GB32K
Mac (M4, 24 GB)24 GBNo——
Mac (M3 Max, 128 GB)128 GBYes76.0 GB32K
Mac Studio (M2 Ultra, 192 GB)192 GBYes124.0 GB32K
Mac (M1 Max, 32 GB)32 GBYes1.4 GB14K
Mac (M2, 16 GB)16 GBNo——
NVIDIA A100 40GB40 GBYes18.0 GB32K
NVIDIA A100 80GB80 GBYes56.0 GB32K
NVIDIA H100 80GB80 GBYes56.0 GB32K
NVIDIA L40S 48GB48 GBYes25.6 GB32K

At Q4_K_M with a 8K context. "Only just" means the model uses more than 95% of usable memory — it will load and then fall over as soon as anything else touches the device.

Frequently asked questions

How much VRAM does Qwen2.5 Coder 32B need?
About 20.0 GB at Q4_K_M with a 8K context — 17.2 GB of weights, 2.0 GB of key-value cache and a 0.8 GB runtime allowance. Unquantised at FP16 it needs 63.8 GB, which is why almost nobody runs it that way locally.
What GPU do I need to run Qwen2.5 Coder 32B?
The smallest card here that runs it is the GeForce RTX 4090 with 24 GB. 17 of the 30 accelerators on this page can hold it at the default quantisation. Apple Silicon deserves a mention: unified memory means a Mac can hold models no consumer graphics card can, though it runs them more slowly.
Does context length change how much memory Qwen2.5 Coder 32B needs?
Yes, and linearly. This model spends 256.0 KB per token of context, so 8K costs 2.0 GB and its full 32K costs 8.0 GB. On a model with a long context window the cache can end up larger than the quantised weights, which catches people out — the weights fit and then the conversation does not.
Why is the cache smaller than other calculators say?
Because Qwen2.5 Coder 32B uses grouped-query attention: 8 key-value heads shared across 40 query heads. The cache is sized by the key-value head count, not the query head count, so using the latter overstates it by a factor of 5. Plenty of calculators still get this wrong.
Which quantisation should I use?
Q4_K_M is the usual answer — the quality loss is small and it is what most GGUF downloads default to. Step up to Q5_K_M or Q6_K if you have memory to spare, since quality improves and the cost is modest. Q8_0 is effectively lossless at half the size of FP16. Drop to Q3_K_M only to fit a larger model that otherwise would not run at all; a bigger model at a rougher quantisation usually beats a smaller one at a fine quantisation.

Architecture: Hugging Face config.json. GGUF K-quant effective bit widths as produced by llama.cpp.

An estimate of memory, not a benchmark. It counts model weights, the key-value cache at the context you choose, and a fixed runtime allowance. Actual usage moves with the runtime, the batch size, whether flash attention is on, and how much the operating system has already taken from a shared memory pool. Treat a result within a gigabyte of your card's capacity as 'probably not' rather than 'just fits'.

Data on this page last verified . How these figures are calculated

    ↑↓ to move ↵ to open