Module weight_loader

Module weight_loader 

Source
Expand description

2026-09-25: The ModelWeightLoader trait, and one loader per architecture that turns a flat WeightStore into typed TransformerLayers.

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

Re-exports§

pub use deepseek_v4::DeepSeekV4WeightLoader;
pub use dflash_loader::DflashConfig;
pub use dflash_loader::DflashLayerWeights;
pub use dflash_loader::DflashSubConfig;
pub use dflash_loader::DflashWeights;
pub use dflash_loader::load_dflash_weights;
pub use dflash_loader::store_has_dflash_weights;
pub use glm5_next_load::Glm5NextWeightLoader;

Modules§

deepseek_v4
2026-09-25: DeepSeek-V4 weight loader: layers, embedding, final norm and lm_head.
deepseek_v41
2026-09-25: DeepSeek-V4.1 loader: assembles DeepSeekV41Layers from a GGUF checkpoint.
dflash_loader
2026-09-25: DFlash drafter loader: parses the drafter’s config.json and loads its weights into DflashWeights for crate::dflash_head::BlockDiffusionDraftHead.
fp8_residency
2026-09-25: The native-FP8 dense loader’s derived-copy decision table and the shape arithmetic that prices it. 2026-09-25: Which derived weight copies the native-FP8 dense route builds, and a tally of the derived bytes the loader kept, skipped and freed.
glm5_next
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.
glm5_next_load
2026-09-25: Glm5NextWeightLoader: builds the GLM-5.3 text stack from a WeightStore, plus the helpers the MTP loader shares.
glm5_next_mtp
2026-09-25: Load GLM-5.3’s MTP block, model.language_model.layers.{num_hidden_layers}, as the body of the draft proposer.
glm5_next_vision
2026-09-25: Bind the GLM-5.3 vision tower (*.visual.*) as BF16 device pointers.
predicted_residency
2026-09-25: That table evaluated from the config before the checkpoint loads; preflight’s headroom check reads it. 2026-09-25: The derived-weight bytes of the native-FP8 dense route, predicted from the config and the environment before the checkpoint loads.

Structs§

Gemma4WeightLoader
LagunaWeightLoader
LongcatWeightLoader
MinimaxM2WeightLoader
NemotronHWeightLoader
NllbWeightLoader
Qwen3VLWeightLoader
Qwen3WeightLoader
Qwen4ExpWeightLoader
Qwen35DenseWeightLoader
Qwen35WeightLoader
Step3p7WeightLoader

Enums§

QuantFormat
2026-09-25: Runtime quantization format of a loader’s weights, which the qwen3 and qwen35 loaders resolve from the checkpoint’s NVFP4 variant.
WeightFormat
2026-09-25: On-disk weight format, derived from detect_nvfp4_variant.

Traits§

ModelWeightLoader
2026-09-25: Loads weights from a WeightStore into typed layer objects.