IMPORTANT: To view this page as Markdown, append `.md` to the URL (e.g. /max/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. /max/get-started.md).

Python module

max.pipelines.architectures.unified_mtp_deepseekV3

DeepSeek-V3 multi-token prediction draft model for speculative decoding with unified graph compilation.

UnifiedMTPDeepseekV3Inputs​

class max.pipelines.architectures.unified_mtp_deepseekV3.UnifiedMTPDeepseekV3Inputs(tokens, input_row_offsets, signal_buffers, host_input_row_offsets, batch_context_lengths, *, kv_cache_inputs=None, lora=None, hidden_states=None, return_n_logits, data_parallel_splits, ep_inputs=(), draft_tokens=None, seed=None, temperature=None, top_k=None, max_k=None, top_p=None, min_top_p=None, in_thinking_phase=None, pinned_bitmask=None, wait_payload=None, device_bitmask_scratch=None, structured_output=False)

source

Bases: UnifiedSpecDecodeInputs, DeepseekV3Inputs

Inputs for the UnifiedMTPDeepseekV3 model.

Target-prefix fields come from DeepseekV3Inputs; the spec-decode fields and trailing buffer packing come from UnifiedSpecDecodeInputs. The MTP graph binds the per-row in_thinking_phase flag (consumed by relaxed acceptance).

Parameters:

buffers​

property buffers: tuple[Buffer, ...]

source

Returns positional Buffer inputs for model ABI calls.

UnifiedMTPDeepseekV3Model​

class max.pipelines.architectures.unified_mtp_deepseekV3.UnifiedMTPDeepseekV3Model(*args, **kwargs)

source

Bases: _UnifiedSpecDecodeModelMixin, DeepseekV3Model

DeepseekV3 with MTP: merge + target + rejection + shift in one graph.

batch_processor_cls​

batch_processor_cls

source

alias of UnifiedMTPDeepseekV3BatchProcessor