nemo_automodel.components.models.glm5_next.state_dict_adapter
nemo_automodel.components.models.glm5_next.state_dict_adapter
Checkpoint conversion for the released GLM-5.3-Flash VLM.
The checkpoint already uses the native vision/text prefix layout. Conversion is needed for grouped EP experts, flat mHC/KDA parameters, the extra MTP layer, and 128x128 block-scaled FP8 training weights.
Module Contents
Classes
Functions
Data
API
Bases: MoESplitExpertsStateDictMixin, StateDictAdapter
Convert GLM split experts and FP8 weights to trainable grouped BF16.
Match the checkpoint’s quantized matrices, including DSA-only output projections.
Convert one native tensor, including split expert and FP8 load targets.
Dequantize, drop MTP, route flat parameters and aggregate experts.
Expand grouped experts and restore released checkpoint names.
Apply global-grid block scales to one possibly misaligned local shard.
Return the global start coordinate of a DTensor’s contiguous local shard.
Create the global FP8 block-scale load destination for a 2-D weight.
Dequantize an e4m3 weight with 128x128 fp32 inverse scales.