How ankitsharma285/judge-audited-dpo works
This repository is a research pipeline for bias-audited instruction-model post-training and evaluation. Its main workflow prepares disjoint SFT and preference-prompt data, trains an SFT policy, generates candidate answers, obtains judge-labeled preference pairs, trains DPO variants, then evaluates them against SFT on held-out and shifted prompts. Separate judge pilots validate labeling and evaluation judges against human annotations; a human spot-check supports the labeling audit. The README documents the major stages; source excerpts provide implementation detail for only some components.
Main entry points: sft_train.py Train SFT · generate_eval_completions.py Generate eval answers · data_prep.py Prepare datasets · label_pairs.py Label preference pairs
Components 18
Data and training
- Prepare datasets
data_prep.py - Train SFT
sft_train.py - Check SFT
sft_check.py - Train DPO
dpo_train.py - Closeout checks
closeout_checks.py
Preference labeling
- Sample completions
generate_completions.py - Label preference pairs
label_pairs.py
Judge validation
- Validate labeling judge
judge_pilot.py - Prepare human spot-check
spotcheck_prepare.py - Score human spot-check
spotcheck_score.py - Validate eval judge
eval_judge_pilot.py
Held-out evaluation
- Prepare eval split
prepare_eval_split.py - Generate eval answers
generate_eval_completions.py - Score model comparisons
score_eval.py
Other components
- Researcher
- Alpaca data
- Human annotations
- Human reviewer
Connections 18
- Alpaca data → Prepare datasets: provides source
data_prep.py - Prepare datasets → Train SFT: provides SFT data
README.md - Prepare datasets → Sample completions: provides prompts
README.md - Train SFT → Sample completions: provides policy
README.md - Sample completions → Label preference pairs: provides candidates
README.md - Label preference pairs → Train DPO: provides preference pairs
README.md - Train SFT → Train DPO: provides reference policy
README.md - Human annotations → Validate labeling judge: validates against
README.md - Human annotations → Validate eval judge: validates against
README.md - Label preference pairs → Prepare human spot-check: provides labeled pairs
spotcheck_prepare.py - Human reviewer → Score human spot-check: provides judgments
- Prepare human spot-check → Score human spot-check: prepares audit
spotcheck_prepare.py - Alpaca data → Prepare eval split: provides eval prompts
README.md - Prepare eval split → Generate eval answers: provides eval prompts
README.md - Train SFT → Generate eval answers: provides SFT checkpoint
README.md - Train DPO → Generate eval answers: provides DPO checkpoints
README.md - Generate eval answers → Score model comparisons: provides answers
README.md - Validate eval judge → Score model comparisons: validates judge
README.md