vllm.model_executor.utils ¶
Utils for model executor.
get_moe_expert_mapping ¶
Source code in vllm/model_executor/utils.py
get_packed_modules_mapping ¶
Source code in vllm/model_executor/utils.py
maybe_disable_graph_partition ¶
set_weight_attrs ¶
Set attributes on a weight tensor.
This method is used to set attributes on a weight tensor. This method will not overwrite existing attributes.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
weight | Tensor | The weight tensor. | required |
weight_attrs | dict[str, Any] | None | A dictionary of attributes to set on the weight tensor. | required |