Official repository of Preference Distillation via Value-Based Reinforcement Learning (NeurIPS 2025 Poster).
This repository provides the implementation of TVKD (Teacher Value-Based Knowledge Distillation).
TVKD training consists of three main stages:
- Train the Teacher Model
- Supervised Fine-Tuning (SFT) for Student Initialization
- Run TVKD
-
Prepare an environment with PyTorch installed according to your GPU setup.
-
Clone this repository and install the dependencies:
git clone <your-repo-url> cd <your-repo> pip install -r requirements.txt
-
The implementation mainly depends on:
As long as your Hugging Face versions are aligned, it should run without issues.
Recommended versions:
torch==2.5.1trl==0.12.0peft==0.13.0
Prepare an initial teacher model (e.g., LLaMA, Mistral).
Since TVKD assumes a DPO-trained teacher, you must first perform DPO training.
Optionally, you may run SFT on the teacher before DPO to obtain a stronger baseline.
In our setup, we follow the paper and use LLaMA-3.1-8B as the teacher.
- SFT dataset:
Deita-10k-V0 - DPO dataset:
DPO-MIX-7K
CUDA_VISIBLE_DEVICES=0,1,2,3 \
ACCELERATE_LOG_LEVEL=info \
DS_SKIP_CUDA_CHECK=1 \
python -m accelerate.commands.launch \
--config_file recipes/accelerate_config/deepspeed_zero3.yaml \
scripts/run_sft.py \
recipes/llama3.2-1b-deita-dpomix/teacher_sft.yamlCUDA_VISIBLE_DEVICES=0,1,2,3 \
ACCELERATE_LOG_LEVEL=info \
DS_SKIP_CUDA_CHECK=1 \
python -m accelerate.commands.launch \
--config_file recipes/accelerate_config/deepspeed_zero3.yaml \
scripts/run_distill_dpo.py \
recipes/llama3.2-1b-deita-dpomix/teacher_dpo.yamlNote: You can adjust hyperparameters via the corresponding YAML files.
The student model is initialized via SFT using the same dataset as the teacher.
CUDA_VISIBLE_DEVICES=0,1,2,3 \
ACCELERATE_LOG_LEVEL=info \
DS_SKIP_CUDA_CHECK=1 \
python -m accelerate.commands.launch \
--config_file recipes/accelerate_config/deepspeed_zero3.yaml \
scripts/run_sft.py \
recipes/llama3.2-1b-deita-dpomix/student_sft_init.yamlFinally, run TVKD training with:
./run/run_tvkd.shIf you use this repository or the TVKD method in your research, please cite our NeurIPS 2025 paper:
@misc{kwon2025preferencedistillationvaluebased,
title={Preference Distillation via Value based Reinforcement Learning},
author={Minchan Kwon and Junwon Ko and Kangil Kim and Junmo Kim},
year={2025},
eprint={2509.16965},
archivePrefix={arXiv},
primaryClass={cs.CL},
url={https://arxiv.org/abs/2509.16965},
}