Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
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
""
"
2
Direct Preference Optimization (and ORPO / KTO variants) on preference pairs.
3
4
The policy is initialized
from
the SFT checkpoint; a frozen deep copy of it serves
as
the
Callers
nothing calls this directly
Calls
1
main
Function · 0.70
Tested by
no test coverage detected