浏览代码

fix HF export script

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
 }