llama.cpp has merged native support for DFlash 2 speculative decoding via Pull Request #27342, integrating non-autoregressive drafting that replaces sequential prediction with parallel token proposal. This update utilizes local convolution layers and a candidate selector to boost inference throughput by up to 2x on compatible hardware like Apple Silicon and NVIDIA GPUs while maintaining exact output distributions.
The open-source llama.cpp project has merged native support for DFlash 2, bringing parallel speculative decoding and substantial inference throughput improvements to local LLM serving across CPU, Apple Silicon, and GPU backends.
The implementation, integrated via Pull Request #27342, adds local convolution operators and candidate selector mechanics designed specifically for the DFlash 2 architecture.
Non-Autoregressive Speculative Drafting
Standard speculative decoding uses a smaller autoregressive draft model to predict subsequent tokens sequentially before passing them to the target foundation model for batched verification. While effective at short sequence lengths, conventional drafters often suffer throughput degradation as context windows expand due to accumulating draft latency and memory bandwidth pressure.
DFlash 2 addresses this bottleneck by replacing sequential drafting with a non-autoregressive architecture. Using local convolution layers and an integrated candidate selector, the draft model proposes multiple candidate tokens in parallel during a single forward step.
- Parallel candidate generation removes the sequential loop inside the draft phase.
- A lightweight path selector picks a coherent sequence from each position's top candidates, so more of each drafted block survives verification.
- Verification against the target model keeps the output distribution exact; rejection sampling restores the target distribution when sampling.

Serving Architecture and Local Deployment
The integration allows developers running llama-server or the llama-cli binary to pair target models (such as Qwen3.8-27B GGUF weights) with corresponding DFlash 2 drafter models using the --spec-type draft-dflash flag.
The PR author notes that DFlash 2 is switched on automatically when the draft checkpoint is a DFlash 2 model, so no extra flag is needed beyond the usual draft settings. The change was merged on August 27, 2026, after nine days of review and community testing on Apple M-series chips, AMD Strix Halo APUs, and discrete NVIDIA and AMD GPUs. Gains vary a lot by hardware, as the numbers below show.
What DFlash 2 Adds to DFlash
Inco AI released the original DFlash drafter in January. It already runs in SGLang, vLLM, TensorRT-LLM, and llama.cpp. DFlash predicts every position of a draft block in one pass instead of one token at a time. Inco's August 18 post on DFlash 2 says that design leaves headroom in two places: picking tokens that fit together, and keeping accuracy up toward the end of the block. DFlash 2 adds one small module for each.
The path selector. In Inco's tests on a five-layer Qwen3-4B drafter, DFlash's top pick at the first position was right 85.4% of the time, but the right token was in its top 16 candidates 99.5% of the time. DFlash 2 keeps the top 16 candidates at each position and scores every adjacent pair using compact 256-dimensional token embeddings. A greedy or sampled walk through those scores then picks one path. Alone, the selector adds about 2.0M parameters and 0.6% cycle latency, and lifts mean acceptance length on GSM8K from 4.27 to 4.61 tokens at temperature 0.
The local convolution. Accuracy also falls toward the end of a block, which Inco calls suffix decay. DFlash 2 inserts a two-tap dynamic depthwise convolution before and after each attention and feed-forward sublayer, so each position can read its neighbor. This adds 16.5M parameters (3%) and 0.7% latency, and brings a five-layer drafter close to a 15-layer one. Together the two modules add about 1.3% to cycle latency. On Qwen3.5-4B, Inco reports a mean acceptance length of 5.97 tokens for DFlash 2 versus 4.92 for DFlash, about 21% more.
Measured Speedups
Inco says its Qwen3.8-27B drafter serves at 2.7 to 3.4 times the throughput of plain autoregressive decoding in SGLang at batch size 1. The llama.cpp numbers are more modest and depend on hardware:
- Apple M5 Pro, 64 GB (PR author, Qwen3.8-27B Q4_K_M, first 8 GSM8K problems): 10.42 tok/s without speculation, 19.31 tok/s with a BF16 drafter (1.85x), and 18.89 tok/s with a Q4_K_M drafter (1.81x).
- NVIDIA H200 (PR author, llama.cpp speed-bench): 2.06x on a BF16 Qwen3.8-27B target, against 1.48x for the model's built-in MTP head. On a Q4_K_M target the gain fell to 1.15x. The author traced this to llama.cpp using a GEMV kernel for batches of up to 8 tokens; with the GEMM kernel, DFlash 2 reached 1.447x, ahead of MTP's best 1.30x.
- AMD Strix Halo (community test, Vulkan): about 2x for a single stream, but with 4 parallel requests both DFlash 2 and MTP fell below the no-drafter baseline (25 to 26 tok/s against 34.14).
Testers also reported that image requests failed with the DFlash 2 drafter during review. The PR now carries a notice that GGUF files generated before August 27 must be reconverted, or vision will be broken.
How to Run It
Inco's published llama.cpp example pairs the Qwen3.8-27B target with its DFlash 2 drafter:
./build/bin/llama-server \
-hf ggml-org/Qwen3.8-27B-GGUF:Q4_K_M \
-hfd incoai/Qwen3.8-27B-DFlash2-GGUF:Q4_K_M \
--spec-type draft-dflash \
--spec-draft-n-max 7
Several testers found that a smaller --spec-draft-n-max such as 4 ran faster on older or less memory-bound GPUs, so it is worth a short sweep on your own workload. Speculative decoding in llama.cpp is mainly a single-stream speedup today; servers with many parallel users may see little gain.
Sources
- GitHub: llama.cpp Pull Request #27342 (DFlash 2 Support)
- Inco AI: DFlash 2 Architecture and Benchmarks
- Reddit r/LocalLLaMA Discussion
Frequently asked questions
What are the key architectural improvements in DFlash 2 over the original DFlash?
DFlash 2 introduces two modules missing in the original DFlash: a lightweight path selector that scores adjacent candidate pairs to pick coherent sequences, and a two-tap dynamic depthwise convolution before attention and feed-forward sublayers to mitigate suffix decay accuracy loss.
How much speedup does DFlash 2 provide compared to standard autoregressive decoding?
Measured speedups vary by hardware; for example, tests on an Apple M5 Pro showed a 1.85x increase (10.42 tok/s to 19.31 tok/s), while NVIDIA H200 configurations achieved up to 2.06x throughput improvements depending on quantization and kernel usage.
How do I enable DFlash 2 in llama-server or llama-cli?
You can pair target models with DFlash 2 drafter models by using the --spec-type draft-dflash flag in llama-server or llama-cli; the feature is automatically switched on when the draft checkpoint is identified as a DFlash 2 model.
Are there any known limitations or issues with DFlash 2 in llama.cpp?
Parallel multi-request scenarios on AMD Strix Halo may see reduced performance, and image requests previously failed with the drafter during review, requiring GGUF files generated before August 27, 2026, to be reconverted to fix vision capabilities.
