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.architectures.dspark_deepseekV41

The DSpark stages DeepSeek-V4.1’s checkpoint ships beside its trunk.

DSparkDeepseekV41DraftArchConfig​

class max.pipelines.architectures.dspark_deepseekV41.DSparkDeepseekV41DraftArchConfig(max_seq_len)

source

Bases: DSparkDeepseekV41DraftArchConfigBase

The graph-API stages’ config, which builds their module.

Parameters:

max_seq_len (int)

build_module()​

classmethod build_module(context)

source

Builds the stages from the trunk’s checkpoint context names.

The stages read the trunk’s embedding and head, which their caller passes in, so the checkpoint’s mtp.* weights are all they load. Their position tables cover the slack of the trunk’s KV params, which context carries.

The stages read the trunk’s embedding and head, which their caller passes in, so the checkpoint’s mtp.* weights are all they load. Their position tables cover the slack of the trunk’s KV params, which context carries.

Raises:

ValueError – If the method isn’t dspark, or the checkpoint names no token to fill the block with.

Parameters:

context (ModelLoadContext)

Return type:

tuple[DeepseekV41DSparkDrafter, DSparkDeepseekV41DraftConfig]

DSparkDeepseekV41DraftConfig​

class max.pipelines.architectures.dspark_deepseekV41.DSparkDeepseekV41DraftConfig(module)

source

Bases: object

The stages’ module config, and what the pairing reads beside it.

Parameters:

module (DeepseekV41Config)

block_size​

property block_size: int

source

Returns the tokens a block holds, every one of them drafted.

hidden_size​

property hidden_size: int

source

Returns the trunk’s hidden size, which the stages draft in.

mask_token_id​

property mask_token_id: int

source

Returns the token that fills the block past its anchor.

module​

module: DeepseekV41Config

source

target_layer_ids​

property target_layer_ids: list[int]

source

Returns the trunk layers whose states the stages read.

vocab_size​

property vocab_size: int

source

Returns the trunk’s vocabulary, which the stages score.