feat(dflash): reduce feature mirror memory with dtype policy#309
Open
weicj wants to merge 1 commit into
Open
Conversation
Contributor
There was a problem hiding this comment.
1 issue found across 3 files
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
easel
pushed a commit
to easel/lucebox-hub
that referenced
this pull request
May 29, 2026
PR Luce-Org#309 introduced configurable feature-mirror storage types. Keep the default F32 mirror on the previous CUDA BF16-to-F32 conversion path so the unchanged configuration does not regress through a host round trip.
ad5ac25 to
ea6ac48
Compare
easel
pushed a commit
to easel/lucebox-hub
that referenced
this pull request
May 29, 2026
Record the 2026-05-29 14:03 cron pass, confirming Luce-Org#309/Luce-Org#310 and all other current included PR heads remain ancestors of easel/auto-integration. Re-probe the remaining old non-draft PRs from the current integration tip and record their conflict sets and retained worktrees.
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.
Summary
This PR adds a dtype policy for the DFlash draft-side feature mirror to reduce DFlash OOM risk while keeping the existing draft graph contract unchanged.
DFlash mirrors captured target hidden states on the draft side so the draft model can propose tokens from real target features. That mirror was always F32, which makes it a direct memory pressure point for DFlash, including target layer-split DFlash. This PR keeps F32 as the default and adds optional
DFLASH_FEATURE_DTYPE=f16|bf16|q8_0storage for the mirror. Rows are converted back to F32 before feedingtarget_hidden_cat, so the draft graph input contract remains unchanged.For the Qwen3.6-27B path, the directly reduced allocation is
cap * captured_feature_width * bytes_per_element. At the full 256K context cap (cap=262144) andcaptured_feature_width=25600:Changes
DFLASH_FEATURE_DTYPE=f32|f16|bf16|q8_0for the DFlash draft feature mirror.target_hidden_cat.Notes
Local HumanEval A/B was run on dual Pro VII / gfx906 with Qwen3.6-27B Q4_K_M target, Qwen3.6 DFlash Q8_0 draft, HIP same-backend target layer split, local DFlash draft, DDTree enabled, and a 4K runtime cap. Each dtype ran the same 10 HumanEval prompts with 128 generated tokens.
Q8_0 did not show the acceptance collapse we were concerned about in this HumanEval prompt run. Its acceptance stayed in the same range as F32/BF16/F16, with a small decode-speed cost. The VRAM sampler on this machine reports percent-level readings, so the sampled peak is coarse; the exact mirror allocation reduction is the formula above.