Skip to main content
skill CX Codex

dflash-mlx-speculative-decoding — Claude Code skill: setup guide

Speeds up MLX inference on Apple Silicon by 1.7x to 4.1x using lossless DFlash speculative decoding with block diffusion drafts.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add reason-machines/trending-skills --skill dflash-mlx-speculative-decoding -a claude-code
Open on GitHub

What dflash-mlx-speculative-decoding does

This skill guides the coding agent through configuring DFlash speculative decoding inside Apple Silicon MLX setups. Generation relies on a compact draft model near 1B parameters that produces 16 candidate tokens simultaneously. The primary model evaluates this entire block during one forward pass. Because only verified tokens make it into output, the generated text matches greedy decoding.

The package provides paired setups for Qwen3.5 models at 4B, 9B, 27B, and 35B. Draft checkpoints resolve automatically through an internal registry. You also get a CLI runner dflash, an OpenAI-compatible runtime dflash-serve on port 8000, and a benchmarking tool dflash-benchmark.

An Apple Silicon Mac, Python 3.10+, and MLX 0.31.1+ are mandatory. Unlisted model checkpoints fail at startup unless you supply an explicit draft model using --draft.

What it helps with

  • speed up token generation under MLX
  • run a local OpenAI-compatible inference server on port 8000
  • benchmark inference speed gains against baseline mlx_lm
  • configure speculative decoding pairs for Qwen3.5

Example prompts for the agent

  • Start a local dflash-serve instance with model Qwen/Qwen3.5-9B on port 8000
  • Benchmark Qwen/Qwen3.5-9B against baseline MLX with a 1024 token limit
  • Write a Python script using DFlashRuntime for streaming token output

How to install dflash-mlx-speculative-decoding

1Skills CLI (Vercel)

npx skills add reason-machines/trending-skills --skill dflash-mlx-speculative-decoding -a claude-code

2Manually: put the files in place

~/.claude/skills/dflash-mlx-speculative-decoding/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/dflash-mlx-speculative-decoding/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about dflash-mlx-speculative-decoding

How to install dflash-mlx-speculative-decoding in Claude Code?

Run npx skills add reason-machines/trending-skills --skill dflash-mlx-speculative-decoding -a claude-code. The file will be placed in ~/.claude/skills/dflash-mlx-speculative-decoding/SKILL.md.

What does dflash-mlx-speculative-decoding do?

It gives your assistant ready patterns to run DFlash speculative decoding inside MLX on Apple Silicon. Draft models propose 16 tokens at once, verified in a single forward pass.

What dependencies does DFlash require on Apple Silicon?

You need an Apple Silicon Mac, Python 3.10 or newer, and MLX 0.31.1+. The Python runtime installs via pip install dflash-mlx.

Similar skills

All skills for AI and ML →

From the same set186

webphysics-avbd-engine This skill helps wire a WebGPU physics engine into a project, including bodies, contacts, joints, springs, and render-state updates. CX Codex +1 460installs anything-analyzer-cdp This skill supports browser protocol analysis with an Electron app that captures traffic through CDP and sends collected data to an AI model. CX Codex +1 447installs capso-screenshot-macos A skill about Capso, the open-source macOS app for capturing screens and recording video. It helps you embed Capso's SPM packages in your own project. CX Codex +1 445installs ntwarden-windows-analysis-toolkit A skill for digging into Windows internals: processes, services, network, ETW, kernel. Useful when you need to break down what a suspicious process is doing. CX Codex +1 443installs geoflow-content-automation A skill that walks your agent through GEOFlow: AI article generation, task scheduling, review and publishing via CLI, REST API and Docker. Useful when the content pipeline runs on PHP and PostgreSQL. CX Codex +1 442installs acgti-anime-persona-quiz This skill helps extend ACGTI, a Vue 3 and TypeScript anime quiz that calculates an MBTI-style result and selects a character. CX Codex +1 440installs cli-to-js-api-wrapper A skill that walks through wrapping a command line tool in a typed JavaScript/TypeScript API with the cli-to-js package. Useful when an agent should call commands as methods, not shell strings. CX Codex +1 439installs palantir-for-family-trips Helps set up and tweak a dark-mode operations dashboard for multi-family road trips. Coordinates convoy routes, arrival windows, and shared schedules. CX Codex +1 437installs

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor