[Bug] fix(DummyModelLoader): run post_load_weights before process_weights_after_loading (#28665)
This commit is contained in:
@@ -1382,6 +1382,12 @@ class DummyModelLoader(BaseModelLoader):
|
||||
quant_config,
|
||||
)
|
||||
|
||||
# NOTE(woosuk): For accurate performance evaluation, we assign
|
||||
# random values to the weights.
|
||||
initialize_dummy_weights(model)
|
||||
|
||||
_post_load_weights(model)
|
||||
|
||||
for _, module in model.named_modules():
|
||||
quant_method = getattr(module, "quant_method", None)
|
||||
if quant_method is not None:
|
||||
@@ -1393,12 +1399,6 @@ class DummyModelLoader(BaseModelLoader):
|
||||
continue
|
||||
quant_method.process_weights_after_loading(module)
|
||||
|
||||
# NOTE(woosuk): For accurate performance evaluation, we assign
|
||||
# random values to the weights.
|
||||
initialize_dummy_weights(model)
|
||||
|
||||
_post_load_weights(model)
|
||||
|
||||
return model.eval()
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user