From f8977c233f453313c124dc0753dfc1669ef401f0 Mon Sep 17 00:00:00 2001 From: Chenyaaang <42742451+Chenyaaang@users.noreply.github.com> Date: Thu, 29 May 2025 03:07:20 -0700 Subject: [PATCH] Fix an error in dummy weight loading for quantization models (#18855) Signed-off-by: Chenyaaang --- vllm/model_executor/model_loader/weight_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vllm/model_executor/model_loader/weight_utils.py b/vllm/model_executor/model_loader/weight_utils.py index f61956f4e8e0..7a9a68be8805 100644 --- a/vllm/model_executor/model_loader/weight_utils.py +++ b/vllm/model_executor/model_loader/weight_utils.py @@ -696,7 +696,7 @@ def initialize_dummy_weights( # Note: We avoid using torch.rank_like as it doesn't currently # support the generator argument. param.copy_((high - low) * - torch.rand(*param.shape, + torch.rand(param.shape, generator=generator, dtype=param.dtype, layout=param.layout,