Module glm5_next

Module glm5_next 

Source
Expand description

GLM-5.3-Flash tensor accounting (Slice 1: classification only). GLM-5.3-Flash (glm5_next) tensor accounting.

Slice 1 scope: classify every tensor in the checkpoint, deliberately. No loading, no device work, no forward pass.

Reference checkpoint: LibertAIDAI/GLM-5.3-Flash-NVFP4 snapshot 9e0d74e3cef17f634e84fb8e2223707e02616290 — 120 shards, 113,074 tensors, 407 distinct name patterns. Every claim here is scoped to that checkpoint.

The point of this module is that “we loaded the model” and “we accounted for the checkpoint” are different statements. A loader that silently ignores an unrecognised tensor will happily produce a model that is quietly wrong — the failure mode that cost the DS4F campaign weeks. So the contract is: classify returns None for anything it has not been taught, and the test suite fails if a single tensor in the reference checkpoint lands there.

Structs§

Accounting
Result of accounting a whole checkpoint’s tensor-name list.

Enums§

TensorRole
What a tensor is for. Deliberately coarse — Slice 1 proves coverage, not placement.

Functions§

account
Account for a list of (tensor_name, count) pairs.
classify
Classify one checkpoint tensor name.
is_mtp_only_name
Names that exist ONLY on the MTP layer. Used to locate the MTP layer index from the checkpoint itself rather than assuming one.
layer_index
Extract the numeric layer index from a real tensor name (None for the canonicalised layers.N. form, which carries no index).