mirror of
https://github.com/hiyouga/LLaMA-Factory.git
synced 2025-08-22 22:02:51 +08:00
fix src/llamafactory/train/callbacks.py
Former-commit-id: cff89a2e8907f3fe89406006105cb6494e2ee993
This commit is contained in:
parent
a9ce54d143
commit
973aac3203
@ -79,7 +79,7 @@ def fix_valuehead_checkpoint(
|
||||
if name.startswith("v_head."):
|
||||
v_head_state_dict[name] = param
|
||||
else:
|
||||
decoder_state_dict[name.replace("pretrained_model.", "", count=1)] = param
|
||||
decoder_state_dict[name.replace("pretrained_model.", "",1)] = param
|
||||
|
||||
model.pretrained_model.save_pretrained(
|
||||
output_dir, state_dict=decoder_state_dict or None, safe_serialization=safe_serialization
|
||||
|
Loading…
x
Reference in New Issue
Block a user