nemo_automodel.components.models.deepseek_v41.config
nemo_automodel.components.models.deepseek_v41.config
Hugging Face checkpoint configuration for DeepSeek-V4.1-Flash.
Module Contents
Classes
API
Bases: PretrainedConfig
Nested checkpoint configuration for DeepseekV41ForCausalLM.
Hugging Face dictionaries are materialized at this boundary; model
components receive the typed text_config and vision_config.
Quantization metadata, when present in a checkpoint, is preserved by the
base class rather than imposed on checkpoint-free BF16 configurations.
Build the model-owned DSpark training adapter.
Parameters:
Declarative draft settings supplied by the DSpark recipe.
Returns: DeepseekV41DSparkModel
Native DeepSeek V4.1 DSpark model ready for device placement.
Load the checkpoint’s fast tokenizer for deterministic Engram hashing.
Returns: PreTrainedTokenizerFast
The original fast tokenizer from this configuration’s checkpoint
Raises:
ValueError: The configuration has no checkpoint source. Callers constructing a tiny model can supply a tokenizer directly.TypeError: The checkpoint resolves to a slow tokenizer.
Validated declarative configuration for the released V4.1 DSpark module.
Validate the released contract and build its training adapter.
Returns: DeepseekV41DSparkModel
Newly initialized DeepSeek V4.1 DSpark training model.
Raises:
ValueError: If recipe settings disagree with the released checkpoint.
Construction settings for the frozen, text-only V4.1 DSpark target.
The released feature contract requires the full target depth. The native MTP tensors belong to the separately trained draft.
Load the text target through the supplied EP/FSDP infrastructure.
Parameters:
Resolved execution device; the sharded target requires CUDA.
Precision used to load and compute the frozen target.
Runtime parallelism configuration composed by the recipe.
Returns: DeepseekV41ForCausalLM
The pretrained target with its vision tower disabled.
Bases: PretrainedConfig
Declarative configuration of the CSA2, single-pass mHC and Engram backbone.
Defaults match the released Flash text configuration. Reducing
num_hidden_layers retains the complete source-layer and compression
schedules: a pretrained prefix must keep its original sharing and hashing
identities. Explicit smaller schedules support independent tiny models.
Unknown checkpoint metadata is retained by the Hugging Face base class.
Bases: PretrainedConfig
Configuration of the released 2D-RoPE vision encoder and image sizing.
Declarative DSpark settings supplied by the generic training recipe.