Skip to content
reason-machines avatar

Dflash Mlx Speculative Decoding

Lossless DFlash speculative decoding for MLX on Apple Silicon, drafting 16 tokens per step for verification.

CCM score
46 of 100
skills.sh installs
331
GitHub stars
99
last updated
Jun 3, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers draft-then-verify inference, where a ~1B draft model proposes 16 tokens and the target model verifies them in one pass
  • Includes the dflash CLI, the dflash-serve OpenAI-compatible server, and dflash-benchmark with per-run tok/s and acceptance-rate reports
  • Enforces greedy acceptance so every emitted token matches the target model's argmax, with no sampling during verification
  • Designed for Qwen3.5 model pairs on Apple Silicon, with draft models auto-resolved from a registry and reported speedups of 1.7x to 4.1x

Install

$ npx -y skills add reason-machines/trending-skills --skill dflash-mlx-speculative-decoding -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

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

Details

Repository
github.com/reason-machines/trending-skills
Category
AI Agents & LLM Apps
First seen
Jun 3, 2026

Questions

What does the dflash-mlx-speculative-decoding skill do?

The dflash-mlx-speculative-decoding skill runs lossless DFlash speculative decoding for MLX on Apple Silicon. A small draft model generates 16 tokens in parallel, and the target model verifies all 16 in one forward pass, so output matches the target model's greedy argmax.

How do I install the dflash-mlx-speculative-decoding skill?

Run npx -y skills add reason-machines/trending-skills --skill dflash-mlx-speculative-decoding -y in a project. After that, the dflash-mlx-speculative-decoding skill lets the agent use dflash-serve and dflash-benchmark for faster inference on Apple Silicon.

What does the dflash-mlx-speculative-decoding skill need to run?

The dflash-mlx-speculative-decoding skill needs Python 3.10 or newer, MLX 0.31.1 or newer and an Apple Silicon Mac. Supported target models include Qwen3.5 4B, 9B, 27B and 35B-A3B, with draft models resolved automatically from a registry.

Where does the dflash-mlx-speculative-decoding skill sit in its category?

The dflash-mlx-speculative-decoding skill is listed in the AI Agents & LLM Apps category on Claude Marketplaces, alongside microsoft-foundry, azure-ai and the Google agents-cli skills. It covers DFlash speed-ups on Apple Silicon, a niche those skills do not address.

More from reason-machines/trending-skills

All 251

Similar to Dflash Mlx Speculative Decoding

More AI Agents & LLM Apps