Repository navigation
dflash: apply the target's prism.hadamard folds to the shared token table and lm_head (DFlash2 on Ternary-Bonsai: 0 -> 0.37 acceptance) - #143
Merged
Conversation
…able and lm_head A DFlash drafter reads its target's tok_embd and output (ctx_other). Ternary-Bonsai-2-27B stores both Hadamard-folded (prism.hadamard: the token table rotated, the lm_head folded), and the drafter's graph took them without the target's inverse / forward transforms, so every draft was garbage: 0 of 5271 drafted tokens accepted, 4.7 tok/s (DFlash2 q8_0, PQ2_0 file, fork e91b608). With the transforms (the same ones the target graph applies, llama_hadamard::inverse / forward): acceptance 0.37 code / 0.30 prose, 35.73 / 31.17 / 22.71 tok/s code / prose / tr (3 fresh servers, 256-token greedy, strict placement, gpu-kernels 4b8b9d0 + the ternary kqt kernels, performance mode). Files without prism.hadamard are unchanged (both transforms return their input when the tensor is not folded). Co-Authored-By: Claude Opus 5.5 <[email protected]>
Author
|
Kernel side (private add-on): gpu-kernels #36. |
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.
DFlash2 drafters on PrismML Ternary-Bonsai-2-27B read the target's shared token table and lm_head without the target's
prism.hadamardfolds, so every draft was rejected (0 of 5271 accepted; 4.7 tok/s, slower than no drafter).src/models/dflash.cppnow applies the target's Hadamard folds to the shared token table and lm_head. With the private add-on's ternary verify kernels: PQ2_0 + DFlash2 q8_0 35.7 / 31.2 / 20.4 / 22.7 tok/s code / prose / short / translation at 0.37 acceptance (MTP n3 on the same file: 42.0 / 36.9 / 27.2 / 33.4 at 0.67, so MTP stays the Bonsai route). Qwen3.8-27B (no folds) unchanged. One commit on d65a7e5; loom agent task TBONSAI-SWEET, 2026-10-25.🤖 Generated with Claude Code