Module loaders_fp8

Module loaders_fp8 

Source
Expand description

2026-09-25: FP8 block-scaled weight loading, BF16-to-NVFP4 quantization, and the attention, SSM and MoE layer loaders.

Owner: model-layers (weight loading). Invariants:

  • Every Fp8Weight returned here holds its block scale as an FP32 device buffer.

Functionsยง

load_attention
2026-09-25: Load the {layer_prefix}.self_attn weights of a full-attention layer.
load_fp8_block_scaled_as_fp8weight
2026-09-25: Load an FP8 E4M3 block-scaled checkpoint weight as a native Fp8Weight.
load_moe
2026-09-25: Load the {layer_prefix}.mlp MoE weights of a layer.
load_moe_skip_experts
2026-09-25: load_moe with every routed expert left as ExpertWeight::null(). The native-FP8 qwen3 loader uses it and loads the routed experts separately.
load_ssm
2026-09-25: Load the {layer_prefix}.linear_attn weights of a linear-attention layer.
quantize_to_nvfp4
2026-09-25: Quantize a BF16 dense [n, k] weight to NVFP4 on the GPU.