DeepSeek V4-Pro

Four streams

×

Repeat the embedding into 4 identical streams.

X0,k=e0X_{0,{\htmlClass{vl-stream-k}{k}}}={\htmlData{light=embedded embedding}{e_0}}
(k=1,…,4)({\htmlClass{vl-stream-k}{k}}=1,\ldots,4)
in
e0e_0 [B batch, T positions, 7168 d]
out
X0X_0 [B batch, T positions, 4 streams, 7168 d]
Explanation

From here to the output the residual is four streams; every sublayer reads a weighted sum of them and writes into all of them.

Sources

In codeh.unsqueeze(2).repeat(1, 1, self.hc_mult, 1) · 805

Open pinned code ↗

Direct evidence

The forward: embed, repeat into four streams, apply the 61 layers with the token IDs, read out through the head; the MTP block is not run.

model.py 801–809 ↗ · deepseek-ai/DeepSeek-V4-Pro @ b5968e9190ef

Excerpt
    @torch.inference_mode()
    def forward(self, input_ids: torch.Tensor, start_pos: int = 0):
        h = self.embed(input_ids)
        # Expand to hc_mult copies for Hyper-Connections
        h = h.unsqueeze(2).repeat(1, 1, self.hc_mult, 1)
        for layer in self.layers:
            h = layer(h, start_pos, input_ids)
        logits = self.head(h, self.hc_head_fn, self.hc_head_scale, self.hc_head_base, self.norm)
        return logits

The reference configuration: 61 layers of width 7,168, 128 heads of 512 features with a 64-feature rotary part, a 1,536-feature query latent, a grouped output of 16 groups at rank 1,024, a window of 128, the per-layer compression ratios (128, 128, then 4 and 128 alternating, and 0 for the MTP block), an indexer of 64 heads of 128 keeping 1,024, hyper-connections of 4 streams with 20 Sinkhorn iterations, 384 routed experts of 3,072 of which 6 are used with 1 shared, square-root-softplus scores scaled by 2.5, three hash-routed layers, and YaRN over 65,536 positions.

config.json 1–34 ↗ · deepseek-ai/DeepSeek-V4-Pro @ b5968e9190ef

Excerpt
{
    "vocab_size": 129280,
    "dim": 7168,
    "moe_inter_dim": 3072,
    "n_layers": 61,
    "n_hash_layers": 3,
    "n_heads": 128,
    "n_routed_experts": 384,
    "n_shared_experts": 1,
    "n_activated_experts": 6,
    "score_func": "sqrtsoftplus",
    "route_scale": 2.5,
    "swiglu_limit": 10.0,
    "q_lora_rank": 1536,
    "head_dim": 512,
    "rope_head_dim": 64,
    "o_groups": 16,
    "o_lora_rank": 1024,
    "window_size": 128,
    "original_seq_len": 65536,
    "rope_theta": 10000,
    "rope_factor": 16,
    "beta_fast": 32,
    "beta_slow": 1,
    "index_n_heads": 64,
    "index_head_dim": 128,
    "index_topk": 1024,
    "hc_mult": 4,
    "hc_sinkhorn_iters": 20,
    "dtype": "fp8",
    "scale_fmt": "ue8m0",
    "expert_dtype": "fp4",
    "compress_rope_theta": 160000,
    "compress_ratios": [128, 128, 4, 128, 4, 128, 4, 128, 4, 128, 4, 128, 4, 128, 4, 128, 4, 128, 4, 128, 4, 128, 4, 128, 4, 128, 4, 128, 4, 128, 4, 128, 4, 128, 4, 128, 4, 128, 4, 128, 4, 128, 4, 128, 4, 128, 4, 128, 4, 128, 4, 128, 4, 128, 4, 128, 4, 128, 4, 128, 4, 0]