Instructions to use incoai/Flint-DFlash2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use incoai/Flint-DFlash2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="incoai/Flint-DFlash2")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModel tokenizer = AutoTokenizer.from_pretrained("incoai/Flint-DFlash2") model = AutoModel.from_pretrained("incoai/Flint-DFlash2", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use incoai/Flint-DFlash2 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "incoai/Flint-DFlash2" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "incoai/Flint-DFlash2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/incoai/Flint-DFlash2
- SGLang
How to use incoai/Flint-DFlash2 with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "incoai/Flint-DFlash2" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "incoai/Flint-DFlash2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "incoai/Flint-DFlash2" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "incoai/Flint-DFlash2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use incoai/Flint-DFlash2 with Docker Model Runner:
docker model run hf.co/incoai/Flint-DFlash2
Flint-DFlash2
This repository contains the DFlash 2 draft model for
RecursiveSI/flint.
It is not a standalone language model: it runs inside a speculative
decoding server and drafts tokens for the target model to verify.
DFlash 2 is a block-diffusion drafter for speculative decoding. It predicts a whole block of tokens in a single pass and keeps the top candidates at every position. A lightweight selector then traces one coherent path through them. Two-tap dynamic convolutions in the backbone keep the draft from decaying toward the end of the block. Decoding is lossless: greedy output matches the target model exactly, and sampling preserves its distribution.
Quick Start
Serve with SGLang. Flint support is in an open pull request (#45624), so install it at the commit we validated:
git clone https://github.com/sgl-project/sglang.git
cd sglang
git fetch origin 37bc771d2b253e2d87d27ace71297154874ee3b4
git checkout 37bc771d2b253e2d87d27ace71297154874ee3b4
pip install -e "python[all]"
sglang serve RecursiveSI/flint \
--enable-fp32-lm-head \
--reasoning-parser flint \
--tool-call-parser flint \
--speculative-algorithm DFLASH \
--speculative-draft-model-path incoai/Flint-DFlash2
See the blog post for more details.
Evaluation
- Runtime: SGLang (#45624 at
37bc771d) on one NVIDIA GB300 (TP1), in BF16, with FlashAttention 4 for target and draft attention - Speculation block size: 8 (7 draft tokens per verification step)
- Sampling: Flint's default parameters (temperature 1.0, top-p 0.95, top-k 20), with its default chat template and reasoning
- Maximum new tokens: 4096
- Samples: 128 at concurrency 1; 1,024 at concurrency 8 and 32
- Prompts: benchmark formatting and repeated sampling from
z-lab/dflash
We compare autoregressive decoding and DFlash 2, which proposes seven draft tokens per verification step.
Acceptance Length
Acceptance length is the per-request mean of completion tokens divided by verification steps at concurrency 1. Higher is better.
| Task | DFlash 2 |
|---|---|
| GSM8K | 4.23 |
| MATH-500 | 4.28 |
| HumanEval | 4.53 |
| MBPP | 4.33 |
| MT-Bench | 3.49 |
Throughput
Throughput is total output tokens divided by end-to-end wall time.
Each cell shows output tok/s (speedup vs. autoregressive).
Concurrency 1
| Task | Autoregressive | DFlash 2 |
|---|---|---|
| GSM8K | 316.7 | 686.5 (2.17×) |
| MATH-500 | 316.7 | 651.5 (2.06×) |
| HumanEval | 308.6 | 715.5 (2.32×) |
| MBPP | 310.8 | 700.4 (2.25×) |
| MT-Bench | 313.6 | 555.7 (1.77×) |
Concurrency 8
| Task | Autoregressive | DFlash 2 |
|---|---|---|
| GSM8K | 1,474.7 | 2,720.8 (1.84×) |
| MATH-500 | 1,500.2 | 2,651.3 (1.77×) |
| HumanEval | 1,490.0 | 2,828.3 (1.90×) |
| MBPP | 1,504.2 | 2,705.8 (1.80×) |
| MT-Bench | 1,487.9 | 2,151.9 (1.45×) |
Concurrency 32
| Task | Autoregressive | DFlash 2 |
|---|---|---|
| GSM8K | 3,523.4 | 6,936.8 (1.97×) |
| MATH-500 | 3,534.8 | 6,662.9 (1.88×) |
| HumanEval | 3,554.4 | 7,374.5 (2.07×) |
| MBPP | 3,505.6 | 7,168.3 (2.04×) |
| MT-Bench | 3,385.8 | 5,792.0 (1.71×) |
Citation
If you find DFlash 2 useful, please cite:
@misc{inco2026dflash2,
title = {{DFlash 2: Keep Drafting Parallel}},
author = {{Inco AI}},
year = {2026},
month = {August},
url = {https://inco.ai/blog/dflash2/}
}
Please also cite the original DFlash paper:
@inproceedings{chen2026dflash,
title = {{DFlash: Block Diffusion for Flash Speculative Decoding}},
author = {Chen, Jian and Liang, Yesheng and Liu, Zhijian},
booktitle = {International Conference on Machine Learning (ICML)},
year = {2026}
}
- Downloads last month
- 44
Model tree for incoai/Flint-DFlash2
Base model
RecursiveSI/flint