Fix an error in dummy weight loading for quantization models (#18855)

Signed-off-by: Chenyaaang <chenyangli@google.com>
This commit is contained in:
Chenyaaang
2025-05-29 03:07:20 -07:00
committed by GitHub
parent f274581f44
commit f8977c233f

View File

@@ -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,