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
[Engine] feat: Implement Dflash2 for Inkling 2 Mini #339
Thanks for the issue. To keep the tracker readable, every item needs an area prefix in the title and the parts of the issue form filled in. This one is missing:
Add your graphics card with its VRAM, your RAM and your operating system.
Edit the issue (title and description) and this note goes away on its own. If it is still missing parts in 5 days it will be closed, which is not a rejection: fix it and comment /reopen.
Interesting numbers comparing DFlash2 against DSpark on Orin. Right now Inkling 2 Mini uses DSpark (--draft-model, enabled by default on Macs and full-VRAM NVIDIA cards in \�0.2.20-poly.5), and a PR is welcome if you want to contribute DFlash2 support.
I could but I can't test it properly, the discrete GPUs I have available only have 8gb vram and any drafter would slow it down due to having to fetch experts from ram, so making a proper performance comparison is going to be hard and skewed.
Happy to help test and run fair A/B benchmarks (DFlash2 vs DSpark on v0.2.20-poly.5) whenever a branch or PR is ready!
We have a Windows 11 test rig with an RTX 5080 16 GB (sm_120, where Inkling-2-Mini-UD-IQ3_XXS + DSpark fits 100% in VRAM at 237.99 tok/s on a 302-token prompt / 363.26 tok/s on a 16-token prompt) plus an RTX 4060 Ti 16 GB (sm_89, where UD-Q4_K_XL + DSpark runs 100% in VRAM via --layer-split 18 with #315). Ping me when you have a branch to benchmark.
Happy to help test and run fair A/B benchmarks (DFlash2 vs DSpark on v0.2.20-poly.5) whenever a branch or PR is ready!
We have a Windows 11 test rig with an RTX 5080 16 GB (sm_120, where Inkling-2-Mini-UD-IQ3_XXS + DSpark fits 100% in VRAM at 237.99 tok/s on a 302-token prompt / 363.26 tok/s on a 16-token prompt) plus an RTX 4060 Ti 16 GB (sm_89, where UD-Q4_K_XL + DSpark runs 100% in VRAM via --layer-split 18 with #315). Ping me when you have a branch to benchmark.
@cobra91#358 It built on RTX4060 8GB here and forcing the drafter to work on 8GB made it run. I have no idea how it will perform compared to DSpark
Build only the engine target. The full build also compiles test targets, and pinned_shared_test has a link error on this branch. That error hasn't been
confirmed as pre-existing.
Report whether the build succeeded, the backend, and the GPU. The HIP build hasn't been re-checked since the last changes, so a HIP build failure is
useful information.
Convert the DFlash2 drafter
You need:
incoai/Inkling-2-Mini-DFlash2 from Hugging Face (config.json and model.safetensors)
The config of the target, thinkingmachines/Inkling-2-Mini (config.json only; no weights needed)
Expected: about 81 tensors, about 990 MB, and a warning that the drafter writes no vocabulary. That warning is normal. The engine takes the tokenizer from the target file. Keep the log.
Get the DSpark drafter for the comparison
Use the DSpark file for the same Inkling 2 Mini target that your build's setup uses, for example dspark-Inkling-2-Mini-Q8_0.gguf. Record its exact file name and hash.
Run each drafter with the same prompt
Use the same target GGUF for both runs. Run each configuration three times and take the median. Change only the draft file and the window size.
*Note: --no-draft --window 4 on Inkling-2-Mini-UD-IQ3_XXS.gguf still reported 122 of 184 guessed tokens right (built-in / STRATA_BLOCK_GUESS path).
Takeaways on RTX 5080
Both K=4 (267.28 vs 205.46 tok/s, +30.1%) and K=3 (250.23 vs 200.89 tok/s, +24.6%) are currently significantly faster with DSpark Q8_0 than with DFlash2 BF16, both in acceptance rate (84.9% vs 73.8% at K=4; 88.9% vs 79.9% at K=3) and in drafter/prefill overhead (1435.6 vs 803.2 tok/s prompt).
Happy to re-test if you push further optimizations or quantized DFlash2 support!
@drakarah Follow-up A/B run (K=4, --window 4) on our RTX 4060 Ti 16 GB (sm_89, CUDA_VISIBLE_DEVICES=1, same binary ecdfa5b21, Inkling-2-Mini-UD-IQ3_XXS.gguf, 302-token prompt, --max-new 256 --kv fp8 --max-context 32768, 100.0% VRAM, 3 runs -> median):
Configuration (RTX 4060 Ti)
Run 1 / 2 / 3 Decode (tok/s)
Median Decode
Median Prefill
Accepted / Guessed
Baseline (--no-draft --window 4)
98.92 / 98.81 / 98.99
98.92 tok/s
719.1 tok/s
132 / 188 (70.2%)
DFlash2 K=4 (--window 4)
87.43 / 87.44 / 87.43
87.43 tok/s
507.8 tok/s
175 / 220 (79.5%)
DSpark K=4 (--window 4)
125.99 / 126.04 / 126.02
126.02 tok/s
821.9 tok/s
181 / 210 (86.2%)
On sm_89 (288 GB/s), DFlash2 BF16 (990 MiB) achieves a higher acceptance rate (79.5%) than on sm_120 (73.8%), while DSpark Q8_0 remains +44.1% faster (126.02 vs 87.43 tok/s) due to lower drafter/prefill bandwidth cost.
Activity
github-actions commentedon Nov 25, 2026
Thanks for the issue. To keep the tracker readable, every item needs an area prefix in the title and the parts of the issue form filled in. This one is missing:
Edit the issue (title and description) and this note goes away on its own. If it is still missing parts in 5 days it will be closed, which is not a rejection: fix it and comment
/reopen.Details: CONTRIBUTING.md
github-actions commentedon Nov 25, 2026
Thanks, this follows the format now.
VecSzn commentedon Nov 25, 2026
Interesting numbers comparing DFlash2 against DSpark on Orin. Right now Inkling 2 Mini uses DSpark (--draft-model, enabled by default on Macs and full-VRAM NVIDIA cards in \�0.2.20-poly.5), and a PR is welcome if you want to contribute DFlash2 support.
drakarah commentedon Nov 25, 2026
I could but I can't test it properly, the discrete GPUs I have available only have 8gb vram and any drafter would slow it down due to having to fetch experts from ram, so making a proper performance comparison is going to be hard and skewed.
So I could ask Claude to port drakarah/TensorRT-Edge-LLM@c18ec8c but I have no way of verifying.
Hopefully someone else that can already run the dspark drafter can pick it up to make a fair comparison.
cobra91 commentedon Nov 26, 2026
Happy to help test and run fair A/B benchmarks (
DFlash2vsDSparkonv0.2.20-poly.5) whenever a branch or PR is ready!We have a Windows 11 test rig with an RTX 5080 16 GB (
sm_120, whereInkling-2-Mini-UD-IQ3_XXS+DSparkfits 100% in VRAM at237.99 tok/son a 302-token prompt /363.26 tok/son a 16-token prompt) plus an RTX 4060 Ti 16 GB (sm_89, whereUD-Q4_K_XL+DSparkruns 100% in VRAM via--layer-split 18with #315). Ping me when you have a branch to benchmark.poly: DFlash2 drafter loads and drafts with Inkling 2 Mini (refs simp…
drakarah commentedon Nov 26, 2026
@cobra91 #358 It built on RTX4060 8GB here and forcing the drafter to work on 8GB made it run. I have no idea how it will perform compared to DSpark
Instructions from Claude:
git clone https://github.com/drakarah/PolyStrata
cd PolyStrata
git checkout feat/inkling2-dflash2 # commit 015a56c or later
cd engine
Build only the engine target. The full build also compiles test targets, and pinned_shared_test has a link error on this branch. That error hasn't been
confirmed as pre-existing.
Report whether the build succeeded, the backend, and the GPU. The HIP build hasn't been re-checked since the last changes, so a HIP build failure is
useful information.
You need:
Expected: about 81 tensors, about 990 MB, and a warning that the drafter writes no vocabulary. That warning is normal. The engine takes the tokenizer from the target file. Keep the log.
Use the DSpark file for the same Inkling 2 Mini target that your build's setup uses, for example dspark-Inkling-2-Mini-Q8_0.gguf. Record its exact file name and hash.
Use the same target GGUF for both runs. Run each configuration three times and take the median. Change only the draft file and the window size.
baseline: no drafter
strata-poly --model <Inkling target>.gguf --tokens <ids> --max-new 256 --no-draft --window 4DFlash2, K=4 (4-token window, drafter guesses 3)
strata-poly --model <Inkling target>.gguf --tokens <ids> --max-new 256 \ --draft-model Inkling-2-Mini-DFlash2.gguf --window 4DSpark, K=4
strata-poly --model <Inkling target>.gguf --tokens <ids> --max-new 256 \ --draft-model <dspark file>.gguf --window 4Also run K=3 (--window 3) for both drafters, to match the issue's fork numbers. --window N means the drafter guesses N−1 tokens per round.
poly: DFlash2 top-16 selector in two kernels, a split and a merge (refs
cobra91 commentedon Nov 26, 2026
@drakarah Here are the A/B benchmark results on our Windows 11 test rig (
ecdfa5b21onfeat/inkling2-dflash2), following your protocol.1. Environment & Build
ecdfa5b21(drakarah/PolyStrata,feat/inkling2-dflash2)-DCMAKE_CUDA_ARCHITECTURES="89;120"), Ninja Release (--preset cuda-compile), built targetstrata-poly([120/120] strata-poly.exesucceeded cleanly)sm_120, Windows 11, 100.0% experts in VRAM)2. GGUF Conversion & Hashes
convert_hf_to_gguf.py(--outtype bf16) onincoai/Inkling-2-Mini-DFlash2+thinkingmachines/Inkling-2-Mini/config.json:n_tensors = 81,total_size = 990.2M(Inkling-2-Mini-DFlash2.gguf)WARNING:hf-to-gguf:DFlash: no tokenizer handler for Inkling2LoopForConditionalGeneration; the drafter writes no vocabularyInkling-2-Mini-UD-IQ3_XXS.ggufBD7EF0865ADF119B5183E45E741C629BAFA649769B33B5EBF689BB4BCC4690D6Inkling-2-Mini-DFlash2.ggufB8723CC8FB58BEB16F8444EAE1CF3A38CEFA54F1CBF05B05DB1DD44A7D32E996dspark-Inkling-2-Mini-Q8_0.gguf2EC78510DA837E8FC3BE54A14757A0C5FBD2D8D9E85A0D92853FAFDF674F37733. A/B Benchmarks (302-token prompt,
--max-new 256 --kv fp8 --max-context 32768, 3 runs -> median)--no-draft --window 4)--window 4)--window 4)--window 3)--window 3)Takeaways on RTX 5080
K=4(267.28 vs 205.46 tok/s, +30.1%) andK=3(250.23 vs 200.89 tok/s, +24.6%) are currently significantly faster with DSpark Q8_0 than with DFlash2 BF16, both in acceptance rate (84.9%vs73.8%atK=4;88.9%vs79.9%atK=3) and in drafter/prefill overhead (1435.6vs803.2 tok/sprompt).cobra91 commentedon Nov 26, 2026
@drakarah Follow-up A/B run (
K=4,--window 4) on our RTX 4060 Ti 16 GB (sm_89,CUDA_VISIBLE_DEVICES=1, same binaryecdfa5b21,Inkling-2-Mini-UD-IQ3_XXS.gguf, 302-token prompt,--max-new 256 --kv fp8 --max-context 32768, 100.0% VRAM, 3 runs -> median):--no-draft --window 4)--window 4)--window 4)On
sm_89(288 GB/s), DFlash2 BF16 (990 MiB) achieves a higher acceptance rate (79.5%) than onsm_120(73.8%), while DSpark Q8_0 remains +44.1% faster (126.02 vs 87.43 tok/s) due to lower drafter/prefill bandwidth cost.