Qwen3-Coder-Next VRAM requirements

Qwen3-Coder-Next needs about 50.1 GB of VRAM at Q4_K_M with 8K context, so it needs a 64 GB setup such as 2× RTX 5090; a 24 GB card is too small. Qwen3-Coder-Next has 79.7B parameters, of which about 3B are used per token; all 512 experts still have to be in memory. With the same 8K context and one request it needs 82.3 GB at FP8 and 164 GB at FP16/BF16. The published weights take 148 GB (BF16). It does not fit on a 24 GB card at Q4_K_M; the smallest setup here that holds it with an 8K context is 2× RTX 5090 (64 GB).

50.1 GB at Q4_K_M, 8K context, one request

FP8
82.3 GB
FP16 / BF16
164 GB
Published weights
148 GB
Smallest setup, Q4_K_M
2× RTX 5090 (64 GB)
Open Qwen3-Coder-Next in the calculator

Worked example: Qwen3-Coder-Next with 32K tokens

Inputs: Qwen3-Coder-Next · Q4_K_M weights · 32,768 tokens of context · one request · FP16 KV cache

Weights (79.7B at Q4_K_M)
44.9 GB
KV cache (24 KB per token)
768 MB
Buffers and runtime (0.5 GB + 10%)
5.06 GB
Total
50.7 GB

The smallest setup here that holds it is 2× RTX 5090 (64 GB): split across the 2 cards, with the 0.5 GB runtime base on each of them, it takes 51.2 GB and leaves about 12.8 GB to spare. Change the inputs in the calculator

Can I run Qwen3-Coder-Next on…

What makes Qwen3-Coder-Next's memory use different

36 of its 48 layers keep a fixed-size linear-attention state, so the cache grows by 24 KB per token where caching every layer would take 96 KB.

Per token of context it adds 24 KB of FP16 cache; Llama 3.1 70B (70.6B), the nearest-sized model here with plain full attention, adds 320 KB, so Qwen3-Coder-Next needs 8% as much.

As a mixture-of-experts model it reads about 1.69 GB of its 44.9 GB Q4_K_M weights per generated token (4%), so it writes like a much smaller model while needing memory for all of them.

Running Qwen3-Coder-Next with experts in system RAM

llama.cpp's --n-cpu-moe N keeps the experts of the first N layers in RAM. For the measured Q4_K_M GGUF with 32K tokens of context, the smallest N that fits each card, and the speed with 89.6 GB/s of system RAM. Plan the offload for another GPU. The VRAM here can sit below the 50.7 GB of the worked example because it counts the file's measured bytes, keeps the input embedding (token_embd) in system RAM as llama.cpp does and adds a flat 1 GB of buffers, where the estimate above adds 0.5 GB plus 10% to the preset's weights.

GPU--n-cpu-moeVRAM usedIn system RAMTokens/s
RTX 5060 Ti 16GB 16 GB 35 15.3 GB 31.6 GB 22–37
RTX 4090 24 GB 26 23.3 GB 23.6 GB 35–59
RTX 5090 32 GB 17 31.3 GB 15.7 GB 52–91

In system RAM counts the offloaded experts plus the input embedding (token_embd), which stays in RAM even with --n-cpu-moe 0.

How much VRAM does Qwen3-Coder-Next need?

Qwen3-Coder-Next needs 50.1 GB at Q4_K_M, 87.4 GB at Q8_0 and 164 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.

Fine-tuning Qwen3-Coder-Next? Qwen3-Coder-Next VRAM for LoRA, QLoRA and full training.

Qwen3-Coder-Next GGUF files on Hugging Face

The 8 GGUF files llama.cpp picks for Qwen3-Coder-Next 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.

QuantFileSizevs estimate 8K32K128K
Q2_K unsloth/Qwen3-Coder-Next-GGUF 27.2 GB29,224,450,080 bytes −12% 30.6 GB31.3 GB33.7 GB
Q3_K_M unsloth/Qwen3-Coder-Next-GGUF 35.7 GB38,322,487,328 bytes −2% 40.0 GB40.6 GB43.1 GB
IQ4_XS unsloth/Qwen3-Coder-Next-GGUF 39.7 GB42,676,135,968 bytes −1% 44.4 GB45.0 GB47.5 GB
Q4_K_M unsloth/Qwen3-Coder-Next-GGUF 45.2 GB48,528,320,544 bytes +1% 50.4 GB51.0 GB53.5 GB
Q5_K_M unsloth/Qwen3-Coder-Next-GGUF3 parts 52.9 GB56,847,886,688 bytes +1% 58.9 GB59.6 GB62.0 GB
Q6_K unsloth/Qwen3-Coder-Next-GGUF3 parts 61.1 GB65,613,992,288 bytes ±0% 67.9 GB68.5 GB71.0 GB
Q8_0 ggml-org/Qwen3-Coder-Next-GGUF 79.0 GB84,812,255,040 bytes ±0% 87.6 GB88.2 GB90.7 GB
BF16 unsloth/Qwen3-Coder-Next-GGUF4 parts 149 GB159,458,415,168 bytes ±0% 164 GB165 GB167 GB

