Skip to content

[Feature] Support dense MTP construction and preserve frozen weights through export - #2390

Open
jayhenry wants to merge 1 commit into
fix/mini-agent-driver-shutdownfrom
feat/dense-mtp-frozen-export
Open

jayhenry wants to merge 1 commit into
fix/mini-agent-driver-shutdownfrom
feat/dense-mtp-frozen-export

Conversation

@jayhenry

@jayhenry jayhenry commented Dec 4, 2026

Copy link
Copy Markdown
Collaborator

Layer 10 of 10 in the Mini-Agent stack. Base fix/mini-agent-driver-shutdown. Head feat/dense-mtp-frozen-export.

Review scope

Construct Dense MTP with opt-in frozen parameters and preserve those weights through HF loading, sharding, rollout weight publication and export. Qwen3.5 rejects multiple independent physical MTP layers when their HF projection and norm keys would collide. Thanks to matrix72c and the contributors to #2285. This is the same patch as fork PR #2379.

Validation

The working tree and Python compilation were checked at this layer. The Agent import-boundary check and the python -S protocol import passed. The relevant CPU cases passed in pt29_glm2 with CUDA_VISIBLE_DEVICES='' as part of the combined python -B -m pytest -ra runs. The frozen Dense MTP suite passed 8 CPU tests and skipped 3 CUDA tests. Ruff lint and formatting and git diff --check passed for the full stack.

tests/model/test_frozen_dense_mtp.py

…port

Backport the checkpoint-oriented changes from #2285.
Build frozen Dense MTP from the shared MTP config and shard it separately
so the existing load, rollout publication, and HF export paths can
retain the tensors. Dense training continues to use the backbone loss.

Reject multiple independent Qwen3.5 MTP layers because HF uses shared
projection and norm keys. Keep the legacy MoE MTPConfig import working.

Source commit f2bb6979afbb2f26f543ebd32d9a544f5ce50260

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