MCPcopy
hub / github.com/FareedKhan-dev/train-llm-from-scratch / train_dpo.py

File train_dpo.py

scripts/train_dpo.py:None–None  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1"""
2Direct Preference Optimization (and ORPO / KTO variants) on preference pairs.
3
4The policy is initialized from the SFT checkpoint; a frozen deep copy of it serves as the

Callers

nothing calls this directly

Calls 1

mainFunction · 0.70

Tested by

no test coverage detected