Feature Request: DFLASH support (from 40 tok/sec to 400 tok/sec)
Prerequisites
- [x] I am running the latest code. Mention the version if possible as well.
- [x] I carefully followed the README.md.
- [x] I searched using keywords relevant to my issue to make sure that I am creating a new issue that is not already open (or closed).
- [x] I reviewed the Discussions, and have a new and useful enhancement to share.
Feature Description
It allows to generate tokens so much faster, without any loss in quality. More here: https://github.com/z-lab/dflash
Motivation
Because it allows faster generation
Possible Implementation
No response
+1
I'm experimentally working on this. Likely needs to wait till #18039 is merged
niubi
+1
Nice job!!!
I'm experimentally working on this. Likely needs to wait till #18039 is merged
could you keep in mind maybe that we have dflash + ddtree together... both together would provide a 150% boost compared to 100% for dflash alone
+1
I'm experimentally working on this. Likely needs to wait till #18039 is merged
could you keep in mind maybe that we have dflash + ddtree together... both together would provide a 150% boost compared to 100% for dflash alone
dflash + ddtree + rotorquant ?
I'm experimentally working on this. Likely needs to wait till #18039 is merged
could you keep in mind maybe that we have dflash + ddtree together... both together would provide a 150% boost compared to 100% for dflash alone
dflash + ddtree + rotorquant ?
rotorquant afaik only reduces kv cache consumption
dflash uses a small diffusion model to speed up token generation through speculative decoding ddtree on top of dflash creates a tree (from what i did read) to estimate the path of the diffusion prediction to use even less iterations in the diffusion process...
but i am just a noob, no clue if i got it right, as i understand the GPU things not enough, i can code but GPU kernels and ML kernels are somehow still a little over my head.
We should really start to look into speculative prefill solutions now that context size and context ingestion have become more important with agentic workflows.
We should really start to look into speculative prefill solutions now that context size and context ingestion have become more important with agentic workflows.
What are you waiting for? Start looking into it
For anyone interested in DFlash, please take a look at this PR: https://github.com/ggml-org/llama.cpp/pull/22105 @am17an Welcome to collaborate on this, there’s still much we can improve.
+1
@fudingyu "Hi team, First off, thank you for the incredible work on llama.cpp. I am currently operating a heterogeneous multi-GPU environment consisting of 1x Tesla V100 (32GB) and 2x RTX 2080 Ti (22GB modified), totaling 76GB VRAM. Running Qwen 3.6 27B, I’m currently averaging around 15 t/s. While the stability is great, I am eagerly awaiting the integration of DFlash (Distilled Flash Speculative Decoding) into the mainline. Given my hardware's massive VRAM but older compute architecture (sm70/sm75), DFlash would be a total game-changer to maximize throughput and really make this 'legacy flagship' rig shine. Do we have a rough ETA or a roadmap for when DFlash (or the optimized speculative decoding PRs) will be merged into the main branch? Any insights or recommended experimental branches for my specific setup would be greatly appreciated. Keep up the amazing work!"
@fudingyu "Hi team, First off, thank you for the incredible work on llama.cpp. I am currently operating a heterogeneous multi-GPU environment consisting of 1x Tesla V100 (32GB) and 2x RTX 2080 Ti (22GB modified), totaling 76GB VRAM. Running Qwen 3.6 27B, I’m currently averaging around 15 t/s. While the stability is great, I am eagerly awaiting the integration of DFlash (Distilled Flash Speculative Decoding) into the mainline. Given my hardware's massive VRAM but older compute architecture (sm70/sm75), DFlash would be a total game-changer to maximize throughput and really make this 'legacy flagship' rig shine. Do we have a rough ETA or a roadmap for when DFlash (or the optimized speculative decoding PRs) will be merged into the main branch? Any insights or recommended experimental branches for my specific setup would be greatly appreciated. Keep up the amazing work!"
I am in the exact same position , 2xRTX 2080 Ti each 22GB, permanent 15.5 token/s , with DFlash + DDtree which would fit still with a 256k context i would get about 45-50 token/s ... that would be game changing....
@snapo Which branch are you using?
@snapo Which branch are you using?
snapo@snabox:~/llama/llama.cpp/build/bin$ ./llama-cli --version ggml_cuda_init: found 2 CUDA devices (Total VRAM: 44004 MiB): Device 0: NVIDIA GeForce RTX 2080 Ti, compute capability 7.5, VMM: yes, VRAM: 22002 MiB Device 1: NVIDIA GeForce RTX 2080 Ti, compute capability 7.5, VMM: yes, VRAM: 22002 MiB version: 8763 (ff5ef8278) built with GNU 11.4.0 for Linux x86_64
i use currently ./llama.cpp/build/bin/llama-server --model "models/Qwen3.6-27B-Q8_0.gguf" --alias "Qwen3.6 27B" --temp 0.6 --top-p 0.95 --min-p 0.00 --top-k 20 --port 16384 --host 0.0.0.0 --cache-type-k f16 --cache-type-v f16 --presence-penalty 1.0 --repeat-penalty 1.0 --jinja --chat-template-kwargs '{"preserve_thinking": true}' --ctx-size 65536 --mmproj "models/27B-mmproj-F32.gguf" --webui
are the parameters i use....
i do think that speculative decoding even MTP=1 or MPT=2 or DFlash with DDTree would help it a lot.... i am pretty certain especially with DflashDDTree i could achive more than 45 tokens (based on assumptions on how much compute the RTX 2080 Ti's provide
@snapo Which branch are you using?
snapo@snabox:~/llama/llama.cpp/build/bin$ ./llama-cli --version ggml_cuda_init: found 2 CUDA devices (Total VRAM: 44004 MiB): Device 0: NVIDIA GeForce RTX 2080 Ti, compute capability 7.5, VMM: yes, VRAM: 22002 MiB Device 1: NVIDIA GeForce RTX 2080 Ti, compute capability 7.5, VMM: yes, VRAM: 22002 MiB version: 8763 (ff5ef82) built with GNU 11.4.0 for Linux x86_64
i use currently ./llama.cpp/build/bin/llama-server --model "models/Qwen3.6-27B-Q8_0.gguf" --alias "Qwen3.6 27B" --temp 0.6 --top-p 0.95 --min-p 0.00 --top-k 20 --port 16384 --host 0.0.0.0 --cache-type-k f16 --cache-type-v f16 --presence-penalty 1.0 --repeat-penalty 1.0 --jinja --chat-template-kwargs '{"preserve_thinking": true}' --ctx-size 65536 --mmproj "models/27B-mmproj-F32.gguf" --webui
are the parameters i use....
i do think that speculative decoding even MTP=1 or MPT=2 or DFlash with DDTree would help it a lot.... i am pretty certain especially with DflashDDTree i could achive more than 45 tokens (based on assumptions on how much compute the RTX 2080 Ti's provide
I have the exact same GPUs as you (X99 E5 2969v3 + 2x 2080Ti 22GB + NVLink); with the same model, I can achieve speeds of 21–27 tokens/s. Just wanted to share this with you.
GGML_CUDA_P2P=1 CUDA_SCALE_LAUNCH_QUEUES=4x /usr/local/bin/llama-server -m Qwen3.6-27B-Q8_0.gguf --mmproj mmproj-BF16.gguf -ngl 99 -c 140000 -t 8 --host 0.0.0.0 --port 8080 --temp 1.0 --top-p 0.95 --top-k 20 --min-p 0.0 --split-mode tensor --spec-type ngram-mod --spec-ngram-size-n 24 --draft-min 32 --draft-max 48 --kv-unified --reasoning-budget 8192 --reasoning-budget-message ". Okay, enough thinking. Let's answer now." --no-mmap --mlock
+1
+1
i do think that speculative decoding even MTP=1 or MPT=2 or DFlash with DDTree would help it a lot.... i am pretty certain especially with DflashDDTree i could achive more than 45 tokens (based on assumptions on how much compute the RTX 2080 Ti's provide