GB here is GiB (1024³ bytes), as everywhere on this site; Hugging Face shows the Q4_K_M file as 48.5 GB, in 10⁹ bytes.

Which Qwen3-Coder-Next 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 (45.2 GB). One request, FP16 KV cache. Where nothing fits, the --n-cpu-moe table above keeps experts in system RAM.

HardwareLargest GGUF, 8KIts longest contextQ4_K_M, longest context
RTX 5060 Ti 16GB None fits — No
RTX 4090 (24 GB) None fits — No
RTX 5090 (32 GB) Q2_K, 27.2 GB 41K No
L40S (48 GB) IQ4_XS, 39.7 GB 127K No
H100 SXM (80 GB) Q6_K, 61.1 GB 256K (full) 256K (full)
M4 Pro Mac (64 GB, 48 GB usable) IQ4_XS, 39.7 GB 127K No
M4 Max Mac (128 GB, 96 GB usable) Q8_0, 79.0 GB 256K (full) 256K (full)

Run Qwen3-Coder-Next with llama.cpp or Ollama

llama-server -hf unsloth/Qwen3-Coder-Next-GGUF:Q4_K_M -c 32768 --n-cpu-moe 26

Qwen3-Coder-Next-Q4_K_M.gguf, 48.5 GB, from unsloth/Qwen3-Coder-Next-GGUF (checked 2026-09-29). On the RTX 4090: 23.3 GB on the card, 23.6 GB in RAM, the --n-cpu-moe 26 row above.

ollama run qwen3-coder-next

Ollama library tag qwen3-coder-next; its quant is Ollama's choice. Same context: /set parameter num_ctx 32768.

Qwen3-Coder-Next at 8K, 32K, 128K and 256K (full) tokens of context

12 of its 48 layers use full attention and 36 are linear-attention layers with no growing cache. Each extra token of context adds 24 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.

ContextKV cache, FP16Total at Q4_K_MTotal at Q8_0Smallest setup, Q4_K_M
8K tokens 192 MB 50.1 GB 87.4 GB 2× RTX 5090 (64 GB)
32K tokens 768 MB 50.7 GB 88.0 GB 2× RTX 5090 (64 GB)
128K tokens 3.00 GB 53.2 GB 90.5 GB 2× RTX 5090 (64 GB)
256K tokens 6.00 GB 56.5 GB 93.8 GB 2× RTX 5090 (64 GB)

How fast Qwen3-Coder-Next writes

Tokens per second for one request with 8,192 tokens of context, estimated from memory bandwidth and the parameters read per token. A dash means it does not fit on one card. Try other settings in the speed calculator.

HardwareBandwidthQ4_K_MFP8
RTX 3060 12GB 360 GB/s ——
RTX 4090 1,008 GB/s ——
RTX 5090 1,792 GB/s ——
M4 Max Mac (128 GB) 546 GB/s 72–12748–82
M3 Ultra Mac Studio (512 GB) 819 GB/s 103–18469–120
H100 SXM 3,350 GB/s 285–587—
H200 4,800 GB/s 345–746269–545

Longest context on one GPU

How many tokens of context Qwen3-Coder-Next 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.

GPUMemoryQ4_K_MQ8_0FP8
RTX 3060 12 GB NoNoNo
RTX 4060 Ti 16GB 16 GB NoNoNo
RTX 3090 / 4090 24 GB NoNoNo
RTX 5090 32 GB NoNoNo
A100 40GB 40 GB NoNoNo
Mac, 64 GB unified memory 48 GB NoNoNo
L40S / RTX 6000 Ada 48 GB NoNoNo
A100 / H100 80GB 80 GB 256K (full)NoNo
Mac, 128 GB unified memory 96 GB 256K (full)256K (full)256K (full)
H200 141 GB 256K (full)256K (full)256K (full)
B200 180 GB 256K (full)256K (full)256K (full)

Model details

