Module glm5_next

Module glm5_next 

Source
Expand description

2026-09-25: GLM-5.3 checkpoint tensor classification (classify). 2026-09-25: GLM-5.3 (glm5_next) tensor accounting: classify gives the role of a checkpoint tensor name, and account totals a name list by role. Nothing is loaded.

classify returns None for a name it does not know, so an unrecognised tensor is reported rather than skipped. The counts below are from the reference checkpoint’s name fixture (crates/model-engine/tests/fixtures/glm53-nvfp4-9e0d74e3-patterns.tsv), whose test fails if any name in it is unknown.

Owner: model-arch weight loader. Invariants: none beyond the types.

Structs§

Accounting
2026-09-25: The result of account.

Enums§

TensorRole
2026-09-25: What a tensor is for.

Functions§

account
2026-09-25: Total a list of (tensor_name, count) pairs by role.
classify
2026-09-25: Classify one checkpoint tensor name. None means unrecognised; callers must treat it as an error, not as a tensor to skip.
is_mtp_only_name
2026-09-25: Whether name is an MTP-layer tensor of a numbered layer (eh_proj, enorm, hnorm, shared_head.norm). account uses it to find the MTP layer’s index. The reference checkpoint has no mtp.0.* tensor.
layer_index
2026-09-25: The number after the first layers segment, or None when it is absent or not a number (as in the fixture’s layers.N.).