Qwen · Alibaba

Qwen3.5 122B-A10B

Qwen3.5 122B-A10B from Alibaba has 122,111,526,912 parameters in its language model, of which about 9.77B are used for each token (a mixture of experts). Its weights take 244 GB in BF16 and about 61.1 GB at 4-bit, and each token of context adds 24.6 KB of KV cache (805 MB at 32K tokens). The checkpoint also carries a 451M-parameter vision encoder.

122Bparameters
9.77Bactive per token
244 GBBF16 weights
61.1 GB4-bit weights
24.6 KBKV per token

Part of the Qwen3.5 family: 752M · 1.88B · 4.21B · 8.95B · 26.9B · 34.7B · 122B · 396B

Architecture · VRAM · KV cache · Tensor shapes · Parameter count · FLOPs

Architecture

ArchitectureQwen3_5MoeForConditionalGeneration
Layers (L)48
Hidden size (d)3,072
AttentionGQA (16 query heads share each KV head)
Heads32 query, 2 key/value, 256 each
Feed-forward256 experts of 1,024, 8 per token, plus 1 shared (SwiGLU)
Vocabulary (V)248,320
Tied embeddingsno: separate output head
Biasesnone
Extra normspre-norm (RMSNorm before attention and FFN)
Max context262,144 tokens
Linear attentionGated DeltaNet on 36 of 48 layers: 16 key heads and 64 value heads of 128; full attention (with a sigmoid output gate) on the other 12
Vision encoderViT, 27 layers, 1,152 wide: 451M parameters with the projector (in the checkpoint, used only for images)
Weights in the release–

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 of the language model alone need:

PrecisionBytes per parameterWeights
FP324488 GB454.90 GiB
BF16 / FP162244 GB227.45 GiB
INT8 / FP81122 GB113.73 GiB
INT40.561.1 GB56.86 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. The vision encoder adds 903 MB in BF16 when used. 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.

Memory calculator

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: 80 GB at 4-bit; BF16 and 8-bit need more than one 80 GB card.

GPU memoryBF168-bit4-bit
8 GB245 GBtoo big130 GBtoo big69.0 GBtoo big
12 GB245 GBtoo big130 GBtoo big69.0 GBtoo big
16 GB245 GBtoo big130 GBtoo big69.0 GBtoo big
24 GB245 GBtoo big130 GBtoo big69.0 GBtoo big
48 GB245 GBtoo big130 GBtoo big69.0 GBtoo big
64 GB245 GBtoo big130 GBtoo big69.0 GBtoo big
80 GB245 GBtoo big130 GBtoo big69.0 GB
80 GB × n4 cards2 cardsone 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 64 heads, plus the last 3 tokens for the short convolution), held in FP32: 156 MB per sequence, whatever the context length. See linear attention.

