[Fix] Add undefined update_tensor_inplace function (#6307)
This commit is contained in:
@@ -146,6 +146,10 @@ def requantize_with_max_scale(
|
||||
return max_w_scale, weight
|
||||
|
||||
|
||||
def update_tensor_inplace(old: torch.Tensor, new: torch.Tensor) -> None:
|
||||
old.copy_(new)
|
||||
|
||||
|
||||
# Adapted from https://github.com/vllm-project/vllm/blob/main/vllm/model_executor/layers/quantization/utils/layer_utils.py
|
||||
# Newly generated tensors need to replace existing tensors that are
|
||||
# already registered as parameters by vLLM (and won't be freed)
|
||||
|
||||
Reference in New Issue
Block a user