feat: Add MTP projection-to-logits smoke#650
Conversation
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 WalkthroughWalkthroughRefactors ChangesDeepSeek-V4 MTP Logits and Tail Smoke Tests
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Code Review
This pull request introduces DeepSeek-V4 MTP logits and tail contract validation smoke tests, implementing deepseek_v4_mtp_logits and deepseek_v4_mtp_tail using PyPTO. It also refactors mtp_projection.py to expose an inlined implementation. Feedback highlights an assertion failure due to T_TILE being larger than T, and suggests an optimization to use a pipelined loop with a conditional check in mtp_local_logits to improve hardware utilization on CANN/Ascend.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
a9ab2ec to
186c486
Compare
186c486 to
a9ab2ec
Compare
a9ab2ec to
bd333e0
Compare
Summary
mtp_projection.pyto exposemtp_projection_implas a reusable inline JIT while keeping the existing standalonemtp_projectionvalidation entry.deepseek_v4_mtp_logits.pyto validate the MTP logits path frommtp_hiddentocandidate_logits, including local logits and shared-head-norm logits cases.deepseek_v4_mtp_tail.pyto composemtp_projection_impl -> mtp_local_logits, validating the MTP projection-to-logits tail path end to end.MATMUL_T_TILE = 16while preserving the real[T, VOCAB_SHARD]output contract.--dump-passessupport to the new smoke entry points for compile pipeline debugging.Testing
git diff --check origin/main...HEADpython -m py_compile models/deepseek/v4/mtp_projection.py models/deepseek/v4/deepseek_v4_mtp_logits.py models/deepseek/v4/deepseek_v4_mtp_tail.pyRelated Issues
None