Unofficial guide. Not affiliated with Meta.

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.

Short version: a 4-bit Qwen4-27B with a 32K context should need about 20 GB, so a 24 GB GPU is enough. 16 GB works only with 3-bit and a short context; full BF16 needs an 80 GB card.

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

FormatWeightsTotal, 8K contextTotal, 32KTotal, 128K
BF1654 GB56 GB57 GB64 GB
Q8_029 GB30 GB32 GB38 GB
Q6_K22 GB24 GB25 GB32 GB
Q5_K_M19 GB21 GB22 GB29 GB
Q4_K_M17 GB18 GB20 GB26 GB
IQ4_XS14 GB16 GB18 GB24 GB
Q3_K_M13 GB15 GB16 GB23 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

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.