Utils for model executor.
 
  Source code in vllm/model_executor/utils.py
  
  Source code in vllm/model_executor/utils.py
  
    
  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 |