Module kimi_k3_loader

Module kimi_k3_loader 

Source
Expand description

2026-09-25: The Kimi K3 ModelWeightLoader: binds BF16 or FP32 checkpoints, and packed MXFP4 experts only when K3_ALLOW_MXFP4=1.

Owner: model-engine Kimi K3 loader. Invariants:

  • Every load_* method except load_mtp_weights (which returns Ok(None)) calls refuse_mxfp4 before it binds anything.

Structs§

KimiK3DryRun
2026-09-25: Result of walking a K3 weight_map. In a returned report missing_text_classes and unknown_keys are always empty: either one being non-empty is an error instead.
KimiK3WeightLoader

Functions§

dry_run_index_json
2026-09-25: Parse a safetensors index.json and dry-run its weight_map.
dry_run_weight_map
refuse_mxfp4
2026-09-25: Fail when a tensor name in store contains weight_packed and K3_ALLOW_MXFP4 is not 1.