config_declared_variant

Function config_declared_variant 

Source
pub fn config_declared_variant(config: &ModelConfig) -> Option<Nvfp4Variant>
Expand description

Step (1) of detect_nvfp4_variant: the variant the CONFIG declares, asked WITHOUT a WeightStore.

Factored out (#915, 2026-09-11) so a caller that has only config.json — the pre-load residency prediction in weight_loader::predicted_residency, which runs before the store exists — asks exactly the question the loader will later answer instead of keeping a second copy of this precedence. None means “the config does not say”; it is NEVER a guess, and the sniffing half of detect_nvfp4_variant is what resolves it once the store is loaded.