Skip to content

Commit 676244a

Browse files
Update quantization_engine.py
1 parent a55dc1e commit 676244a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

quantllm/quant/quantization_engine.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -521,7 +521,7 @@ def _prepare_model_instance(self, model_to_prepare: PreTrainedModel, make_copy:
521521
prepared_model.eval()
522522
if self.device_manager.primary_device is not None:
523523
self.logger.log_info(f"Moving model to device: {self.device_manager.primary_device}")
524-
prepared_model = move_to_device(prepared_model, self.device_manager.primary_device)
524+
prepared_model = prepared_model.to(self.device_manager.primary_device)
525525

526526
self.logger.log_info("Model preparation (copy, eval, device move) completed successfully.")
527527
return prepared_model
@@ -600,4 +600,4 @@ def _update_model_config_with_quant_params(self, method_name: str, method_specif
600600
else:
601601
self.model.config.quantization_config = quant_params
602602

603-
self.logger.log_info(f"Updated model.config.quantization_config with: {self.model.config.quantization_config}")
603+
self.logger.log_info(f"Updated model.config.quantization_config with: {self.model.config.quantization_config}")

0 commit comments

Comments
 (0)