Conversation
nh13
force-pushed
the
dsv4/01-core-model
branch
from
August 28, 2026 03:42
d8aea78 to
ec083a1
Compare
nh13
force-pushed
the
dsv4/01-core-model
branch
from
August 28, 2026 23:36
ec083a1 to
5ab3413
Compare
nh13
force-pushed
the
dsv4/01-core-model
branch
from
August 28, 2026 23:57
5ab3413 to
d186f45
Compare
nh13
force-pushed
the
dsv4/01-core-model
branch
from
August 29, 2026 00:31
d186f45 to
70819eb
Compare
Adds the DeepSeek-V4 MTP head (MTPBlock) plus mtp_forward / make_mtp_cache, extracted from the base-model PR as a self-contained follow-up. The module is scaffolding for MTP decoding: it builds and is unit-tested on a fresh model, but real checkpoints ship MTP heads that do not map to it yet, so sanitize drops them and loads the base model. The speculative-decode path and the MTP weight loading that consume this module follow in later PRs.
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.
Stacked follow-on to ml-explore#1797 (the base-model PR), opened in my fork so that PR stays single-concern.
Adds the DeepSeek-V4 MTP (multi-token prediction) module —
MTPBlockplusmtp_forward/make_mtp_cache, unit-tested on a freshly-built model. It is scaffolding: real checkpoints ship MTP heads that do not map to this module yet, sosanitizedrops them and loads the base model. The speculative-decode wiring and the MTP weight loading that consume this module come in later PRs.(Placeholder description — edit as needed.)