Qwen3 4B: GPU memory and which GPUs fit it
Hugging Face: Qwen/Qwen3-4B
Qwen3 4B needs about 7.5 GiB for its weights. In vLLM 0.34 at 32K context it starts on one A10G (22 GiB), with room for 2.7 requests at full context (86,860 KV tokens). Change the context, users or GPU in the calculator.
Measured: gpu-fit’s prediction for this model was checked against real vLLM runs on L40S (vLLM 0.34), A10G and L4 (vLLM 0.31). See the accuracy table.
The model
- Weights: 7.5 GiB (from the checkpoint’s files)
- KV cache per token: 144 KiB at 16-bit
- Native context: 40,960 tokens
- Dense transformer with grouped-query attention: 36 layers, 8 KV heads.
Which GPUs fit it at 32K context
The fewest GPUs of each type that vLLM 0.34 will start on at 32K, with 8 request slots: enough memory for at least one full-length request. “Requests at 32K” is how many full-length requests fit in memory at once on that setup; to serve 8 users at full length you may need more GPUs, which the calculator’s comparison table shows.
| GPU | GPUs to start | KV tokens | Requests at 32K | Longest single request |
|---|---|---|---|---|
| L4 (22 GiB) | 1 | 86,902 | 2.7 | 40,960 |
| A10G (22 GiB) | 1 | 86,860 | 2.7 | 40,960 |
| RTX4090 (24 GiB) | 1 | 97,782 | 3.0 | 40,960 |
| A100-40 (40 GiB) | 1 | 214,376 | 6.5 | 40,960 |
| L40S (45 GiB) | 1 | 250,700 | 7.7 | 40,960 |
| RTX6000-Ada (48 GiB) | 1 | 272,545 | 8.3 | 40,960 |
| A100-80 (80 GiB) | 1 | 505,647 | 15.4 | 40,960 |
| H100 (80 GiB) | 1 | 503,080 | 15.4 | 40,960 |
| H200 (140 GiB) | 1 | 945,476 | 28.9 | 40,960 |
| B200 (179 GiB) | 1 | 1,226,991 | 37.4 | 40,960 |
GPUs needed by context length
| GPU | 8K | 32K | 128K |
|---|---|---|---|
| L4 | 1 | 1 | beyond native window |
| A10G | 1 | 1 | beyond native window |
| RTX4090 | 1 | 1 | beyond native window |
| A100-40 | 1 | 1 | beyond native window |
| L40S | 1 | 1 | beyond native window |
| RTX6000-Ada | 1 | 1 | beyond native window |
| A100-80 | 1 | 1 | beyond native window |
| H100 | 1 | 1 | beyond native window |
| H200 | 1 | 1 | beyond native window |
| B200 | 1 | 1 | beyond native window |
Suggested start on one A10G, 32K context, 8 request slots (check it on your hardware):
vllm serve Qwen/Qwen3-4B \
--max-model-len 32768 \
--max-num-seqs 8
How these numbers were made
With gpu-fit 1.3.0, an open-source tool that reads the model’s
architecture and mirrors how vLLM budgets GPU memory. Weights come from the checkpoint’s file sizes,
KV per token from the model config, and runtime overhead is calibrated on measured vLLM runs. These
are planning estimates: confirm on your own hardware before you spend money. pip install gpu-fit
and run gpu-fit Qwen/Qwen3-4B --context 32768 --max-num-seqs 8 --gpu A10G
to get the same numbers in your terminal.
Other models
Qwen3 8B · Qwen3 8B FP8 · Qwen3 14B · Qwen3 32B · Qwen3 32B FP8 · Qwen3 32B AWQ · QwQ 32B · Qwen3 30B-A3B · Qwen3 30B-A3B FP8 · Qwen3 Coder 30B-A3B · Qwen3-Next 80B-A3B · Qwen3 235B-A22B · Qwen2.5 72B Instruct · Qwen2.5-VL 7B Instruct · Qwen3.8 27B FP8 · Qwen3.6 35B-A3B FP8 · DeepSeek R1 Distill Qwen 32B · DeepSeek V3 · DeepSeek R1 (0528) · Mistral Small 3.2 24B · Devstral Small (2507) · Mistral Nemo 12B · Phi-4 · Phi-4 mini · gpt-oss-20b · gpt-oss-120b · Llama 3.2 3B Instruct · Llama 3.1 8B Instruct · Llama 3.3 70B Instruct · Gemma 3 4B · Gemma 3 12B · Gemma 3 27B