auto_detect_weight_prefix

Function auto_detect_weight_prefix 

Source
pub fn auto_detect_weight_prefix(store: &WeightStore, config: &mut ModelConfig)
Expand description

Resolve the weight-key prefix a nested (multimodal) checkpoint uses.

Lives here rather than in the server because it depends only on the store and the config, and BOTH the serve path and the integration harness need it: a nested checkpoint stores model.language_model.layers.0.…, and a caller that skips this step fails with “Weight ‘model.layers.0.input_layernorm. weight’ not found in store” after a full weight load. Keeping one copy is what stops the test from accepting a different set of checkpoints than production does.