[Feature] support DFlash: Block Diffusion for Flash Speculative Decoding
维护者通常 2 天内回复
@RunningLeon 已经在做这个了。
开始于 2026年4月18日。
评估
这个 Issue 还没有评估数据。
描述
Motivation
https://github.com/z-lab/dflash
DFlash is a lightweight block diffusion model
You can give qwen3.5 27Bvllm sglang mlx already support model modification.
The following is from the publicity introduction:
🚀 Core Breakthrough
DFlash is a lightweight Block Diffusion Model purpose-built for speculative decoding. It predicts an entire token block in a single forward pass, delivering unprecedented inference acceleration.
Limitations of Traditional Methods
Conventional speculative decoding approaches (e.g., EAGLE-3) still generate drafts in an autoregressive manner, where each token must wait for the completion of the previous one. This caps the practical speedup at only 2–3×.
DFlash Innovations
DFlash adopts a fundamentally different strategy:
- Parallel Draft Generation: Generates a full token block in one forward pass
- KV Injection Mechanism: Injects hidden layer features from the target model as contextual conditions into every layer of the draft model
- Feature Fusion: Fuses multi-layer hidden states via FC + RMSNorm to provide highly consistent contextual information
📊 Remarkable Acceleration Results
Qwen3-8B: 6× Lossless Acceleration
On the Qwen3-8B model, DFlash achieves:
- 6× lossless speedup
- 2.5× faster than EAGLE-3
- Acceptance rate as high as 89%+
Qwen3.5-9B: 4.1× Acceleration
On Apple Silicon platforms, the Qwen3.5-9B model delivers:
- 4.1× speedup
- Validates 16 tokens generated in a single batch
- Optimized with custom Metal kernels
🔥 Qwen3.5-27B: 5× Inference Speed Surge
Performance Comparison (Configuration)
Setup 1024 tokens 2048 tokens Speedup
Baseline 14 tok/s 11 tok/s 1×
8-bit Quantization 35 tok/s 26 tok/s 2.5×
4-bit Quantization 28 tok/s 20 tok/s 2.0×
Key Findings
1. 8-bit quantization outperforms 4-bit: Delivers superior speedup while maintaining higher precision
2. Strong long-sequence performance: Retains 2.3× speedup when generating 2048 tokens
3. Lossless decoding: Fully preserves model output quality with zero accuracy degradation
Related resources
https://github.com/z-lab/dflash
Additional context
- 主要语言
- Python
- 星标
- 8.2k
- 派生
- 797
- 平均合并
- 3 天 15 小时
- 30 天内合并 PR
- 52
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
InternLM/lmdeploy 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 79/100
维护者通常 2 天内回复
-
[Bug] apply_rotary_pos_emb: leaves output tails unwritten with partial rotation可能已有人在做 @shotsan 于 15 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 2 天内回复
-
[Bug] PyTorch engine ignores use_rslora, so rsLoRA adapters run sqrt(r) times too weak可能已有人在做 @Andreas-Hum 于 25 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 2 天内回复
-
[Feature] Expose `max_model_len` (session_len) in `/v1/models` model card可能已有人在做 @FOWEPJF255 于 37 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 85/100
维护者通常 2 天内回复
-
难度 4/5 3-5 天 新手友好度 48/100
维护者通常 2 天内回复
查看 InternLM/lmdeploy 的全部 Issue
相似的 Issue
-
难度 1/5 1 小时以内 新手友好度 92/100
Techiebutler/freeframe#687 ·
维护者通常 1 天内回复
-
bug verbose GC
难度 2/5 1-3 小时 新手友好度 74/100
IBM/javacore-analyser#677 ·
维护者通常 1 天内回复
-
area/config comp/plugins P1 platform/qqbot tool/file type/bug
难度 2/5 1-3 小时 新手友好度 75/100
NousResearch/hermes-agent#163932 · 1 条评论 ·
维护者通常 1 天内回复
-
plugins/dsh: todayStr() computes UTC but is documented as local — journal entries written 00:00–08:00 local land in the previous day's file可能已有人在做 @Beehtrix 今天认领。 未关闭bug
难度 2/5 1-3 小时 新手友好度 82/100
zilliztech/memsearch#907 · 1 条评论 ·
维护者通常 1 天内回复
-
external
难度 2/5 1-3 小时 新手友好度 72/100
langchain-ai/docs#8386 ·
维护者通常 1 天内回复