/modelopt:modelopt-speculative-decodingfrom ModelOpt
Trains, debugs, and validates speculative decoding draft models (EAGLE3, DFlash, DSpark, Domino) using the ModelOpt launcher pipeline. Covers data synthesis, hidden-state dumping, training, and acceptance-rate benchmarking.
Ships in ModelOpt. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Everything needed to take a target model from "no draft head" to "validated acceptance rate" lives in this directory. Work through the stages below in order for a new model; jump straight to a stage when you already know which one you need.
The pipeline is the same shape for every draft-model algorithm — synthesize data, dump base-model hidden states, train the draft, benchmark acceptance rate. What changes between algorithms is which training script and recipe run, which knobs matter, and which failures are typical.
So this skill is split along those two axes, and you almost always read one file from each:
| Axis | Directory | What it holds |
|---|---|---|
| Stage | references/stages/ | The procedure — algorithm-independent |
| Algorithm | references/algorithms/ | The data sheet — scripts, recipe, knobs, thresholds, known failures |
Read the stage file for what to do, and the algorithm sheet for the values to
plug in. When a stage file says "see the algorithm sheet", it means the section of
references/algorithms/<algorithm>.md with the matching heading.
The launcher scripts in tools/launcher/common/{eagle3,specdec}/ are thin wrappers around
examples/speculative_decoding/ — main.py (training), collect_hidden_states/ (dumps),
scripts/{export_hf_checkpoint,ar_validate,quantize_drafter}.py. Read a wrapper for the
flags it passes, that directory for what they do. Its README.md is also the non-launcher
path: training invoked directly, without Slurm.
| Stage | Reference | Use when |
|---|---|---|
| 1. Configure | references/stages/configure.md | Adding a model that has no pipeline YAML yet |
| 2. Review logs | references/stages/review-logs.md | A run finished (or died) and you want a pass/fail summary |
| 3. Triage | references/stages/triage.md | A task failed and you need root cause plus a fix |
| 4. Validate | references/stages/validate.md | All tasks passed and you need to confirm the acceptance rate gate |
Review-logs and triage overlap by design: review-logs is the fast sweep across all tasks, triage is the deep dive into one failing task. Start with review-logs unless the user already knows which task broke.
All recipes live in modelopt_recipes/general/speculative_decoding/<algorithm>.yaml.
| Algorithm | Sheet | Family |
|---|---|---|
| EAGLE3 | references/algorithms/eagle3.md | Autoregressive draft head |
| DFlash | references/algorithms/dflash.md | Block diffusion |
| DSpark | references/algorithms/dspark.md | DFlash backbone + Markov head + optional confidence head |
| Domino | references/algorithms/domino.md | DFlash backbone + GRU causal correction head |
| DFlash2 | references/algorithms/dflash2.md | DFlash backbone + sublayer convolutions + candidate selector |
| LiLiCorr | references/algorithms/lilicorr.md | DFlash backbone + candidate-lattice reranker (covers lilicorr_conv.yaml) |
Everything below EAGLE3 is a DFlash variant, not a separate pipeline: same
recipe_type: speculative_dflash, same training script, same dflash.* config
namespace, selected by dflash_architecture_config.projector_type. Read
references/algorithms/dflash.md first, then the variant's sheet for the delta.
LiLiCorr ships two recipes — lilicorr.yaml and lilicorr_conv.yaml, the latter
adding DFlash2's sublayer convolutions — but one sheet covers both.
If the user's algorithm has no sheet yet, the stage procedures still apply — derive
the missing values from an existing launcher example for that algorithm
(tools/launcher/examples/*/*/hf_*_<algorithm>.yaml) and its recipe, then write the
sheet as you go. references/algorithms/README.md defines what a sheet must contain.
Confirm the algorithm and find the closest existing launcher example.
Configure — write the pipeline YAML (references/stages/configure.md).
Preview with --dryrun, then submit:
cd tools/launcher
uv run launch.py --yaml examples/<Org>/<Model>/<config>.yaml --yes
Register the job and set up monitoring per the modelopt-monitor skill.
Review logs when it finishes (references/stages/review-logs.md).
Triage anything that failed (references/stages/triage.md), fix, re-run only
the failed tasks onward via pipeline.task_N.skip=true.
Validate once all tasks pass (references/stages/validate.md).
Model-support gaps that need code changes land in modelopt/torch/speculative/ and
require a separate ModelOpt PR — the pipeline YAML alone cannot fix an unrecognized
architecture.
references/algorithms/README.md (opens in a new tab)references/algorithms/dflash.md (opens in a new tab)references/algorithms/dflash2.md (opens in a new tab)references/algorithms/domino.md (opens in a new tab)references/algorithms/dspark.md (opens in a new tab)references/algorithms/eagle3.md (opens in a new tab)references/algorithms/lilicorr.md (opens in a new tab)references/stages/configure.md (opens in a new tab)references/stages/review-logs.md (opens in a new tab)references/stages/triage.md (opens in a new tab)references/stages/validate.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
speculative-decoding, draft-model, modelopt, eagle3, acceptance-rate
npx claudepluginhub nvidia/model-optimizer --plugin modelopt32 skills in this plugin
/accessing-mlflowCompatibility name for modelopt-accessing-mlflow. Browse ModelOpt evaluation runs and artifacts in MLflow./benchmark-model-kernelsCompatibility name for modelopt-benchmark-model-kernels. Inspect model shapes and benchmark GEMM or fused-MoE kernels./commonShared ModelOpt support files. Use only when another ModelOpt skill directs you here./compare-resultsCompatibility name for modelopt-compare-results. Compare baseline and quantized evaluation results./day0-releaseCompatibility name for modelopt-day0-release. Run the full ModelOpt day-0 quantization and validation workflow./debugCompatibility name for modelopt-debug. Run commands through the remote Docker debugger relay.Other plugins' skills for the same job