Repository for paper: Retaining by Doing: The Role of On-Policy Data in Mitigating Forgetting
Download and extract the data to the data/ directory:
The data is organized as follows:
data/
├── sft/ # Expert SFT data
│ ├── ifeval.jsonl
│ ├── mmlu.jsonl
│ └── countdown.jsonl
├── self-sft/ # On-policy (Self-SFT) data per model
│ ├── Llama-3.2-1B-Instruct/
│ ├── Llama-3.1-8B-Instruct/
│ ├── Qwen2.5-1.5B-Instruct/
│ └── Qwen2.5-7B-Instruct/
├── rl/ # RL training data
│ ├── ifeval.jsonl
│ ├── mmlu.jsonl
│ └── countdown.jsonl
└── eval/ # Evaluation data
├── ifeval.jsonl
├── mmlu.jsonl
├── countdown.jsonl
├── math.jsonl
├── wildjailbreak.jsonl
└── wildguardtest.jsonl
model_name_short: Choose from
llama-3.2-1b-instllama-3.1-8b-instqwen-2.5-1.5b-instqwen-2.5-7b-instbash scripts/sft.sh
Configure the script by modifying:
Set dataset_name to one of the following:
IFEvalSFTDatasetMMLUSFTDatasetCountdownSFTDatasetbash scripts/self_sft.sh
Configure the script by modifying:
Set dataset_name to one of the following:
IFEvalOnPolicyDatasetMMLUOnPolicyDatasetCountdownOnPolicyDatasetbash scripts/rl.sh
Configure the script by modifying:
Set dataset_name to one of the following:
IFEvalDatasetMMLUDatasetCountdownDatasetbash scripts/eval.sh
Configure the script by modifying:
model_names: List of model paths to evaluatedataset_name_shorts: Choose from ifeval_verify, mmlu, countdown, wildjailbreak, wildguardtest, mathdataset_split: Dataset split to evaluate on (default: eval)bash scripts/eval_with_judge.sh
Configure the script by modifying:
model_names: List of model paths to evaluatejudge_model_name: Path to the judge model (default: allenai/wildguard)dataset_name_shorts: Choose from wildjailbreak, wildguardtestdataset_split: Dataset split to evaluate on (default: eval)# Uni-modal
python -m simulation.run_single_mode --gain_thresholds "0.9,0.9" --save pdf
# Bi-modal
python -m simulation.run --gain_thresholds "0.9,0.9,0.9" --save pdf
@article{chen2025retaining,
title={Retaining by Doing: The Role of On-Policy Data in Mitigating Forgetting},
author={Chen, Howard and Razin, Noam and Narasimhan, Karthik and Chen, Danqi},
journal={arXiv preprint arXiv:2510.18874},
year={2025}
}
5 commits
Python
93.2%
Shell
6.8%
Repository for paper: Retaining by Doing: The Role of On-Policy Data in Mitigating Forgetting
Download and extract the data to the data/ directory:
The data is organized as follows:
data/
├── sft/ # Expert SFT data
│ ├── ifeval.jsonl
│ ├── mmlu.jsonl
│ └── countdown.jsonl
├── self-sft/ # On-policy (Self-SFT) data per model
│ ├── Llama-3.2-1B-Instruct/
│ ├── Llama-3.1-8B-Instruct/
│ ├── Qwen2.5-1.5B-Instruct/
│ └── Qwen2.5-7B-Instruct/
├── rl/ # RL training data
│ ├── ifeval.jsonl
│ ├── mmlu.jsonl
│ └── countdown.jsonl
└── eval/ # Evaluation data
├── ifeval.jsonl
├── mmlu.jsonl
├── countdown.jsonl
├── math.jsonl
├── wildjailbreak.jsonl
└── wildguardtest.jsonl
model_name_short: Choose from
llama-3.2-1b-instllama-3.1-8b-instqwen-2.5-1.5b-instqwen-2.5-7b-instbash scripts/sft.sh
Configure the script by modifying:
Set dataset_name to one of the following:
IFEvalSFTDatasetMMLUSFTDatasetCountdownSFTDatasetbash scripts/self_sft.sh
Configure the script by modifying:
Set dataset_name to one of the following:
IFEvalOnPolicyDatasetMMLUOnPolicyDatasetCountdownOnPolicyDatasetbash scripts/rl.sh
Configure the script by modifying:
Set dataset_name to one of the following:
IFEvalDatasetMMLUDatasetCountdownDatasetbash scripts/eval.sh
Configure the script by modifying:
model_names: List of model paths to evaluatedataset_name_shorts: Choose from ifeval_verify, mmlu, countdown, wildjailbreak, wildguardtest, mathdataset_split: Dataset split to evaluate on (default: eval)bash scripts/eval_with_judge.sh
Configure the script by modifying:
model_names: List of model paths to evaluatejudge_model_name: Path to the judge model (default: allenai/wildguard)dataset_name_shorts: Choose from wildjailbreak, wildguardtestdataset_split: Dataset split to evaluate on (default: eval)# Uni-modal
python -m simulation.run_single_mode --gain_thresholds "0.9,0.9" --save pdf
# Bi-modal
python -m simulation.run --gain_thresholds "0.9,0.9,0.9" --save pdf
@article{chen2025retaining,
title={Retaining by Doing: The Role of On-Policy Data in Mitigating Forgetting},
author={Chen, Howard and Razin, Noam and Narasimhan, Karthik and Chen, Danqi},
journal={arXiv preprint arXiv:2510.18874},
year={2025}
}
5 commits
Python
93.2%
Shell
6.8%