
Dflash Mlx Speculative Decoding
If you're running large language models on Apple Silicon with MLX and feeling the latency, this is the fix. DFlash uses a small 1B-parameter draft model to speculatively generate 16 tokens at once via block diffusion, then verifies them in one pass through your target model. It's completely lossless, meaning every token still comes from your actual model's greedy output. You get 1.7x to 4x speedups on Qwen models with 87-90% acceptance rates. Ships with a CLI, an OpenAI-compatible server, and Python API. The tape-replay rollback for GatedDeltaNet models and custom Metal kernels show this was built by someone who actually cares about making inference fast on M-series chips.
- skills.sh installs
- 331
- GitHub stars
- 26
- last updated
- Jun 3, 2026
Install
$ npx -y skills add aradotso/trending-skills --skill dflash-mlx-speculative-decoding --agent claude-codeInstalls into .claude/skills of the current project.
Files
dflash-mlx Speculative Decoding
Skill by ara.so — Daily 2026 Skills collection.
DFlash implements lossless speculative decoding for MLX on Apple Silicon. A small draft model (~1B params) generates 16 tokens in parallel using block diffusion; the target model verifies all 16 in a single forward pass. Tokens are only emitted after target verification — output is lossless (every token is the target model's greedy argmax).
Typical speedups: 1.7x–4.1x over baseline mlx_lm depending on model size and context length. Acceptance rates hover around 87–90% for Qwen3.5 models.
Installation
pip install dflash-mlx
# or isolated install
pipx install dflash-mlx
Requires Python 3.10+, MLX 0.31.1+, Apple Silicon Mac.
Key CLI Commands
Generate text
# Auto-resolve draft model from registry
dflash --model Qwen/Qwen3.5-9B --prompt "Explain backpropagation"
# Explicit draft model
dflash --model Qwen/Qwen3.5-9B \
--draft z-lab/Qwen3.5-9B-DFlash \
--prompt "Explain backpropagation"
# Disable EOS (useful for benchmarking fixed token counts)
dflash --model Qwen/Qwen3.5-9B --prompt "..." --max-tokens 1024 --no-eos
Sponsors
Details
- Repository
- github.com/aradotso/trending-skills
- First seen
- Jun 3, 2026
More from aradotso/trending-skills
All 251- Palantir For Family Trips325
- Wterm Web Terminal325
- Anubis Android App Manager324
- Nothing Ever Happens Polymarket Bot324
- Openduck Distributed Duckdb321
- Designlang Design Extract318
- Uzi Skill Stock Analyzer318
- Tech Doc Style Chinese316
- Weft Ai Language315
- Hy World 2 0 3d World Model314
- Killerpdf Portable Editor312
- Xata Postgres Platform312
- Lingbot Map 3d Reconstruction310
- Diagram Design Editorial307
- Meta Harness Optimization306
- Border Beam React304
- Wx Favorites Report299
- Cc Design Html Prototyping297
- Pgque Postgres Queue296
- Huashu Design Html Native290
- Freebuff2api Openai Proxy289
- Aube Package Manager286
- Permiso Accessibility Permissions283
- Mdv Markdown Visualization282