Overview

Qwen3.8 27B VRAM requirements at Q4_K_M are about 17.8 to 18.8 GB at 4,096 tokens of context: 16.5186 GB of weights, 0.2684 GB of KV cache, and an assumed 1 to 2 GB of overhead. That fits a 24 GB card such as an RTX 3090 or 4090 and does not fit 16 GB or 12 GB without a smaller quant or CPU offload. The method is the site’s own (methodology, llm-quantization-explained); every model fact below is from the linked Hugging Face card or config.json, read on 2026-10-13. Mac unified memory is a separate page: best local LLM for Mac.

How much VRAM does Qwen3.8 27B need?

Add three terms. Weights are params × bits_per_weight ÷ 8 ÷ 1e9 decimal GB. KV cache is 2 × cached_layers × kv_heads × head_dim × context × bytes_per_value. Overhead of 1 to 2 GB is an assumption, not a measurement.

The Qwen3.8-27B card says 27B parameters, a dense model, 64 layers, 262,144 tokens of native context “extensible up to 1,000,000”, and apache-2.0. It states no VRAM requirement and no tokens-per-second figure, so speed is unknown here. Bits per weight come from the llama.cpp quantize README (a Llama 3.1 8B table, so they are an estimate for Qwen, not its measured file sizes):

QuantBits per weightWeights = 27e9 × bits ÷ 8 ÷ 1e9
Q3_K_M3.996013.4865 GB
Q4_K_M4.894416.5186 GB
Q5_K_M5.703619.2496 GB
Q8_08.500828.6902 GB
BF161654.0000 GB

The Ollama qwen3.8 tags page lists real downloads: 18GB for 27b-q4_K_M, 30GB for 27b-q8_0, and 56GB for 27b-bf16, each with a 256K context window. These are larger than the estimate (16.5186 and 28.6902 GB). The page does not say why, so plan with the larger tag size when you pull from Ollama. The Hugging Face Safetensors widget for the card lists 28B, while the card text says 27B; the 27B in the card text is used here.

How much does context add for Qwen3.8 27B?

Less than the textbook formula suggests. The card’s config.json has 64 layers, full_attention_interval 4, 4 KV heads, head_dim 256 and bfloat16, and its layer_types list has 16 full_attention layers and 48 linear_attention layers. Only the 16 full-attention layers have a per-token KV cache in this formula, so bytes per token are 2 × 16 × 4 × 256 × 2 = 65,536.

ContextKV cache (16 layers)If all 64 layers cached (not this model)
4,0960.2684 GB1.0737 GB
32,7682.1475 GB8.5899 GB
262,14417.1799 GB68.7195 GB

The memory the 48 linear-attention layers keep per sequence is unknown here: no linear-attention state size is on the card, and it depends on the runtime. The card also lists multi-token prediction (MTP) and a vision encoder; their extra memory is unknown. Treat the overhead range as covering them, not as proof.

Which GPU can run Qwen3.8 27B?

Capacities are from NVIDIA: RTX 3060 12 GB GDDR6 (the page also lists an 8 GB version), RTX 4060 Ti 16 GB or 8 GB, RTX 3090 and RTX 4090 24 GB GDDR6X, RTX 5090 32 GB GDDR7. “Fits” means the top of the total range is at or under the card size. Totals are weights + KV + 1 to 2 GB, in decimal GB.

Quant and contextTotal needed12 GB16 GB24 GB32 GB
Q3_K_M, 4,09614.7549 to 15.7549nofits (0.2451 GB spare)fitsfits
Q3_K_M, 32,76816.6340 to 17.6340nonofitsfits
Q4_K_M, 4,09617.7870 to 18.7870nonofitsfits
Q4_K_M, 32,76819.6661 to 20.6661nonofitsfits
Q5_K_M, 4,09620.5181 to 21.5181nonofitsfits
Q5_K_M, 32,76822.3971 to 23.3971nonofitsfits
Q8_0, 4,09629.9586 to 30.9586nononofits
Q8_0, 32,76831.8377 to 32.8377nononotight

“Tight” means the low end fits and the high end does not (Q8_0 at 32,768 on 32 GB: 31.8377 is under 32, 32.8377 is over). Q3_K_M quality for this model is unknown; the README publishes no quality column. A 12 GB card cannot hold even the Q3_K_M weights (13.4865 GB), so a 12 GB setup means partial CPU offload (run-llm-on-cpu) and speed is unknown. Card-size pages: 12gb-vram-llm, 16gb-vram-llm, 24gb-vram-llm, 32gb-vram-llm.

Can Qwen3.6 27B run on one RTX 3090?

Yes at Q4_K_M, by the same arithmetic. The Qwen3.6-27B and Qwen3.5-27B cards both say 27B parameters and 64 layers, and their config.json files match Qwen3.8’s on the fields used here (4 KV heads, head_dim 256, 16 full-attention and 48 linear-attention layers). So the weight and KV numbers above apply unchanged, and Q4_K_M at 32,768 context is 19.6661 to 20.6661 GB on a 24 GB card. See rtx-3090-llm. The Qwen3.6 card gives no VRAM figure either; it only advises reducing the context window after out-of-memory errors (cuda-out-of-memory-llm).

