IMPORTANT: To view this page as Markdown, append `.md` to the URL (e.g. /get-started.md). For the complete documentation index, see llms.txt.
Skip to main content
For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /get-started.md).

Python module

max.pipelines.speculative

Speculative decoding pipelines and configuration for MAX.

Configuration​

SpeculativeConfigConfigures speculative decoding for a pipeline.
SpeculativeMethodThe supported methods for speculative decoding.
VerifyWidthRangeOne inclusive decode-batch-size range and the drafts to verify in it.
MAGIC_DRAFT_TOKEN_IDSentinel draft-token id for prefill / dummy-draft graph-capture steps.

Draft weights​

DraftAliasesThe weights a draft inherits from its target instead of loading.
NO_ALIASESA draft that loads every weight itself.
validate_draft_state_dictChecks a draft checkpoint covers every weight the draft module needs.