Last updated:
Qwen4 VRAM calculator
Pick a weight format and a context length to see how much GPU memory a 27B Qwen model needs. Qwen4-27B’s specs are not published yet, so the default uses the layout of Qwen3.8-27B, and you can switch to a plain dense model to see the worst case.
Calculator
| Weights | |
|---|---|
| KV cache | |
| Runtime allowance | |
| Estimated total |
Estimate only. Weights use average bits per weight for each llama.cpp format; KV cache uses the attention layout you pick; the runtime allowance is a flat 1 GB. Real use varies by engine, batch size and vision input.
Quick table for a 27B model
| Format | Weights | Total, 8K context | Total, 32K | Total, 128K |
|---|---|---|---|---|
| BF16 | 54 GB | 56 GB | 57 GB | 64 GB |
| Q8_0 | 29 GB | 30 GB | 32 GB | 38 GB |
| Q6_K | 22 GB | 24 GB | 25 GB | 32 GB |
| Q5_K_M | 19 GB | 21 GB | 22 GB | 29 GB |
| Q4_K_M | 17 GB | 18 GB | 20 GB | 26 GB |
| IQ4_XS | 14 GB | 16 GB | 18 GB | 24 GB |
| Q3_K_M | 13 GB | 15 GB | 16 GB | 23 GB |
Same math as the calculator, Qwen3.8-27B layout, F16 KV cache.
Why the KV cache stays small on Qwen3.8-27B
Only 16 of its 64 layers use full attention (4 KV heads of dimension 256); the other 48 are Gated DeltaNet layers with a fixed-size state. So each token of context costs about 64 KB at F16, and a 32K context adds only about 2 GB. A plain dense 27B model with KV cache on every layer would need roughly four times as much.
Source: Qwen3.8-27B model card (architecture)
Sanity check
Ollama lists qwen3.8:27b, a 4-bit build, at 18 GB. The calculator gives about 16.5 GB for 27B parameters at Q4_K_M; the model card lists 28B parameters including the vision encoder, which accounts for the gap.
Source: Ollama library: qwen3.8
More on Qwen4
Qwen4 status and release date · Qwen4-27B · GGUF downloads · Run locally · Try online · Qwen4-27B vs Qwen3.8-27B
FAQ
How much VRAM does Qwen4-27B need?
Specs are not published. If it is close to Qwen3.8-27B: about 20 GB at 4-bit with a 32K context, about 32 GB at 8-bit, and about 54 GB for BF16 weights alone.
Can I run Qwen4-27B on 16 GB?
Only tightly: a 3-bit build with an 8K context needs about 15 GB. Expect some quality loss.
Does context length matter much?
On the Qwen3.8-27B layout, about 2 GB per 32K tokens at F16. On a plain dense 27B model it would be about four times that.
Independent guide, not affiliated with Alibaba or the Qwen team. Status checked on October 11, 2026. Qwen4 weights are not released yet; we will update this page when they are.