mirror of
https://github.com/modelscope/FunASR
synced 2025-09-15 14:48:36 +08:00
bugfix python runtime
This commit is contained in:
parent
15ef54a3ce
commit
a20157435e
@ -347,7 +347,10 @@ class Trainer:
|
||||
if self.use_lora:
|
||||
lora_outdir = f"{self.output_dir}/lora-{ckpt_name}"
|
||||
os.makedirs(lora_outdir, exist_ok=True)
|
||||
model.llm.save_pretrained(lora_outdir)
|
||||
if hasattr(model, "module"):
|
||||
model.module.llm.save_pretrained(lora_outdir)
|
||||
else:
|
||||
model.llm.save_pretrained(lora_outdir)
|
||||
filename = os.path.join(self.output_dir, ckpt_name)
|
||||
torch.save(state, filename)
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user