Qwen3 8B VRAM requirements
Qwen3 8B needs about 6.81 GB of VRAM at Q4_K_M with 8K context, so it fits an 8 GB card such as the RTX 4060 8GB. Qwen3 8B has 8.2B parameters. With the same 8K context and one request it needs 10.1 GB at FP8 and 18.5 GB at FP16/BF16. The published weights take 15.3 GB (BF16). The smallest setup here that holds it at Q4_K_M with an 8K context is the RTX 4060 8GB; on one 24 GB RTX 3090 / 4090 it runs with its full 40K-token context.
6.81 GB at Q4_K_M, 8K context, one request
- FP8
- 10.1 GB
- FP16 / BF16
- 18.5 GB
- Published weights
- 15.3 GB
- Smallest setup, Q4_K_M
- RTX 4060 8GB
Worked example: Qwen3 8B with 32K tokens
Inputs: Qwen3 8B · Q4_K_M weights · 32,768 tokens of context · one request · FP16 KV cache
- Weights (8.2B at Q4_K_M)
- 4.62 GB
- KV cache (144 KB per token)
- 4.50 GB
- Buffers and runtime (0.5 GB + 10%)
- 1.41 GB
- Total
- 10.5 GB
The smallest setup here that holds it is the RTX 3060 12GB, with about 1.47 GB to spare. Change the inputs in the calculator
What makes Qwen3 8B's memory use different
Per token of context it adds 144 KB of FP16 cache; Llama 3.1 8B (8.0B), the nearest-sized model here with plain full attention, adds 128 KB, so Qwen3 8B needs 13% more.
How much VRAM does Qwen3 8B need?
Qwen3 8B needs 6.81 GB at Q4_K_M, 10.7 GB at Q8_0 and 18.5 GB at FP16 with 8,192 tokens of context and one request. Each total below is the weights plus the FP16 KV cache and the runtime overhead (0.5 GB plus 10%), and each row opens the calculator with that setting. What the GGUF names mean.
| Precision | Weights | Total | Smallest setup |
|---|---|---|---|
| As published (BF16) | 15.3 GB | 18.5 GB | RTX 3090 (24 GB) |
| FP16 / BF16 | 15.3 GB | 18.5 GB | RTX 3090 (24 GB) |
| FP8 / INT8 | 7.63 GB | 10.1 GB | RTX 3060 12GB |
| INT4 (AWQ / GPTQ) | 4.05 GB | 6.20 GB | RTX 4060 8GB |
| GGUF Q8_0 | 8.10 GB | 10.7 GB | RTX 3060 12GB |
| GGUF Q6_K | 6.26 GB | 8.62 GB | RTX 3060 12GB |
| GGUF Q5_K_M | 5.41 GB | 7.68 GB | RTX 4060 8GB |
| GGUF Q4_K_M | 4.62 GB | 6.81 GB | RTX 4060 8GB |
| GGUF IQ4_XS | 4.15 GB | 6.30 GB | RTX 4060 8GB |
| GGUF Q3_K_M | 3.73 GB | 5.84 GB | RTX 4060 8GB |
| GGUF IQ3_XXS | 3.15 GB | 5.20 GB | RTX 4060 8GB |
| GGUF Q2_K | 3.19 GB | 5.25 GB | RTX 4060 8GB |
Fine-tuning Qwen3 8B? Qwen3 8B VRAM for LoRA, QLoRA and full training.
Qwen3 8B GGUF files on Hugging Face
The 8 GGUF files llama.cpp picks for Qwen3 8B with -hf <repo>:<QUANT>, with the bytes the Hugging Face file list reported on 2026-09-29. Each total is that file plus the FP16 KV cache and 0.5 GB + 10%, one request. "vs estimate" compares the file with the bits-per-weight size the table above uses.
| Quant | File | Size | vs estimate | 8K | 32K | 40K (full) |
|---|---|---|---|---|---|---|
| Q2_K | unsloth/ | 3.06 GB3,281,733,440 bytes | −4% | 5.10 GB | 8.81 GB | 10.0 GB |
| Q3_K_M | unsloth/ | 3.84 GB4,124,161,856 bytes | +3% | 5.96 GB | 9.68 GB | 10.9 GB |
| IQ4_XS | unsloth/ | 4.27 GB4,581,287,744 bytes | +3% | 6.43 GB | 10.1 GB | 11.4 GB |
| Q4_K_M | unsloth/ | 4.68 GB5,027,784,512 bytes | +1% | 6.89 GB | 10.6 GB | 11.8 GB |
| Q5_K_M | unsloth/ | 5.45 GB5,851,113,280 bytes | +1% | 7.73 GB | 11.4 GB | 12.7 GB |
| Q6_K | unsloth/ | 6.26 GB6,725,900,096 bytes | ±0% | 8.63 GB | 12.3 GB | 13.6 GB |
| Q8_0 | ggml-org/ | 8.11 GB8,709,518,656 bytes | ±0% | 10.7 GB | 14.4 GB | 15.6 GB |
| BF16 | ggml-org/ | 15.3 GB16,388,044,096 bytes | ±0% | 18.5 GB | 22.2 GB | 23.5 GB |
GB here is GiB (1024³ bytes), as everywhere on this site; Hugging Face shows the Q4_K_M file as 5.0 GB, in 10⁹ bytes.
Which Qwen3 8B GGUF fits a 16, 24, 32, 48 or 80 GB GPU or a Mac
From the file sizes above: the largest file that fits each machine with an 8K context and 0.5 GB left free, the longest context it then has room for, and the longest context for Q4_K_M (4.68 GB). One request, FP16 KV cache.
| Hardware | Largest GGUF, 8K | Its longest context | Q4_K_M, longest context |
|---|---|---|---|
| RTX 5060 Ti 16GB | Q8_0, 8.11 GB | 39K | 40K (full) |
| RTX 4090 (24 GB) | BF16, 15.3 GB | 40K (full) | 40K (full) |
| RTX 5090 (32 GB) | BF16, 15.3 GB | 40K (full) | 40K (full) |
| L40S (48 GB) | BF16, 15.3 GB | 40K (full) | 40K (full) |
| H100 SXM (80 GB) | BF16, 15.3 GB | 40K (full) | 40K (full) |
| M4 Pro Mac (64 GB, 48 GB usable) | BF16, 15.3 GB | 40K (full) | 40K (full) |
| M4 Max Mac (128 GB, 96 GB usable) | BF16, 15.3 GB | 40K (full) | 40K (full) |
Run Qwen3 8B with llama.cpp or Ollama
llama-server -hf unsloth/Qwen3-8B-GGUF:Q4_K_M -c 40960 Qwen3-8B-Q4_K_M.gguf, 5.0 GB, from unsloth/
ollama run qwen3:8b
Ollama library tag qwen3:8b; its quant is Ollama's choice. Same context: /set parameter num_ctx 40960.
Qwen3 8B at 8K, 32K and 40K (full) tokens of context
All 36 layers use full attention. Each extra token of context adds 144 KB of FP16 cache per request. The last column is the smallest setup here, one card or a group, that holds it at Q4_K_M. How the KV cache works.
| Context | KV cache, FP16 | Total at Q4_K_M | Total at Q8_0 | Smallest setup, Q4_K_M |
|---|---|---|---|---|
| 8K tokens | 1.13 GB | 6.81 GB | 10.7 GB | RTX 4060 8GB |
| 32K tokens | 4.50 GB | 10.5 GB | 14.4 GB | RTX 3060 12GB |
| 40K tokens | 5.63 GB | 11.8 GB | 15.6 GB | RTX 3060 12GB |
How fast Qwen3 8B writes
Tokens per second for one request with 8,192 tokens of context, estimated from memory bandwidth. A dash means it does not fit on one card. Try other settings in the speed calculator.
| Hardware | Bandwidth | Q4_K_M | FP8 |
|---|---|---|---|
| RTX 3060 12GB | 360 GB/s | 31–43 | 20–28 |
| RTX 4090 | 1,008 GB/s | 79–116 | 54–77 |
| RTX 5090 | 1,792 GB/s | 129–197 | 91–133 |
| M4 Max Mac (128 GB) | 546 GB/s | 45–64 | 30–43 |
| M3 Ultra Mac Studio (512 GB) | 819 GB/s | 66–95 | 45–63 |
| H100 SXM | 3,350 GB/s | 206–339 | 151–236 |
| H200 | 4,800 GB/s | 261–452 | 198–321 |
Longest context on one GPU
How many tokens of context Qwen3 8B fits on a single card with one request, an FP16 KV cache and 0.5 GB left free. "Full" means the model's whole context window fits.
| GPU | Memory | Q4_K_M | Q8_0 | FP8 |
|---|---|---|---|---|
| RTX 3060 | 12 GB | 38K | 13K | 16K |
| RTX 4060 Ti 16GB | 16 GB | 40K (full) | 39K | 40K (full) |
| RTX 3090 / 4090 | 24 GB | 40K (full) | 40K (full) | 40K (full) |
| RTX 5090 | 32 GB | 40K (full) | 40K (full) | 40K (full) |
| A100 40GB | 40 GB | 40K (full) | 40K (full) | 40K (full) |
| Mac, 64 GB unified memory | 48 GB | 40K (full) | 40K (full) | 40K (full) |
| L40S / RTX 6000 Ada | 48 GB | 40K (full) | 40K (full) | 40K (full) |
| A100 / H100 80GB | 80 GB | 40K (full) | 40K (full) | 40K (full) |
| Mac, 128 GB unified memory | 96 GB | 40K (full) | 40K (full) | 40K (full) |
| H200 | 141 GB | 40K (full) | 40K (full) | 40K (full) |
| B200 | 180 GB | 40K (full) | 40K (full) | 40K (full) |
Model details
- Parameters
- 8.2B (8,190,735,360)
- Layers
- All 36 layers use full attention
- Attention cache
- 8 KV heads × 128
- Context length
- 40,960 tokens
- Published weights
- 15.3 GB (BF16)
- On Hugging Face
- Qwen/Qwen3-8B
- Reported benchmarks
- None published in the model card for GPQA, MMLU-Pro or LiveCodeBench.
Why this estimate looks this way
At Q4_K_M and an 8K-token context, Qwen3 8B uses 4.62 GB for weights, 1.13 GB for its FP16 KV cache and 1.07 GB for estimated runtime overhead, totaling 6.81 GB. The overhead is a 0.5 GB base plus 10% of weights and cache.
The architecture and published checkpoint size come from the model's config.json and weight files. These are estimates rather than measured peak memory; inference engines can reserve extra buffers or preallocate the full configured cache.
Qwen3 8B next to similar-sized models
The three models here closest to it in parameter count, at Q4_K_M with 8,192 tokens of context.
| Model | Parameters | Total | KV per token | Smallest setup |
|---|---|---|---|---|
| Qwen3 8B | 8.2B | 6.81 GB | 144 KB | RTX 4060 8GB |
| Llama 3.1 8B | 8.0B | 6.58 GB | 128 KB | RTX 4060 8GB |
| Gemma 4 E4B | 8.0B | 5.64 GB | 16 KB | RTX 4060 8GB |
| LFM2.5 8B-A1B | 8.5B, 1.5B active | 5.85 GB | 12 KB | RTX 4060 8GB |
Qwen3 8B VRAM questions
How much VRAM do I need to run Qwen3 8B locally?
About 6.81 GB at Q4_K_M with an 8K context and one request, by the bits-per-weight estimate, and 18.5 GB at BF16. The Q4_K_M GGUF Qwen3-8B-Q4_K_M.gguf in unsloth/
Can I run Qwen3 8B on a 24 GB GPU?
Yes. On the RTX 4090 (24 GB), the largest listed GGUF that fits with an 8K context and 0.5 GB free is BF16 (15.3 GB), with its full 40K-token context.
Which quantization of Qwen3 8B fits in 16 GB of VRAM?
On the RTX 5060 Ti 16GB, the largest listed GGUF that fits with an 8K context and 0.5 GB free is Q8_0 (8.11 GB), with up to 39K tokens of context. Q4_K_M (4.68 GB) runs with its full 40K-token context.
Can I run Qwen3 8B on a Mac?
On the M4 Pro Mac (64 GB, 48 GB usable), the largest listed GGUF that fits with an 8K context and 0.5 GB free is BF16 (15.3 GB), with its full 40K-token context. On the M4 Max Mac (128 GB, 96 GB usable), the largest listed GGUF that fits with an 8K context and 0.5 GB free is BF16 (15.3 GB), with its full 40K-token context. By default macOS lets the GPU use about 75% of unified memory.
How much more VRAM does Qwen3 8B need for 32K or 40K tokens of context?
Its FP16 KV cache is 1.13 GB at 8K, 4.50 GB at 32K, 5.63 GB at 40K for one request, so 40K (its limit) adds 4.50 GB over 8K, plus 10% overhead. A q8_0 cache
Why does Qwen3 8B use more VRAM than its GGUF file size?
The file holds only the weights. At Q4_K_M with an 8K context: 4.68 GB of weights (the file's 5,027,784,512 bytes) + 1.13 GB of FP16 KV cache + 1.08 GB of compute buffers and runtime (0.5 GB + 10%) = 6.89 GB.
Badge for your model card
Paste it into a Hugging Face or GitHub README; it shows the Q4_K_M total above and links to this page. Q8_0 and FP16 badges.
Numbers read from the model files on Hugging Face on . Compare it with other models in the reproducible model and GPU report.