ContextKV cache, BF168-bit KVWeights + KV, BF16
4K101 MB50.3 MB244 GB
32K805 MB403 MB245 GB
128K3.2 GB1.6 GB247 GB
256K (max)6.4 GB3.2 GB251 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 (the language model's sit under language_model.); shapes are [out, in] for weight matrices, as PyTorch stores them. One block is shown: the model repeats it 48 times (in two kinds).

TensorShapeParameters
Embedding
model.language_model.embed_tokens.weight[248,320, 3,072]762,839,040
Linear-attention blocks (36 layers): model.layers.N.…
linear_attn.in_proj_qkv.weightqueries and keys for each key head, values for each value head[12,288, 3,072]37,748,736
linear_attn.in_proj_z.weightthe output gate[8,192, 3,072]25,165,824
linear_attn.in_proj_b.weightper head: how strongly to write (β)[64, 3,072]196,608
linear_attn.in_proj_a.weightper head: how fast to forget (α)[64, 3,072]196,608
linear_attn.conv1d.weighta depthwise convolution over the last 4 tokens[12,288, 1, 4]49,152
linear_attn.A_logper-head decay rate[64]64
linear_attn.dt_bias[64]64
linear_attn.norm.weightgated RMSNorm on each head's output[128]128
linear_attn.out_proj.weight[3,072, 8,192]25,165,824
mlp.gate.weightthe router[256, 3,072]786,432
mlp.experts.gate_up_projevery expert's gate and up, one tensor256 × [2,048, 3,072]1,610,612,736
mlp.experts.down_proj256 × [3,072, 1,024]805,306,368
mlp.shared_expert.gate_proj.weightshared expert: runs for every token[1,024, 3,072]3,145,728
mlp.shared_expert.up_proj.weight[1,024, 3,072]3,145,728
mlp.shared_expert.down_proj.weight[3,072, 1,024]3,145,728
mlp.shared_expert_gate.weighta sigmoid gate on the shared expert's output[1, 3,072]3,072
input_layernorm.weight[3,072]3,072
post_attention_layernorm.weight[3,072]3,072
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[16,384, 3,072]50,331,648
self_attn.k_proj.weight[512, 3,072]1,572,864
self_attn.v_proj.weight[512, 3,072]1,572,864
self_attn.o_proj.weight[3,072, 8,192]25,165,824
self_attn.q_norm.weightshared by every head[256]256
self_attn.k_norm.weight[256]256
mlp.gate.weightthe router[256, 3,072]786,432
mlp.experts.gate_up_projevery expert's gate and up, one tensor256 × [2,048, 3,072]1,610,612,736
mlp.experts.down_proj256 × [3,072, 1,024]805,306,368
mlp.shared_expert.gate_proj.weightshared expert: runs for every token[1,024, 3,072]3,145,728
mlp.shared_expert.up_proj.weight[1,024, 3,072]3,145,728
mlp.shared_expert.down_proj.weight[3,072, 1,024]3,145,728
mlp.shared_expert_gate.weighta sigmoid gate on the shared expert's output[1, 3,072]3,072
input_layernorm.weight[3,072]3,072
post_attention_layernorm.weight[3,072]3,072
After the last block
model.language_model.norm.weightfinal norm[3,072]3,072
lm_head.weightscores every token in the vocabulary[248,320, 3,072]762,839,040
Vision encoder: patches and positions
model.visual.patch_embed.proj.weighta 2×16×16 convolution over frames and pixels[1,152, 3, 2, 16, 16]1,769,472
model.visual.patch_embed.proj.bias[1,152]1,152
model.visual.pos_embed.weightlearned positions, interpolated to the image's grid[2,304, 1,152]2,654,208
Vision encoder: one layer (×27): …layers.N.…
blocks.N.attn.qkv.weight[3,456, 1,152]3,981,312
blocks.N.attn.qkv.bias[3,456]3,456
blocks.N.attn.proj.weight[1,152, 1,152]1,327,104
blocks.N.attn.proj.bias[1,152]1,152
blocks.N.mlp.linear_fc1.weight[4,304, 1,152]4,958,208
blocks.N.mlp.linear_fc1.bias[4,304]4,304
blocks.N.mlp.linear_fc2.weight[1,152, 4,304]4,958,208
blocks.N.mlp.linear_fc2.bias[1,152]1,152
blocks.N.norm1.weight[1,152]1,152
blocks.N.norm1.bias[1,152]1,152
blocks.N.norm2.weight[1,152]1,152
blocks.N.norm2.bias[1,152]1,152
Vision encoder: merger
model.visual.merger.norm.weight[1,152]1,152
model.visual.merger.norm.bias[1,152]1,152
model.visual.merger.linear_fc1.weighteach 2×2 group of patches, concatenated[4,608, 4,608]21,233,664
model.visual.merger.linear_fc1.bias[4,608]4,608
model.visual.merger.linear_fc2.weight[3,072, 4,608]14,155,776
model.visual.merger.linear_fc2.bias[3,072]3,072

The parameter count, step by step

Each line gives the formula, the numbers from config.json, and the subtotal. The symbols:

V
vocabulary 248,320
d
hidden size 3,072
L
layers 48
H
query heads 32
K
key/value heads 2
h
head size 256
E
routed experts 256
k
experts per token 8
f_e
expert FFN size 1,024

1. Embedding

One row of d numbers for each of the V tokens in the vocabulary.

Embedding
V × d
248,320 × 3,072
= 762,839,040

2. Linear-attention blocks (36 layers), ×36

Linear attention (Gated DeltaNet)
(2H_k·d_k+H_v·d_v) × d + H_v·d_v × d + 2 × (H_v × d) + (2H_k·d_k+H_v·d_v) × 1 × k + 2 × H_v + d_v + d × H_v·d_v
12,288 × 3,072 + 8,192 × 3,072 + 2 × (64 × 3,072) + 12,288 × 1 × 4 + 2 × 64 + 128 + 3,072 × 8,192
= 88,523,008
Mixture of experts (256 experts, 8 per token)
E × d + E × (2f_e × d) + E × (d × f_e) + 2 × (f_s × d) + d × f_s + 1 × d
256 × 3,072 + 256 × (2,048 × 3,072) + 256 × (3,072 × 1,024) + 2 × (1,024 × 3,072) + 3,072 × 1,024 + 1 × 3,072
= 2,426,145,792
Norms
2 × d
2 × 3,072
= 6,144
One block
linear attention + mixture of experts + norms
88,523,008 + 2,426,145,792 + 6,144
= 2,514,674,944
36 blocks
36 × block
36 × 2,514,674,944
= 90,528,297,984

3. Full-attention blocks (every 4th: layers 3, 7, …, 47), ×12

Attention (full, gated)
2·H·h × d + 2 × (K·h × d) + d × H·h + 2 × h
16,384 × 3,072 + 2 × (512 × 3,072) + 3,072 × 8,192 + 2 × 256
= 78,643,712
Mixture of experts (256 experts, 8 per token)
E × d + E × (2f_e × d) + E × (d × f_e) + 2 × (f_s × d) + d × f_s + 1 × d
256 × 3,072 + 256 × (2,048 × 3,072) + 256 × (3,072 × 1,024) + 2 × (1,024 × 3,072) + 3,072 × 1,024 + 1 × 3,072
= 2,426,145,792
Norms
2 × d
2 × 3,072
= 6,144
One block
attention + mixture of experts + norms
78,643,712 + 2,426,145,792 + 6,144
= 2,504,795,648
12 blocks
12 × block
12 × 2,504,795,648
= 30,057,547,776

4. Final norm and output head

Final norm + head
d + V × d
3,072 + 248,320 × 3,072
= 762,842,112

5. Total

Language model
embedding + blocks + final
762,839,040 + 90,528,297,984 + 30,057,547,776 + 762,842,112
= 122,111,526,912

6. Active parameters per token

The router sends each token to 8 of the 256 experts in each MoE block, so only those experts' weights are used, plus the shared expert, which every token uses. One routed expert is 9,437,184 parameters.

Active
total − MoE blocks × (E − k) × expert
122,111,526,912 − 48 × 248 × 9,437,184
= 9,771,288,576

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.

MTP: its own pieces
3 × d + d × 2d
3 × 3,072 + 3,072 × 6,144
= 18,883,584
MTP: a full-attention block
2·H·h × d + 2 × (K·h × d) + d × H·h + 2 × h + E × d + E × (2f_e × d) + E × (d × f_e) + 2 × (f_s × d) + d × f_s + 1 × d + 2 × d
16,384 × 3,072 + 2 × (512 × 3,072) + 3,072 × 8,192 + 2 × 256 + 256 × 3,072 + 256 × (2,048 × 3,072) + 256 × (3,072 × 1,024) + 2 × (1,024 × 3,072) + 3,072 × 1,024 + 1 × 3,072 + 2 × 3,072
= 2,504,795,648

8. Vision encoder

The checkpoint also holds an image encoder (Llama 4's own ViT, 27 layers of width d_v = 1,152, MLP f_v = 4,304) and a projector into the language model. It runs only when the prompt has an image, so it is listed apart from the language model.

patches and positions

Patch embedding
d_v × C × t × p × p + d_v + n_pos × d_v
1,152 × 3 × 2 × 16 × 16 + 1,152 + 2,304 × 1,152
= 4,424,832

one layer, ×27

Attention
3d_v × d_v + 3d_v + d_v × d_v + d_v
3,456 × 1,152 + 3,456 + 1,152 × 1,152 + 1,152
= 5,313,024
MLP
f_v × d_v + f_v + d_v × f_v + d_v
4,304 × 1,152 + 4,304 + 1,152 × 4,304 + 1,152
= 9,921,872
LayerNorms
4 × d_v
4 × 1,152
= 4,608
One block
attention + mlp + layernorms
5,313,024 + 9,921,872 + 4,608
= 15,239,504
27 blocks
27 × block
27 × 15,239,504
= 411,466,608

merger

Into the language model
2 × d_v + d_v·m² × d_v·m² + d_v·m² + d × d_v·m² + d
2 × 1,152 + 4,608 × 4,608 + 4,608 + 3,072 × 4,608 + 3,072
= 35,399,424
Vision encoder
the parts above
4,424,832 + 411,466,608 + 35,399,424
= 451,290,864
In the checkpoint
language model + MTP + vision
122,111,526,912 + 2,523,679,232 + 451,290,864
= 125,086,497,008

Hugging Face counts 125,086,497,008 parameters in the Qwen/Qwen3.5-122B-A10B 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 × 9,771,288,576 = 19.5 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 T2NAttentionTotal per token
4K19.5 GFLOPs1.8 GFLOPs21.3 GFLOPs
32K19.5 GFLOPs13.0 GFLOPs32.6 GFLOPs
128K19.5 GFLOPs51.7 GFLOPs71.2 GFLOPs
256K19.5 GFLOPs103.2 GFLOPs122.8 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

Compare with any model →

Close in size: Nemotron 3 Super 120B-A12B 121B · Devstral 2 (123B) 125B · gpt-oss-120b 117B · Llama 4 Scout (17B-16E) 108B · GLM-4.5-Air 107B

Source

Read from Qwen/Qwen3.5-122B-A10B, fetched 2026-12-03.