Module weight_loader

Module weight_loader 

Source
Expand description

Weight loading traits and per-model loader implementations.

Translates flat WeightStore into typed TransformerLayer objects. Each model architecture has its own ModelWeightLoader implementation that knows the HuggingFace weight name patterns.

Submodules contain per-family loaders:

  • qwen3: Qwen3-Next (NVFP4, hybrid SSM+Attention+MoE)
  • qwen35: Qwen3.5 MoE (35B, 122B)
  • qwen35_dense: Qwen3.5 Dense (27B)
  • qwen3_vl: Qwen3-VL (vision-language)
  • nemotron: Nemotron-H (Mamba-2 + MoE + Attention)
  • gemma4: Gemma-4 (pure attention, GeGLU, sliding + full attention)

Re-exports§

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§

dflash_loader
DFlash drafter weight loader.
glm5_next
GLM-5.3-Flash tensor accounting (Slice 1: classification only). GLM-5.3-Flash (glm5_next) tensor accounting.
glm5_next_load
Glm5NextWeightLoader — assembles the 45-layer GLM-5.3 text stack from a WeightStore.

Structs§

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

Enums§

QuantFormat
Runtime quantization format for weight dispatch.
WeightFormat
Checkpoint weight format, detected from safetensors metadata.

Traits§

ModelWeightLoader
Loads weights from a WeightStore into typed layer objects.