Pre-training step

Cross-entropy

×

The cross-entropy of the next token: the main loss, which the report’s Figure 3 draws beside the MTP losses.

LMain=CrossEntropy⁡(P2:T+1,t2:T+1)\mathcal L_{\mathrm{Main}}=\operatorname{CrossEntropy}(P_{2:T+1},t_{2:T+1})
in
PP [B batch, T positions, V]
out
LMain\mathcal L_{\mathrm{Main}} [1]

The report gives no formula for it: Figure 3 names it. The one here is written by analogy with eq. 24 at depth 0, in the report’s indices; the targets tt are the sequence’s own tokens, one place on.

Sources

Direct evidence

§2.2, Multi-Token Prediction: D sequential modules predict D additional tokens. The k-th module has a shared embedding layer, a shared output head, a Transformer block TRM_k and a projection matrix M_k; it combines the previous depth’s representation with the embedding of the (i+k)-th token, h′ = M_k[RMSNorm(h); RMSNorm(Emb(t_{i+k}))] (eq. 21), runs the block (eq. 22) and the shared head (eq. 23). The loss of a depth is a cross-entropy (eq. 24); the overall MTP loss is their average times a weight λ (eq. 25), “an additional training objective”.

DeepSeek-V3-technical-report-2412.19437v2.pdf pp. 10–11 ↗ · arXiv 2412.19437 @ v2