Eric Wang 3 роки тому
батько
коміт
6ced8d9907
1 змінених файлів з 1 додано та 1 видалено
  1. 1 1
      export_hf_checkpoint.py

+ 1 - 1
export_hf_checkpoint.py

@@ -46,7 +46,7 @@ assert not torch.allclose(first_weight_old, first_weight)
 
 lora_model_sd = lora_model.state_dict()
 deloreanized_sd = {
-    k.replace("base_model.model.model", "model"): v
+    k.replace("base_model.model.", ""): v
     for k, v in lora_model_sd.items()
     if "lora" not in k
 }