You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
dflash: DFly head projects every block row through the vocab matrix twice #176
build_dfly_correction_head starts from base = res->t_logits, which the generic head has already projected for every row of the block, and keeps only the anchor column of it. It then projects each corrected row through the same vocabulary-sized matrix again. For a block of N rows that is close to 2N head projections where N would do.
The fix is not local to the hook: res->t_logits is built and expanded into the graph before the hook runs, so the rows cannot be dropped from inside it. Skipping them means not building the full head for a DFly block batch in the first place, which sits in the decoder, while the hook's bail-out paths (non-block batch, block wider than block_size, anchor out of range) still need full logits for every row. So the decoder needs to know, before it builds the head, that the correction head will take over.
Before doing that: profile a DFly draft round and report what fraction of it is the head, so the restructuring is justified by a measurement rather than by the row count. Vocabulary is 151936 here, so the projection is not small, but the drafter is also narrow and the rest of the round may dominate.
No correctness impact; output is unchanged either way.
Activity