Repository navigation
Description
Support training a DSpine Draft in ASpec, with adjacent-token injection and candidate refinement.
This adds another parallel Draft design alongside the existing DSpark and DFlash paths.
Suggested scope
Start with one supported Target, such as Qwen, and a selected public DSpine reference.
Preserve its injection, transfer-code initialization, refinement and alignment objectives.
Keep loss reductions and the predecessor-replacement schedule explicit; review upstream objective
and configuration fixes when choosing the reference revision.
Getting started
A first PR may introduce the model and injection components, the loss, or another focused
prerequisite, with checks against applicable upstream code or an independent numerical reference.
Reuse ASpec's existing Target feature and Draft training workflow where compatible.
The outcomes below can land across PRs. A proposal consumer or serving adapter can follow
separately; training support does not require building a serving engine.
Expected outcome
-
The selected model, objectives, trainable parameters and Target feature timing are documented
and checked, including gradients and objective normalization. -
A runnable recipe supports training and exact resume, preserving schedule and algorithm state.
-
Exported assets retain injection weights, transfer codes and Target bindings, load strictly
and reproduce checkpoint predictions. -
Bounded held-out observations and supported scope are recorded; pending proposal or acceptance
validation is tracked before related quality or serving claims. -
Run a small training comparison with the chosen reference implementation, using the same
starting weights, data, training budget and settings. Compare loss curves and acceptance lengths
with the same evaluation setup, and explain any noticeable differences.
This comparison can come in a follow-up once training and evaluation are ready; it does not need
to be part of the first model/loss PR.
Activity
hereisaway commentedon Nov 25, 2026
@zhouaihui I'd like to work on this issue. Below is my preliminary design; I'd appreciate a scope/config sanity check before I start the first PR.
Reference revisions
75cade7ab0307fc2daac8eda95337705226b217eeaa6b03f6b4a65f38954fa0ebc13e59a8f295d02) plus the objective corrections in #1038 (merge1b5c0dde137a28447606ffb6078e01eddfa77980)OnlineDSpineModelconfig) by reading the draft config at use time / rejecting config replacement after construction.Selected scope for the first PR
Qwen3-8B Target, the published DSpine-b16 layout, dense full attention, padded inputs, CP1, no packing. I would start with the model/injection/loss prerequisite and leave trainer, recipe, exact resume, export and consumer to follow-ups (same split as our Domino #45 → #48 → #52 → #55 series).
Proposed implementation
DSpineConfig(DFlashConfig)for the publisheddflash_configfields:selected_prefix_code_bridge(code_size,rank,eps),selected_prefix_feature_layers,selected_prefix_feature_write_mode="independent",selected_prefix_feature_writes=true, terminal disabled,draft_block_causal=true,selected_prefix_last_write_refine/code_bridge_second_pass,selected_prefix_terminal_residual_rank,replacement_probability, and alignment-warmup state. Fail closed on terminal-corrected bridges, reliability probes, next-token rows, MoE/sparse attention, and non-causal draft attention.selected_prefix_code_bridgewith the published names:codebook+ per-layerread_weight/early_read_weightsfor transfer-code initialization;prev+gate+predecessor_gate+out+ per-layerfeature_write_weightsfor adjacent-token causal injection;head_topkK (power of two in [2, 64]).Questions
75cade7or the corrected SpecForge objective as the primary parity target? I plan to use the corrected #1038 normalization.Could you assign this issue to me if the direction looks right?
hereisaway commentedon Nov 25, 2026
First model/injection/loss increment is up for review: #66
Scope is intentionally limited to the DSpine model/loss prerequisite (dense full attention, padded, CP1, non-packing). Trainer, recipe, exact resume, export and consumer/acceptance are follow-ups. CPU tests: 1423 passed; DSpine-targeted 5 passed; ruff/check_docs/diff-check pass.
I kept the scope explicit and left the primary-reference question in the PR: Tencent/DSpine for architecture/weight layout, SpecForge #1038 for objective normalization. Happy to adjust the split or pin a different reference.