Do MoE models like Qwen3.6 35B-A3B need less VRAM?

No. Total parameters set the weight memory; activated parameters mostly affect compute. The Qwen3.6-35B-A3B card says “35B in total and 3B activated”, 40 layers, 256 experts with 8 routed plus 1 shared activated, 262,144 native context, apache-2.0. Its config.json has 10 full-attention layers, 2 KV heads and head_dim 256, so KV is 2 × 10 × 2 × 256 × 2 = 20,480 bytes per token (0.0839 GB at 4,096; 0.6711 GB at 32,768).

QuantWeights = 35e9 × bits ÷ 8 ÷ 1e9Total at 4,096Total at 32,768
Q4_K_M21.4130 GB22.4969 to 23.496923.0841 to 24.0841
Q8_037.1910 GB38.2749 to 39.274938.8621 to 39.8621

That is larger than the 27B dense model at the same quant, so it is a 24 GB card at short context and a 32 GB card for comfort. On 16 GB the weights alone (21.4130 GB) do not fit, so the experts must sit in system RAM; that is moe-cpu-offload and the speed is unknown here.

Can Qwen3 Coder 30B run on an RTX 5090 or 4090?

At Q4_K_M, yes on both. The Qwen3-Coder-30B-A3B-Instruct card says “30.5B in total and 3.3B activated”, 48 layers, 128 experts (8 activated), 262,144 native context. Its config.json has 48 layers (all with attention), 4 KV heads and head_dim 128: 2 × 48 × 4 × 128 × 2 = 98,304 bytes per token. Q4_K_M weights are 30.5e9 × 4.8944 ÷ 8 ÷ 1e9 = 18.6599 GB; with KV and overhead the total is 20.0626 to 21.0626 GB at 4,096 and 22.8811 to 23.8811 GB at 32,768. That fits a 24 GB RTX 4090 with 0.1189 GB spare at the top of the range at 32,768, and an RTX 5090 with room. Q8_0 weights are 32.4093 GB, which is over the RTX 5090’s 32 GB before any cache.

How much VRAM does Qwen 72B need?

For Qwen2.5-72B, vram-requirements computes 44.4779 GB of Q4_K_M weights and 1.3422 GB of KV at 4,096 tokens, so it needs more than a single 32 GB card. See vram-for-70b-model. No Qwen3.x 72B card was read for this page, so no newer 72B figure is given.

Questions

How much VRAM does Qwen3.8 27B need?

At Q4_K_M and 4,096 context, 17.7870 to 18.7870 decimal GB: 16.5186 GB of weights from 27e9 × 4.8944 ÷ 8, 0.2684 GB of KV cache from config.json, and an assumed 1 to 2 GB of overhead. At 32,768 context it is 19.6661 to 20.6661 GB. Ollama’s 27b-q4_K_M tag is listed at 18GB, so check the download size you actually pull.

What’s the best setup for Qwen3.8 27B on 16 GB of VRAM?

There is no comfortable GPU-only setup. Q4_K_M weights are 16.5186 GB, over 16 GB. Q3_K_M weights are 13.4865 GB and the total is 14.7549 to 15.7549 GB at 4,096 context, which leaves 0.2451 GB spare at the top of the range and fails at 32,768 (16.6340 to 17.6340 GB). Its quality is unknown. The other route is a partial CPU offload with unknown speed. See 16gb-vram-llm.

Qwen 3.6 27B: can I run it on 1x 3090?

Yes at Q4_K_M or Q5_K_M. The card matches Qwen3.8 on layers, KV heads, head dimension and attention layout, so a 24 GB RTX 3090 holds Q5_K_M at 32,768 context (22.3971 to 23.3971 GB), with 0.6029 GB spare at the top of the range. Q8_0 (28.6902 GB of weights) does not fit.

Is this enough VRAM to run Qwen?

Compare your card with the totals in the table: weights + KV + 1 to 2 GB. 12 GB cannot run a 27B at the quants here; 16 GB only at Q3_K_M with short context; 24 GB runs Q4_K_M and Q5_K_M; 32 GB adds Q8_0 at short context. Check your card with how-to-check-vram.

Can Qwen3 Coder 30B run on an RTX 5090 or 4090?

Yes at Q4_K_M on both: 20.0626 to 21.0626 GB at 4,096 context and 22.8811 to 23.8811 GB at 32,768. At Q8_0 the weights alone are 32.4093 GB, over the RTX 5090’s 32 GB. Speed is unknown; no vendor page names a machine and a figure.

Do MoE models like Qwen3.6 35B-A3B need less VRAM?

No. Memory follows the 35B total parameters, not the 3B activated: 21.4130 GB of Q4_K_M weights, more than the 27B dense model’s 16.5186 GB. A MoE model can be faster to run when the experts are offloaded, but that speed is unknown here. See moe-cpu-offload.

Why are these KV numbers so small?

Because these Qwen3.5-generation models cache keys and values in only one layer in four (16 of 64 for the 27B). The 48 other layers are linear attention, whose state is unknown here and runtime-specific. A calculator that assumes all 64 layers cache would overstate KV by 4x.

Sources read on 2026-10-13