Ling · inclusionAI (Ant Group)

Ling-1T

Ling-1T from inclusionAI (Ant Group) has 999,705,328,640 parameters, of which about 51.1B are used for each token (a mixture of experts). Its weights take 2 TB in BF16 and about 500 GB at 4-bit, and each token of context adds 327.7 KB of KV cache (10.7 GB at 32K tokens).

1000Bparameters
51.1Bactive per token
2 TBBF16 weights
500 GB4-bit weights
327.7 KBKV per token

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

Architecture

ArchitectureBailingMoeV2ForCausalLM
Layers (L)80
Hidden size (d)8,192
AttentionGQA (8 query heads share each KV head)
Heads64 query, 8 key/value, 128 each
Feed-forward256 experts of 2,048, 8 per token, plus 1 shared (SwiGLU); 4 dense layers (layers 0–3) with FFN 18,432
Vocabulary (V)157,184
Tied embeddingsno: separate output head
Biasesnone
Extra normsRMSNorm on q and k (per head)
Max context32,768 tokens
Weights in the releasebfloat16

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:

PrecisionBytes per parameterWeights
FP3244 TB3724.19 GiB
BF16 / FP1622 TB1862.10 GiB
INT8 / FP811000 GB931.05 GiB
INT40.5500 GB465.52 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.

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):

Too big for any single card up to 80 GB, even at 4-bit: it needs 565 GB there. Split across 80 GB GPUs it takes at least 26 at BF16, 14 at 8-bit, 8 at 4-bit (the last row).

GPU memoryBF168-bit4-bit
80 GB2 TBtoo big1.06 TBtoo big565 GBtoo big
80 GB × n26 cards14 cards8 cards

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.

Every layer keeps a key and a value vector for each of its 8 KV heads, for every token in the context:

2 × L × K × h × 2 bytes = 2 × 80 × 8 × 128 × 2 = 327,680 bytes per token

Grouped-query attention is why this is small: with a KV head for each of the 64 query heads it would be 8 times larger.

ContextKV cache, BF168-bit KVWeights + KV, BF16
4K1.3 GB671 MB2 TB
32K (max)10.7 GB5.4 GB2.01 TB

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 80 times (in two kinds).

TensorShapeParameters
Embedding
model.word_embeddings.weight[157,184, 8,192]1,287,651,328
Dense blocks (layers 0–3): model.layers.N.…
attention.query_key_value.weightq, k and v in one matrix[10,240, 8,192]83,886,080
attention.dense.weight[8,192, 8,192]67,108,864
attention.query_layernorm.weightshared by every head[128]128
attention.key_layernorm.weight[128]128
mlp.gate_proj.weight[18,432, 8,192]150,994,944
mlp.up_proj.weight[18,432, 8,192]150,994,944
mlp.down_proj.weight[8,192, 18,432]150,994,944
input_layernorm.weight[8,192]8,192
post_attention_layernorm.weight[8,192]8,192
MoE blocks (layers 4–79): model.layers.N.…
attention.query_key_value.weightq, k and v in one matrix[10,240, 8,192]83,886,080
attention.dense.weight[8,192, 8,192]67,108,864
attention.query_layernorm.weightshared by every head[128]128
attention.key_layernorm.weight[128]128
mlp.gate.weightthe router: one score per expert[256, 8,192]2,097,152
mlp.gate.expert_biasrouting only[256]256
mlp.experts.{0…255}.gate_proj.weight256 × [2,048, 8,192]4,294,967,296
mlp.experts.{0…255}.up_proj.weight256 × [2,048, 8,192]4,294,967,296
mlp.experts.{0…255}.down_proj.weight256 × [8,192, 2,048]4,294,967,296
mlp.shared_experts.gate_proj.weightshared expert: runs for every token[2,048, 8,192]16,777,216
mlp.shared_experts.up_proj.weightshared expert: runs for every token[2,048, 8,192]16,777,216
mlp.shared_experts.down_proj.weightshared expert: runs for every token[8,192, 2,048]16,777,216
input_layernorm.weight[8,192]8,192
post_attention_layernorm.weight[8,192]8,192
After the last block
model.norm.weightfinal norm[8,192]8,192
lm_head.weightscores every token in the vocabulary[157,184, 8,192]1,287,651,328

The parameter count, step by step

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

V
vocabulary 157,184
d
hidden size 8,192
L
layers 80
H
query heads 64
K
key/value heads 8
h
head size 128
f
FFN hidden size 18,432
E
routed experts 256
k
experts per token 8
f_e
expert FFN size 2,048

1. Embedding

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

Embedding
V × d
157,184 × 8,192
= 1,287,651,328

2. Dense blocks (layers 0–3), ×4

Attention
(H+2K)·h × d + d × H·h + 2 × h
10,240 × 8,192 + 8,192 × 8,192 + 2 × 128
= 150,995,200
Feed-forward (SwiGLU)
2 × (f × d) + d × f
2 × (18,432 × 8,192) + 8,192 × 18,432
= 452,984,832
Norms
2 × d
2 × 8,192
= 16,384
One block
attention + feed-forward + norms
150,995,200 + 452,984,832 + 16,384
= 603,996,416
4 blocks
4 × block
4 × 603,996,416
= 2,415,985,664

3. MoE blocks (layers 4–79), ×76

Attention
(H+2K)·h × d + d × H·h + 2 × h
10,240 × 8,192 + 8,192 × 8,192 + 2 × 128
= 150,995,200
Mixture of experts (256 experts, 8 per token)
E × d + E + 2 × (E × (f_e × d)) + E × (d × f_e) + 2 × (f_e × d) + d × f_e
256 × 8,192 + 256 + 2 × (256 × (2,048 × 8,192)) + 256 × (8,192 × 2,048) + 2 × (2,048 × 8,192) + 8,192 × 2,048
= 12,937,330,944
Norms
2 × d
2 × 8,192
= 16,384
One block
attention + mixture of experts + norms
150,995,200 + 12,937,330,944 + 16,384
= 13,088,342,528
76 blocks
76 × block
76 × 13,088,342,528
= 994,714,032,128

4. Final norm and output head

Final norm + head
d + V × d
8,192 + 157,184 × 8,192
= 1,287,659,520

5. Total

Total
embedding + blocks + final
1,287,651,328 + 2,415,985,664 + 994,714,032,128 + 1,287,659,520
= 999,705,328,640

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 50,331,648 parameters.

Active
total − MoE blocks × (E − k) × expert
999,705,328,640 − 76 × 248 × 50,331,648
= 51,054,427,136

Hugging Face counts 999,705,328,640 parameters in the inclusionAI/Ling-1T 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 × 51,054,427,136 = 102.1 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
4K102.1 GFLOPs10.7 GFLOPs112.8 GFLOPs
32K102.1 GFLOPs85.9 GFLOPs188.0 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: Kimi K2 1.03T · Inkling 947B · GLM-5.2 743B · DeepSeek-V3.2 672B · DeepSeek-V3 671B

Source

Read from inclusionAI/Ling-1T, fetched 2026-12-03. Ring-1T, the reasoning version, has the same shapes.