Raw textto [B, T, 129280]
stage: Dense warm-up
Specification
- Attention
- 128 heads; keys 128 + 64 rotary features, values 128; latents: query 1,536, key–value 512Lightning indexer: 64 heads of 128 features, keeping 2,048 positions per query.config_671B_v3.2.json 8, 16–20, 23–25
- Feed-forward
- 256 routed + 1 shared experts; 8 routed chosen per token; 2,048 hidden features eachThe first 3 layers have a dense SwiGLU of 18,432 hidden features instead.config_671B_v3.2.json 4–5, 9–11
- Allocated length
- 16,384 positionsThe reference’s
max_seq_len: it sizes the caches and the rotation table, and generation stops there, prompt included. The release configuration leaves this default in place.model.py 56, 335, 541–542, 453–454generate.py 52–53 - Used per token
- 38.4 B of 671.9 B parameters (5.7%)Both counts include every layer’s indexer, and the embedding table and output head whole; without those two tables, 36.6 B per token.config_671B_v3.2.json 9–11model.py 790–803
- Not drawn
- The reference builds no multi-token-prediction module, and the atlas draws none.model.py 880–887
Parameters671,877,944,064
671,877,944,064 parameters in DeepSeek-V3.2-Exp
| Component | Calculation | Parameters |
|---|---|---|
| Token embedding | 129,280 × 7,168 | 926,679,040 |
| Layers | 670,024,578,816 | |
| Final RMSNorm | 7,168 | |
| Vocabulary projection | 7,168 × 129,280 | 926,679,040 |
| Model total | 671,877,944,064 | |
Counted from the pinned configuration and code. The total matches the checkpoint’s tensors, apart from the FP8 block scales and the multi-token-prediction module.
- Weights
- 629.4 GiB in FP8Stored as FP8 matrices, block scales left out; the embedding table and the router’s matrices in bfloat16; the output head, the norms, the router’s bias and the indexer’s head weights in float32.config_671B_v3.2.json 2–3, 21model.py 876, 183–187, 108, 885–886, 284, 317–318, 674–675, 449generate.py 109
Sources
Direct evidence
The released 671B configuration: width, layers, dense layers, heads, experts and routing, MLA ranks and head widths, indexer heads and top-k.
config_671B_v3.2.json 1–26 ↗ · deepseek-ai/DeepSeek-V3.2-Exp @ 87e509a2e5a1
Excerpt
{
"vocab_size": 129280,
"dim": 7168,
"inter_dim": 18432,
"moe_inter_dim": 2048,
"n_layers": 61,
"n_dense_layers": 3,
"n_heads": 128,
"n_routed_experts": 256,
"n_shared_experts": 1,
"n_activated_experts": 8,
"n_expert_groups": 8,
"n_limited_groups": 4,
"route_scale": 2.5,
"score_func": "sigmoid",
"q_lora_rank": 1536,
"kv_lora_rank": 512,
"qk_nope_head_dim": 128,
"qk_rope_head_dim": 64,
"v_head_dim": 128,
"dtype": "fp8",
"scale_fmt": "ue8m0",
"index_n_heads": 64,
"index_head_dim": 128,
"index_topk": 2048
}Reference defaults the configuration does not override: maximum sequence length, YaRN RoPE settings and the softmax scale correction.
model.py 56–86 ↗ · deepseek-ai/DeepSeek-V3.2-Exp @ 87e509a2e5a1
Excerpt
max_seq_len: int = 4096 * 4… lines 57–80 omitted …
original_seq_len: int = 4096
rope_theta: float = 10000.0
rope_factor: float = 40
beta_fast: int = 32
beta_slow: int = 1
mscale: float = 1.The model embeds tokens, applies all layers with a causal mask, normalizes and projects to vocabulary logits with an untied head. The reference generator projects only the last position; training projects every position.
model.py 880–908 ↗ · deepseek-ai/DeepSeek-V3.2-Exp @ 87e509a2e5a1
Excerpt
self.embed = ParallelEmbedding(args.vocab_size, args.dim)
self.layers = torch.nn.ModuleList()
for layer_id in range(args.n_layers):
self.layers.append(Block(layer_id, args))
self.norm = RMSNorm(args.dim)
# lm_head in the checkpoint is stored in bf16, while the parameter here is stored in fp32 for easier computation of logits later.
self.head = ColumnParallelLinear(args.dim, args.vocab_size, dtype=torch.float32)
self.register_buffer("freqs_cis", precompute_freqs_cis(args), persistent=False)… lines 888–900 omitted …
seqlen = tokens.size(1)
freqs_cis = self.freqs_cis[start_pos:start_pos+seqlen]
mask = torch.full((seqlen, seqlen), float("-inf"), device=tokens.device).triu_(1) if seqlen > 1 else None
h, residual = self.embed(tokens), None
for layer in self.layers:
h, residual = layer(h, residual, start_pos, freqs_cis, mask)
h, _ = self.norm(h, residual)
logits = self.head(h[:, -1].float())