File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change 2525from modelopt .torch .export .unified_export_hf import _export_hf_checkpoint
2626from modelopt .torch .opt .conversion import restore_from_modelopt_state
2727from modelopt .torch .quantization .utils import set_quantizer_state_dict
28+ from modelopt .torch .utils import print_rank_0
2829
2930RAND_SEED = 1234
3031
@@ -46,12 +47,13 @@ def get_lora_model(
4647 # Restore modelopt state
4748 modelopt_state = torch .load (f"{ ckpt_path } /modelopt_state_calib.pth" , weights_only = False )
4849 restore_from_modelopt_state (model , modelopt_state )
50+ print_rank_0 ("Restored modelopt state" )
4951
5052 # Restore modelopt quantizer state dict
5153 modelopt_weights = modelopt_state .pop ("modelopt_state_weights" , None )
5254 if modelopt_weights is not None :
53- print ("Restoring modelopt weights" )
5455 set_quantizer_state_dict (model , modelopt_weights )
56+ print_rank_0 ("Restored modelopt quantizer state dict" )
5557
5658 return model
5759
You can’t perform that action at this time.
0 commit comments