git clone https://github.com/AntResearchNLP/LPC.git
cd LPC
pip install -r requirements.txtPlease download UltraFeedback from huggingface. Then modify DATA_PATH in scripts/train_lpc.sh.
sh scripts/train_lpc.sh We use Language Model Evaluation Harness for model evaluation.
@article{gong2025latent,
title={Latent preference coding: Aligning large language models via discrete latent codes},
author={Gong, Zhuocheng and Guan, Jian and Wu, Wei and Zhang, Huishuai and Zhao, Dongyan},
journal={arXiv preprint arXiv:2505.04993},
year={2025}
}