[bugfix]Indexer init skip and MTP TopK share for iteration (#45895)

Signed-off-by: JaredforReal <w13431838023@gmail.com>
This commit is contained in:
Jared Wen
2026-06-19 09:57:51 +08:00
committed by GitHub
parent 9ea3a4015b
commit ab66606993
9 changed files with 69 additions and 30 deletions
+6 -2
View File
@@ -119,8 +119,12 @@ class DeepSeekMultiTokenPredictorLayer(nn.Module):
hidden_states=hidden_states,
residual=None,
)
hidden_states = residual + hidden_states
return hidden_states
hidden_states = residual + hidden_states # pre-final-norm (logits hidden)
# Recycle the post-final-norm hidden into the next draft step.
# compute_logits applies shared_head (== final norm) to the pre-norm
# element, so logits and the recycle each get exactly one final-norm.
# Matches SGLang's deepseek_nextn.
return hidden_states, self.shared_head(hidden_states)
class DeepSeekMultiTokenPredictor(nn.Module):