Repository navigation
feat(mtp): add native MTP conditioning for DSpark and DFlash - #23
Conversation
|
Three suggested follow-ups for
|
Add optional token and hidden conditioning through the existing training, recovery and native asset workflow, with frozen same-Target predictor bindings. Validate the supported scope, mask known-token supervision, and cover native loading, recovery and frozen parameter ownership with reusable checks. Include recipes and support documentation; conditioned assets remain native-only.
8e7f984 to
a234ce3
Compare
|
Addressed in 6ce63d1:
CI, CPU regressions and bounded CUDA checks passed. Unconditioned DSpark/DFlash behavior is preserved. |
Use explicit suffix metric names for conditioned training, evaluation and checkpoint selection while preserving ordinary DSpark/DFlash metric names. Mask inactive features before fusion to prevent non-finite gradients. Cover nonzero fusion outputs and parameter gradients, activation checkpointing, native asset roundtrips and padded NaNs. Include MTP and resume contracts in CPU CI and the recipe contract suite.
a234ce3 to
6ce63d1
Compare
|
Thanks for the update. Reviewed |
Closes #22
Outcome
Add opt-in
mtp_conditioningto DSpark and DFlash so a frozen native Qwen3.5 MTP predictorcan condition the Draft through the existing training, recovery and native export workflow.
Token mode supplies the known next-token anchor; hidden mode also adds a normalized,
zero-initialized residual fusion. Inactive features are masked before trainable fusion.
Visible T1 is excluded from supervision. Both algorithms report
train/suffix_simulated_acc_lenandeval/suffix_simulated_acc_len, with per-positionsuffix_acc_0/suffix_ploss_0starting at T2. Checkpoint selection, metadata and reportsretain that suffix scope. These teacher-forced suffix proxies do not measure acceptance
of the native MTP proposal or complete speculative blocks.
Include Qwen3.5-9B Draft configs, a runnable recipe and support documentation. MTP-specific
initialization and binding hooks run only when conditioning is enabled; ordinary
DSpark/DFlash interfaces, supervision and metric names are preserved.
Verification
for both algorithms, reusing the retained Draft backbone. Tests also cover activation
checkpointing, padded inactive NaNs, frozen feature boundaries, native export/reload
output equality, checkpoint metric selection and exact-resume history.
test_dmtp.py,test_training_resume_rng.pyandtest_evaluation_contract.pyto bothCPU CI and
tools.recipes contracts.recipe contracts 421 passed, 5 skipped; final affected-model/recovery/assets suite
292 passed, 21 skipped, plus 12 subtests. Lint and local documentation links passed.
fixture used head dimension 16 and the compiled FlexAttention TRITON path: FP32 independent
logits/loss/gradient reference, plus FP32/BF16 checkpointing and padded-NaN gradient parity.
Python 3.12.3, Torch 2.13.0+cu130, Transformers 5.12.1.
Supported conditioned execution is Dense full GQA, CP1, MBS1, single-node REPLICATE,
decay objective, without packing or whole-model compilation. These checks make no new
multi-GPU, throughput or end-to-end decoding acceptance claim.
Compatibility and provenance
state; exact resume validates the same-Target binding. Generic SGLang export and the
ordinary proposal consumer reject conditioned assets pending an MTP-aware consumer.
This is an independent integration reusing ASpec's retained native predictor and DFlash
backbone. Source headers and
docs/framework/REFERENCES.mdrecord the method and reuse;existing upstream notices and license texts are retained.