Skip to main content

validate_step_nvfp4_checkpoint

Function validate_step_nvfp4_checkpoint 

Source
pub fn validate_step_nvfp4_checkpoint(
    src: &dyn TensorSource,
    contract: &ModelParallelContract,
) -> Result<usize, TopologyError>
Expand description

Prove that the official Step NVFP4 checkpoint exposes every routed expert projection as a native stacked modelopt NVFP4 bank: packed e2m1 codes [E, out, in/2], per-16 UE4M3 scales [E, out, in/16], and a finite positive per-expert weight_scale_2 macro. Converted and per-tensor artifacts do not inherit this contract. The macro census matters: those values run ~1e-5..1e-4 in the official artifact and dropping them silently produces garbage, so a bank whose macros fail the finite-positive check refuses here rather than at first decode.