feat: support offline DFlash-family training#704
Merged
jiapingW merged 4 commits intoJul 21, 2026
Conversation
Contributor
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
jiapingW
marked this pull request as ready for review
July 19, 2026 01:33
jiapingW
requested review from
FlamingoPg,
FrankLeeeee,
shuaills and
sleepcoo
as code owners
July 19, 2026 01:33
jiapingW
self-requested a review
July 19, 2026 12:03
jiapingW
force-pushed
the
agent/pr678-offline-draft-training
branch
from
July 21, 2026 09:46
affeae5 to
cf2dbde
Compare
jiapingW
approved these changes
Jul 21, 2026
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.
Motivation
#678 adds unified-runtime offline consumers, but the production feature preparer is still EAGLE3-specific: it requires exactly three layers and writes
hidden_state/aux_hidden_state. DFlash and Domino consumehidden_states, while DSpark additionally needstarget_last_hidden_states.This change makes the producer schema come from the same typed algorithm registry as the consumer, so offline preparation and training cannot silently drift.
Modifications
scripts/prepare_hidden_states.pyfor strategy-aware draft configuration, arbitrary layer counts, and exact persisted schemasset_dflash_layers_to_capturefor the DFlash family andset_eagle3_layers_to_capturefor EAGLE3D-PACE and DTA inherit DFlash's capture/storage contract. P-EAGLE is intentionally unchanged because its target-head/tokenizer preparation is a separate algorithm path.
Related Issues
Follow-up to #678.
Accuracy Test
Benchmark & Profiling
Not applicable. This changes offline data preparation and provider wiring; it does not change kernels, model forward math, or serving performance.
Validation
pre-commit run --all-files— passedStack
This draft is stacked on #678 at its current head,
ffe081c8074eaca7a079889737f82cb6649569de. Until #678 merges, GitHub will display its commits in this draft too; afterward the diff reduces to this offline DFlash-family follow-up.Checklist