[v1][feature] add dpo trainer (#10544)

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
codingma
2026-06-26 15:32:10 +08:00
committed by GitHub
parent b7615dbdc9
commit 9c0b4b3835
7 changed files with 859 additions and 4 deletions

View File

@@ -146,7 +146,9 @@ def launch():
run_sft()
elif command == "dpo":
raise NotImplementedError("DPO trainer is not implemented yet.")
from llamafactory.v1.trainers.dpo_trainer import run_dpo
run_dpo()
elif command == "rm":
from llamafactory.v1.trainers.rm_trainer import run_rm
@@ -173,9 +175,9 @@ def main():
run_sft()
elif command == "dpo":
# from llamafactory.v1.trainers.dpo_trainer import run_dpo
# run_dpo()
raise NotImplementedError("DPO trainer is not implemented yet.")
from llamafactory.v1.trainers.dpo_trainer import run_dpo
run_dpo()
elif command == "rm":
from llamafactory.v1.trainers.rm_trainer import run_rm