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)
Bases: DSparkDeepseekV41DraftArchConfigBase
The graph-API stages’ config, which builds their module.
-
Parameters:
-
max_seq_len (int)
build_module()
classmethod build_module(context)
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)
Bases: object
The stages’ module config, and what the pairing reads beside it.
-
Parameters:
-
module (DeepseekV41Config)
block_size
property block_size: int
Returns the tokens a block holds, every one of them drafted.
hidden_size
property hidden_size: int
Returns the trunk’s hidden size, which the stages draft in.
mask_token_id
property mask_token_id: int
Returns the token that fills the block past its anchor.
module
module: DeepseekV41Config
target_layer_ids
Returns the trunk layers whose states the stages read.
vocab_size
property vocab_size: int
Returns the trunk’s vocabulary, which the stages score.