nemo_automodel.components.speculative.dspark.target_utils

View as Markdown

Shared DSpark target-identification and tokenization helpers.

Module Contents

Functions

NameDescription
apply_target_chat_templateAttach or validate the chat template used to tokenize messages-format data.
read_target_model_typeReturn the target HF model_type without instantiating the model when possible.

Data

DEEPSEEK_V4_MODEL_TYPE

GEMMA4_MODEL_TYPES

GLM_5_2_MODEL_TYPE

MINIMAX_M3_MODEL_TYPES

API

nemo_automodel.components.speculative.dspark.target_utils.apply_target_chat_template(
tokenizer,
chat_template
) -> None

Attach or validate the chat template used to tokenize messages-format data.

nemo_automodel.components.speculative.dspark.target_utils.read_target_model_type(
target_path: str,
trust_remote_code: bool
) -> str

Return the target HF model_type without instantiating the model when possible.

nemo_automodel.components.speculative.dspark.target_utils.DEEPSEEK_V4_MODEL_TYPE = 'deepseek_v4'
nemo_automodel.components.speculative.dspark.target_utils.GEMMA4_MODEL_TYPES = ('gemma4', 'gemma4_unified')
nemo_automodel.components.speculative.dspark.target_utils.GLM_5_2_MODEL_TYPE = 'glm_moe_dsa'
nemo_automodel.components.speculative.dspark.target_utils.MINIMAX_M3_MODEL_TYPES = ('minimax_m3_vl',)