vllm.model_executor.models.expert_substitution
¶
Functions:
-
as_expert_substitution_model–Load constant expert values at the
load_weightsboundary.
_parse_approx_value_name(name)
¶
Return (layer index, expert ID) of an approx_value tensor name.
as_expert_substitution_model(model_cls, model_config)
¶
Load constant expert values at the load_weights boundary.
Initial loading and direct weight updates both go through load_weights.
Explicitly named values are always consumed and loaded if their layer is
built by this model. approx_value tensors of layers built elsewhere
(other pipeline stages, MTP layers) are passed through, so the model's own
loader skips them like any other weight of a layer it does not own.