Qwen3-4B GGUF size and VRAM requirements

License: apache-2.0 ⬇ 331,739 ❤ 235
Parameters4.02B
Context40,960

unsloth/Qwen3-4B-GGUF is a mid-size language model with 4.02 billion parameters, built on the qwen3 architecture. It is released under the apache-2.0 license and has been downloaded 331,739 times.

Under the hood it uses 36 transformer layers, a hidden size of 2,560, 32 attention heads. It uses grouped-query attention (32 query heads sharing 8 key/value heads), which already trims KV-cache memory compared with full multi-head attention.

To run unsloth/Qwen3-4B-GGUF locally at a 4,096-token context, its quantized versions need between 2.37 GB (IQ1_S, lowest quality) and 8.86 GB (BF16, highest quality) of memory, weights plus KV cache and a system margin included. Context length drives that memory directly: at 4,096 tokens the KV cache for Qwen3-4B-GGUF is about 0.56 GB, rising to roughly 5.62 GB at its full 40,960-token context. Shorter prompts free up memory for a higher-quality quantization.

For most users the best balance is Q8_K_XL, needing about 6.07 GB. That means unsloth/Qwen3-4B-GGUF fits entirely in the VRAM of a 6 GB GPU or larger, running fully on the GPU.

Available GGUF quantizations for unsloth/Qwen3-4B-GGUF include IQ1_S, IQ1_M, IQ2_XXS, IQ2_M, Q2_K, Q2_K_L, IQ3_XXS, Q2_K_XL, Q3_K_S, Q3_K_M, Q3_K_XL, IQ4_XS, Q4_0, IQ4_NL, Q4_K_S, Q4_K_M, Q4_K_XL, Q4_1, Q5_K_S, Q5_K_M, Q5_K_XL, Q6_K, Q6_K_XL, Q8_0, Q8_K_XL, BF16. The model supports a native context length of up to 40,960 tokens; a longer context grows the KV cache and the memory needed.

→ Guide: How much VRAM do you need?

GGUF file size and memory by quantization

Compare real GGUF weight sizes, estimated KV cache and total memory for Q4, Q5, Q8 and every quantization published in this repository.

Quant.Bits QualityWeights KVTotal Speed~Verdict
IQ1_S 2.15 Very low 1.01 GB 0.56 GB 2.37 GB 396.5 t/s Fits in VRAM
IQ1_M 2.27 Very low 1.06 GB 0.56 GB 2.43 GB 375.6 t/s Fits in VRAM
IQ2_XXS 2.5 Very low 1.17 GB 0.56 GB 2.53 GB 342.1 t/s Fits in VRAM
IQ2_M 3.05 Low 1.43 GB 0.56 GB 2.79 GB 280.2 t/s Fits in VRAM
Q2_K 3.32 Fair 1.55 GB 0.56 GB 2.92 GB 257.3 t/s Fits in VRAM
Q2_K_L 3.32 Fair 1.55 GB 0.56 GB 2.92 GB 257.3 t/s Fits in VRAM
IQ3_XXS 3.33 Fair 1.56 GB 0.56 GB 2.92 GB 256.5 t/s Fits in VRAM
Q2_K_XL 3.37 Fair 1.58 GB 0.56 GB 2.94 GB 253.3 t/s Fits in VRAM
Q3_K_S 3.75 Fair 1.76 GB 0.56 GB 3.12 GB 227.6 t/s Fits in VRAM
Q3_K_M 4.13 Fair 1.93 GB 0.56 GB 3.3 GB 206.9 t/s Fits in VRAM
Q3_K_XL 4.24 Good 1.99 GB 0.56 GB 3.35 GB 201.5 t/s Fits in VRAM
IQ4_XS 4.52 Good 2.11 GB 0.56 GB 3.48 GB 189.1 t/s Fits in VRAM
Q4_0 4.73 Good 2.21 GB 0.56 GB 3.58 GB 180.8 t/s Fits in VRAM
IQ4_NL 4.74 Good 2.22 GB 0.56 GB 3.58 GB 180.4 t/s Fits in VRAM
Q4_K_S 4.74 Good 2.22 GB 0.56 GB 3.58 GB 180.2 t/s Fits in VRAM
Q4_K_M 4.97 Good 2.33 GB 0.56 GB 3.69 GB 172.0 t/s Fits in VRAM
Q4_K_XL 5.06 Very good 2.37 GB 0.56 GB 3.73 GB 168.7 t/s Fits in VRAM
Q4_1 5.16 Very good 2.42 GB 0.56 GB 3.78 GB 165.4 t/s Fits in VRAM
Q5_K_S 5.62 Very good 2.63 GB 0.56 GB 3.99 GB 152.1 t/s Fits in VRAM
Q5_K_M 5.75 Very good 2.69 GB 0.56 GB 4.05 GB 148.6 t/s Fits in VRAM
Q5_K_XL 5.78 Very good 2.71 GB 0.56 GB 4.07 GB 147.8 t/s Fits in VRAM
Q6_K 6.58 Excellent 3.08 GB 0.56 GB 4.44 GB 129.9 t/s Fits in VRAM
Q6_K_XL 7.28 Excellent 3.41 GB 0.56 GB 4.77 GB 117.4 t/s Fits in VRAM
Q8_0 8.51 Excellent 3.99 GB 0.56 GB 5.35 GB 100.3 t/s Fits in VRAM
Q8_K_XL 10.06 Excellent 4.71 GB 0.56 GB 6.07 GB 84.9 t/s Fits in VRAM
BF16 16.01 Excellent 7.5 GB 0.56 GB 8.86 GB 6.7 t/s Offload

KV cache computed from the model's exact architecture. Speed is a rough estimate bounded by memory bandwidth.

Frequently asked questions

What kind of model is unsloth/Qwen3-4B-GGUF?

unsloth/Qwen3-4B-GGUF is a language model with 4.02 billion parameters, based on the qwen3 architecture. It is released under the apache-2.0 license and distributed as GGUF files for local inference.

How much VRAM do you need to run unsloth/Qwen3-4B-GGUF?

You need about 5.35 GB of VRAM to run unsloth/Qwen3-4B-GGUF entirely on the GPU using the Q8_0 quantization (at a 4,096-token context). Smaller quantizations lower the requirement at the cost of quality.

Can I run unsloth/Qwen3-4B-GGUF on an 8 GB GPU?

Yes. With 8 GB of VRAM you can run unsloth/Qwen3-4B-GGUF fully on the GPU using Q8_K_XL (about 6.07 GB).

Can I run unsloth/Qwen3-4B-GGUF on a 16 GB GPU?

Yes. With 16 GB of VRAM you can run unsloth/Qwen3-4B-GGUF fully on the GPU using BF16 (about 8.86 GB).

Can I run unsloth/Qwen3-4B-GGUF on a 24 GB GPU?

Yes. With 24 GB of VRAM you can run unsloth/Qwen3-4B-GGUF fully on the GPU using BF16 (about 8.86 GB).

What context length does unsloth/Qwen3-4B-GGUF support?

unsloth/Qwen3-4B-GGUF supports a native context length of up to 40,960 tokens. A longer context grows the KV cache, so it increases the memory needed to run the model.

What is the best quantization for unsloth/Qwen3-4B-GGUF?

For unsloth/Qwen3-4B-GGUF, a strong default is Q4_K_M, which needs about 3.69 GB and keeps most of the quality while roughly halving the memory versus 8-bit. With VRAM to spare, Q5_K_M or Q6_K add a little more quality; if you are tight on memory, a smaller quantization still runs. Pick the highest quantization that fits your VRAM.