Parameters
79.7B (79,674,391,296)
Experts
512 routed experts, all loaded
Active per token
3B
Layers
12 of its 48 layers use full attention and 36 are linear-attention layers with no growing cache
Attention cache
2 KV heads × 256
Context length
262,144 tokens
Published weights
148 GB (BF16)
On Hugging Face
Qwen/Qwen3-Coder-Next
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-Coder-Next uses 44.9 GB for weights, 192 MB for its FP16 KV cache and 5.01 GB for estimated runtime overhead, totaling 50.1 GB. The overhead is a 0.5 GB base plus 10% of weights and cache.

This is a mixture-of-experts model: all 512 experts contribute to the 79.7B parameters held in memory, even though only about 3B parameters run per token. Using only active parameters would understate VRAM.

Its attention layout matters for long context: 12 of its 48 layers use full attention and 36 are linear-attention layers with no growing cache. The FP16 cache grows by about 24 KB per additional token per request.

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-Coder-Next 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.

ModelParametersTotalKV per tokenSmallest setup
Qwen3-Coder-Next 79.7B, 3B active 50.1 GB 24 KB 2× RTX 5090 (64 GB)
Kolibri-1 78.1B, 3.5B active 49.2 GB 20 KB 2× RTX 5090 (64 GB)
AliceAI Foundation 80B-A3B 81.3B, 3B active 51.1 GB 24 KB 2× RTX 5090 (64 GB)
Llama 3.1 70B 70.6B 47.0 GB 320 KB M4 Pro Mac (64 GB, 48 GB usable)

Qwen3-Coder-Next VRAM questions

How much VRAM do I need to run Qwen3-Coder-Next locally?

About 50.1 GB at Q4_K_M with an 8K context and one request, by the bits-per-weight estimate, and 164 GB at BF16. The Q4_K_M GGUF Qwen3-Coder-Next-Q4_K_M.gguf in unsloth/Qwen3-Coder-Next-GGUF is 48,528,320,544 bytes (45.2 GB); with an 8K context it needs 50.4 GB. The smallest setup listed here that holds Q4_K_M is the 2× RTX 5090 (64 GB).

Can I run Qwen3-Coder-Next on a 24 GB GPU?

Not entirely in VRAM. The RTX 4090 (24 GB) alone cannot hold it: the smallest listed GGUF, Q2_K at 27.2 GB, needs 30.6 GB with an 8K context. With llama.cpp's --n-cpu-moe 26 and the Q4_K_M GGUF it uses 23.3 GB on the card and 23.6 GB of system RAM at 32K tokens.

Which quantization of Qwen3-Coder-Next fits in 16 GB of VRAM?

The RTX 5060 Ti 16GB alone cannot hold it: the smallest listed GGUF, Q2_K at 27.2 GB, needs 30.6 GB with an 8K context. With llama.cpp's --n-cpu-moe 35 and the Q4_K_M GGUF it uses 15.3 GB on the card and 31.6 GB of system RAM at 32K tokens.

Can I run Qwen3-Coder-Next 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 IQ4_XS (39.7 GB), with up to 127K tokens of 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 Q8_0 (79.0 GB), with its full 256K-token context. By default macOS lets the GPU use about 75% of unified memory.

How much more VRAM does Qwen3-Coder-Next need for 32K or 128K tokens of context?

Its FP16 KV cache is 192 MB at 8K, 768 MB at 32K, 3.00 GB at 128K for one request, so 128K adds 2.81 GB over 8K, plus 10% overhead. A q8_0 cache (-ctk q8_0 -ctv q8_0) takes 1.59 GB at 128K. Its 36 linear-attention layers keep a fixed-size state, so only 12 of 48 layers add cache.

Why does Qwen3-Coder-Next use more VRAM than its GGUF file size?

The file holds only the weights. At Q4_K_M with an 8K context: 45.2 GB of weights (the file's 48,528,320,544 bytes) + 192 MB of FP16 KV cache + 5.04 GB of compute buffers and runtime (0.5 GB + 10%) = 50.4 GB.

Does Qwen3-Coder-Next need less VRAM because only 3B parameters are active?

No. All 512 experts stay loaded, so the Q4_K_M file takes 45.2 GB. The active parameters decide speed: each generated token reads about 1.69 GB of them. With llama.cpp's --n-cpu-moe 26 and the Q4_K_M GGUF it uses 23.3 GB on the card and 23.6 GB of system RAM at 32K tokens.

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.

Qwen3-Coder-Next VRAM: 50.1 GB at Q4_K_M, 8K context

Numbers read from the model files on Hugging Face on . Compare it with other models in the reproducible model and GPU report.