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.architectures.mtp_deepseekV3
The NextN head a DeepseekV3 checkpoint ships beside its trunk.
MTPDeepseekV3DraftArchConfig
class max.pipelines.architectures.mtp_deepseekV3.MTPDeepseekV3DraftArchConfig(max_seq_len)
Bases: ArchConfigWithBoundedMaxSeqLen
The draft architecture’s config: its sequence bound and KV leaf.
-
Parameters:
-
max_seq_len (int)
build_module()
classmethod build_module(context)
Builds the NextN head from the target’s checkpoint, which
context names.
It embeds and projects through the target’s embedding and head, so spec decoding shares those onto it.
-
Raises:
-
KeyError – If the checkpoint has no NextN layer.
-
Parameters:
-
context (ModelLoadContext)
-
Return type:
-
tuple[DeepseekV3NextN, DeepseekV3NextNConfig]
construct_kv_params()
classmethod construct_kv_params(huggingface_config, pipeline_config, devices, kv_cache_config, cache_dtype)
Returns a one-layer view of the target’s cache, for the one decoder layer the head has.
-
Parameters:
-
- huggingface_config (AutoConfig)
- pipeline_config (PipelineConfig)
- devices (list[DeviceRef])
- kv_cache_config (KVCacheConfig)
- cache_dtype (DType)
-
Return type:
initialize()
classmethod initialize(pipeline_config, model_config=None, *, max_seq_len)
Records the sequence length the pipeline resolved.
-
Parameters:
-
- pipeline_config (PipelineConfig)
- model_config (MAXModelConfig | None)
- max_seq_len (int)
-
Return type:
max_seq_len
max_seq_len: int
convert_mtp_safetensor_state_dict()
max.pipelines.architectures.mtp_deepseekV3.convert_mtp_safetensor_state_dict(state_dict, huggingface_config, **unused_kwargs)
Returns the NextN layer’s weights, under the NextN module’s names.
The trunk’s weights load through the target’s own adapter, which drops this layer.