Skip to content

[Feature] Preserve external frozen MTP across RL updates and checkpoints - #2289

Draft
xs1997zju wants to merge 3 commits into
InternLM:mainfrom
xs1997zju:rl/frozen-mtp-external-main
Draft

xs1997zju wants to merge 3 commits into
InternLM:mainfrom
xs1997zju:rl/frozen-mtp-external-main

Conversation

@xs1997zju

@xs1997zju xs1997zju commented Nov 10, 2026 •

Copy link
Copy Markdown
Collaborator

When the actor omits MTP, this opt-in adapter binds a content-fingerprinted external frozen MTP source to native weight publication and role checkpoints. Main/shared embedding and head weights still come from the current actor; dedicated mtp.* buckets are replayed before the final update marker. HF completion writes the frozen shard, index, source record and READY; DCP restore checks the required source identity before loading the role.

Base: main 74a4495d906d09e264612c5b45ae456ab80fb35e; head 299a071bba5f753fa82590ea8550317c68c9a316. This main snapshot differs from the base used by #2257/#2292; integration/rebase and overlapping documentation hunks need deliberate handling before merging.

Configuration and alternative

Supported contract: Qwen3.5 MoE actor with mtp_config=None, LMDeploy PyTorch TP1/EP1, IPC or NCCL, speculative qwen3_5_mtp. Source metadata/content are checked, not inferred from paths. Native frozen MTP #2292 is an alternative; do not enable both. Existing validate_model rejects every non-None actor MTP config, including native frozen configs. CRG retains the external compatibility default; selecting its explicit native route uses #2292 instead.

Validation and review fixes

Real Kimi CLI reviewed the original diff with the full original xt-review prompt, then reviewed the confirmed fix. If an actor HF index omits total_size, completion now preserves that omission instead of inventing an MTP-only partial total. The new regression fails in two cases on the old code and all three cases pass on the fix. The final 32-case CPU suite passes with the declared CPU-only empty_cache no-op adaptation, actual pinned LMDeploy code and real two-rank gloo checks. The initial sandbox attempt's five environment failures are retained separately; this is not GPU evidence.

Keep Draft: no external-route GPU receiver/online acceptance is established by this native-MTP validation. Actual transfer, receiver assembly, level2 recovery and generation for this external route require their own integration validation. The completed native #2292 GPU results are not transferred to this PR. No speedup, learning or automatic replacement/closure claim.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant