Qwen · Alibaba
Qwen3-Next 80B-A3B
Qwen3-Next 80B-A3B from Alibaba has 79,674,391,296 parameters, of which about 3.87B are used for each token (a mixture of experts). Its weights take 159 GB in BF16 and about 39.8 GB at 4-bit, and each token of context adds 24.6 KB of KV cache (805 MB at 32K tokens).
Architecture · VRAM · KV cache · Tensor shapes · Parameter count · FLOPs
Architecture
| Architecture | Qwen3NextForCausalLM |
|---|---|
| Layers (L) | 48 |
| Hidden size (d) | 2,048 |
| Attention | GQA (8 query heads share each KV head) |
| Heads | 16 query, 2 key/value, 256 each |
| Feed-forward | 512 experts of 512, 10 per token, plus 1 shared (SwiGLU) |
| Vocabulary (V) | 151,936 |
| Tied embeddings | no: separate output head |
| Biases | none |
| Extra norms | pre-norm (RMSNorm before attention and FFN) |
| Max context | 262,144 tokens |
| Linear attention | Gated DeltaNet on 36 of 48 layers: 16 key heads and 32 value heads of 128; full attention (with a sigmoid output gate) on the other 12 |
| Weights in the release | bfloat16 |
How much memory the weights need
Each parameter takes 4 bytes in FP32, 2 in BF16, 1 at 8 bits and half a byte at 4 bits, so the weights alone need:
| Precision | Bytes per parameter | Weights | |
|---|---|---|---|
| FP32 | 4 | 319 GB | 296.81 GiB |
| BF16 / FP16 | 2 | 159 GB | 148.41 GiB |
| INT8 / FP8 | 1 | 79.7 GB | 74.20 GiB |
| INT4 | 0.5 | 39.8 GB | 37.10 GiB |
GB here is 109 bytes; GiB (230) is what tools like nvidia-smi show. Real 4-bit files are a little larger: they also store scales, and some layers are often kept at higher precision. Every expert has to be in memory, not just the active ones: the router picks different experts for each token. A running model also needs its KV cache, activations and the runtime's own buffers.
On common GPUs
Whether the weights plus a 8K-token KV cache fit in 90% of the card (how this is worked out):
Smallest card: 48 GB at 4-bit; BF16 and 8-bit need more than one 80 GB card.
| GPU memory | BF16 | 8-bit | 4-bit |
|---|---|---|---|
| 8 GB | 160 GBtoo big | 84.9 GBtoo big | 45.1 GBtoo big |
| 12 GB | 160 GBtoo big | 84.9 GBtoo big | 45.1 GBtoo big |
| 16 GB | 160 GBtoo big | 84.9 GBtoo big | 45.1 GBtoo big |
| 24 GB | 160 GBtoo big | 84.9 GBtoo big | 45.1 GBtoo big |
| 48 GB | 160 GBtoo big | 84.9 GBtoo big | 45.1 GB |
| 64 GB | 160 GBtoo big | 84.9 GBtoo big | 45.1 GB |
| 80 GB | 160 GBtoo big | 84.9 GBtoo big | 45.1 GB |
| 80 GB × n | 3 cards | 2 cards | one is enough |
Each cell is the weights plus the 8K-token KV cache at that precision; ✓ where it fits. The 80 GB × n row divides that evenly over n cards (tensor or pipeline parallel), the best case: real splits duplicate some buffers.
KV cache
What it is: the KV cache, explained.
Only some layers keep keys and values, and not all of the same size:
12 attention layers × 2 × 2 × 256 × 2 bytes = 24,576 bytes per token
The 36 linear-attention layers cache no keys or values. Each keeps a fixed-size state instead (a 128 × 128 matrix for each of 32 heads, plus the last 3 tokens for the short convolution), held in FP32: 79.0 MB per sequence, whatever the context length. See linear attention.
| Context | KV cache, BF16 | 8-bit KV | Weights + KV, BF16 |
|---|---|---|---|
| 4K | 101 MB | 50.3 MB | 159 GB |
| 32K | 805 MB | 403 MB | 160 GB |
| 128K | 3.2 GB | 1.6 GB | 163 GB |
| 256K (max) | 6.4 GB | 3.2 GB | 166 GB |
For one sequence. Batching multiplies the KV cache by the number of sequences, not the weights.
Every tensor shape
The names are those in the Hugging Face checkpoint; shapes are [out, in] for weight matrices, as PyTorch stores them. One block is shown: the model repeats it 48 times (in two kinds).
| Tensor | Shape | Parameters |
|---|---|---|
| Embedding | ||
model.embed_tokens.weight | [151,936, 2,048] | 311,164,928 |
| Linear-attention blocks (36 layers): model.layers.N.… | ||
linear_attn.in_proj_qkvz.weightq, k, v and the output gate z | [12,288, 2,048] | 25,165,824 |
linear_attn.in_proj_ba.weightper head: write strength β and decay α | [64, 2,048] | 131,072 |
linear_attn.conv1d.weighta depthwise convolution over the last 4 tokens | [8,192, 1, 4] | 32,768 |
linear_attn.A_logper-head decay rate | [32] | 32 |
linear_attn.dt_bias | [32] | 32 |
linear_attn.norm.weightgated RMSNorm on each head's output | [128] | 128 |
linear_attn.out_proj.weight | [2,048, 4,096] | 8,388,608 |
mlp.gate.weightthe router | [512, 2,048] | 1,048,576 |
mlp.experts.{0…511}.gate_proj.weight | 512 × [512, 2,048] | 536,870,912 |
mlp.experts.{0…511}.up_proj.weight | 512 × [512, 2,048] | 536,870,912 |
mlp.experts.{0…511}.down_proj.weight | 512 × [2,048, 512] | 536,870,912 |
mlp.shared_expert.gate_proj.weightshared expert: runs for every token | [512, 2,048] | 1,048,576 |
mlp.shared_expert.up_proj.weight | [512, 2,048] | 1,048,576 |
mlp.shared_expert.down_proj.weight | [2,048, 512] | 1,048,576 |
mlp.shared_expert_gate.weighta sigmoid gate on the shared expert's output | [1, 2,048] | 2,048 |
input_layernorm.weight | [2,048] | 2,048 |
post_attention_layernorm.weight | [2,048] | 2,048 |
| Full-attention blocks (every 4th: layers 3, 7, …, 47): model.layers.N.… | ||
self_attn.q_proj.weightqueries and a sigmoid gate on the output, per head | [8,192, 2,048] | 16,777,216 |
self_attn.k_proj.weight | [512, 2,048] | 1,048,576 |
self_attn.v_proj.weight | [512, 2,048] | 1,048,576 |
self_attn.o_proj.weight | [2,048, 4,096] | 8,388,608 |
self_attn.q_norm.weightshared by every head | [256] | 256 |
self_attn.k_norm.weight | [256] | 256 |
mlp.gate.weightthe router | [512, 2,048] | 1,048,576 |
mlp.experts.{0…511}.gate_proj.weight | 512 × [512, 2,048] | 536,870,912 |
mlp.experts.{0…511}.up_proj.weight | 512 × [512, 2,048] | 536,870,912 |
mlp.experts.{0…511}.down_proj.weight | 512 × [2,048, 512] | 536,870,912 |
mlp.shared_expert.gate_proj.weightshared expert: runs for every token | [512, 2,048] | 1,048,576 |
mlp.shared_expert.up_proj.weight | [512, 2,048] | 1,048,576 |
mlp.shared_expert.down_proj.weight | [2,048, 512] | 1,048,576 |
mlp.shared_expert_gate.weighta sigmoid gate on the shared expert's output | [1, 2,048] | 2,048 |
input_layernorm.weight | [2,048] | 2,048 |
post_attention_layernorm.weight | [2,048] | 2,048 |
| After the last block | ||
model.norm.weightfinal norm | [2,048] | 2,048 |
lm_head.weightscores every token in the vocabulary | [151,936, 2,048] | 311,164,928 |
The parameter count, step by step
Each line gives the formula, the numbers from config.json, and the subtotal. The symbols:
- V
- vocabulary 151,936
- d
- hidden size 2,048
- L
- layers 48
- H
- query heads 16
- K
- key/value heads 2
- h
- head size 256
- E
- routed experts 512
- k
- experts per token 10
- f_e
- expert FFN size 512
1. Embedding
One row of d numbers for each of the V tokens in the vocabulary.
2. Linear-attention blocks (36 layers), ×36
3. Full-attention blocks (every 4th: layers 3, 7, …, 47), ×12
4. Final norm and output head
5. Total
6. Active parameters per token
The router sends each token to 10 of the 512 experts in each MoE block, so only those experts' weights are used, plus the shared expert, which every token uses. One routed expert is 3,145,728 parameters.
7. Multi-token prediction
The checkpoint also ships 1 multi-token-prediction module, trained to guess tokens further ahead. It is not used for ordinary decoding (it can drive speculative decoding), so it is left out of the total above but is in the files.
Hugging Face counts 81,324,862,720 parameters in the Qwen/Qwen3-Next-80B-A3B-Instruct safetensors files. The arithmetic above matches exactly.
FLOPs per token
A forward pass costs about two floating-point operations (a multiply and an add) for every weight a token passes through: 2 × N, with N the active weights used in matrix multiplies (the embedding lookup is a read, not a multiply; the output head is a multiply). Here that is 2 × 3,874,929,408 = 7.7 GFLOPs per token.
Attention adds the work of comparing the token with every earlier one: 2 × L × T × H × (hqk + hv) for T tokens of context, which grows with the context while 2N does not.
That is for one new token at position T, as when generating. Averaged over a whole training sequence of length T, each token sees T/2 earlier ones on average, which halves it.
| Context T | 2N | Attention | Total per token |
|---|---|---|---|
| 4K | 7.7 GFLOPs | 880.8 MFLOPs | 8.6 GFLOPs |
| 32K | 7.7 GFLOPs | 6.5 GFLOPs | 14.3 GFLOPs |
| 128K | 7.7 GFLOPs | 25.8 GFLOPs | 33.6 GFLOPs |
| 256K | 7.7 GFLOPs | 51.6 GFLOPs | 59.4 GFLOPs |
Training costs about three times the forward pass per token (6N): the backward pass does roughly twice the forward work.
More in the glossary: FLOPs per token · quantization · parameters.
Compare
Qwen3-Next 80B-A3B vs gpt-oss-120b · Compare with any model →
Close in size: Qwen2.5 72B 72.7B · Llama 3.1 70B 70.6B · Llama 3.3 70B 70.6B · DeepSeek-R1-Distill-Llama-70B 70.6B · GLM-4.5-Air 107B
Source
Read from Qwen/Qwen3-Next-80B-A3B-Instruct, fetched 2026-12-03. Only the post-trained (Instruct and Thinking) versions were released; their shapes are the same.