Add separate final normalization for Multi-Token Prediction in DeepSeek models. - #5142
Open
copybara-service[bot] wants to merge 1 commit into
Open
Add separate final normalization for Multi-Token Prediction in DeepSeek models.#5142copybara-service[bot] wants to merge 1 commit into
copybara-service[bot] wants to merge 1 commit into
Conversation
copybara-service
Bot
requested review from
NuojCheng,
RissyRan,
aireenmei,
bvandermoon,
darisoy,
gagika,
gobbleturk,
hengtaoguo,
huytransformer,
igorts-git,
jiangjy1982,
parambole,
richjames0,
shralex,
shuningjin,
xibinliu and
zxhe-sean
as code owners
September 4, 2026 15:48
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
…ek models. # Description This change adds the MTP-specific final normalization layer in DeepSeek models. It updates the checkpoint conversion script to load the MTP final norm weight instead of skipping it. It also updates the decoder's output head to skip normalization, allowing the MTP block to apply its own final norm before projecting hidden states to logits. # Tests # Checklist Before submitting this PR, please make sure (put X in square brackets): - [] I have performed a self-review of my code. For an optional AI review, add the `gemini-review` label. - [] I have necessary comments in my code, particularly in hard-to-understand areas. - [] I have run end-to-end tests tests and provided workload links above if applicable. - [] I have made or will make corresponding changes to the doc if needed, including adding new documentation pages to the relevant Table of Contents (toctree directive) as explained in our documentation. PiperOrigin-RevId: 975503733
copybara-service
Bot
force-pushed
the
test_975503733
branch
from
September 4, 2026 20:43
49a4460 to
e6e4700
Compare
copybara-service
Bot
requested review from
A9isha,
SurbhiJainUSC,
abhinavclemson,
dipannita08,
khatwanimohit and
vipannalla
as code owners
September 4, 2026 20:43
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add separate final normalization for Multi-Token Prediction in DeepSeek models.
Description
This change adds the MTP-specific final normalization layer in DeepSeek models. It updates the checkpoint conversion script to load the MTP final norm weight instead of skipping it. It also updates the decoder's output head to skip normalization, allowing the MTP block to apply its own final norm before projecting hidden states to logits.
Tests
Checklist
Before submitting this PR, please make sure (put X in square brackets):
gemini-reviewlabel.