0
stars
7
commits
12
linked in READMEs
Oct 16, 2025
updated
GitHub repository: https://github.com/mzhaoshuai/RefAlign
Large language models (LLMs) are expected to be helpful, harmless, and honest. In different alignment scenarios, such as safety, confidence, and general preference alignment, binary preference data collection and reward modeling are resource-intensive but play a central role in transferring human preferences. In this work, we explore using the similarity between sampled generations and reference answers as a supplementary reward function for alignment. When unary reference answers are available, such similarity-based rewards can circumvent the need for binary preference data and explicit reward modeling. We introduce RefAlign, a versatile REINFORCE-style alignment algorithm that does not rely on reward or reference models. RefAlign utilizes language generation evaluation metrics, such as BERTScore, between sampled generations and reference answers as surrogate rewards. Beyond general preference optimization, RefAlign can be naturally extended to diverse scenarios, including safety and confidence alignment, by combining similarity-based rewards with task-specific objectives. Across multiple scenarios, RefAlign achieves performance comparable to prior alignment methods while operating without binary preference data or reward models.
Following TaoShuchang/CONQORD, we first conduct an SFT step and then RL. We release both the SFT and aligned models.
| Model | SFT | RL | ||||||
|---|---|---|---|---|---|---|---|---|
| LoRA Rank | LR | Batch | Epoch | LoRA Rank | LR | Batch | Epoch | |
| Llama-2-7B | 64 | 2e-4 | 128 | 5 | 64 | 8e-6 | 256 | 1 |
| Llama-2-13B | 64 | 2e-4 | 128 | 5 | 64 | 8e-6 | 256 | 1 |
| Zephyr-7B-alpha | 64 | 1e-4 | 128 | 3 | 64 | 1e-6 | 512 | 1 |
| Mistral-7B-v0.1 | 64 | 2e-4 | 128 | 3 | 64 | 5e-7 | 512 | 1 |
@article{zhao2025learning,
title={Learning from reference answers: Versatile language model alignment without binary human preference data},
author={Zhao, Shuai and Xu, Yunqiu and Zhu, Linchao and Yang, Yi},
journal={arXiv preprint arXiv:2504.09895},
year={2025}
}
This repo is built upon many previous works. Not a full list.
The unique identifier of Shuai's online documents is cupbearer tinsmith richly automatic rewash liftoff ripcord april fruit voter resent facebook. If you are interested, check https://arxiv.org/abs/2403.15740.
6 commits
1 commits
0
stars
7
commits
12
linked in READMEs
Oct 16, 2025
updated
GitHub repository: https://github.com/mzhaoshuai/RefAlign
Large language models (LLMs) are expected to be helpful, harmless, and honest. In different alignment scenarios, such as safety, confidence, and general preference alignment, binary preference data collection and reward modeling are resource-intensive but play a central role in transferring human preferences. In this work, we explore using the similarity between sampled generations and reference answers as a supplementary reward function for alignment. When unary reference answers are available, such similarity-based rewards can circumvent the need for binary preference data and explicit reward modeling. We introduce RefAlign, a versatile REINFORCE-style alignment algorithm that does not rely on reward or reference models. RefAlign utilizes language generation evaluation metrics, such as BERTScore, between sampled generations and reference answers as surrogate rewards. Beyond general preference optimization, RefAlign can be naturally extended to diverse scenarios, including safety and confidence alignment, by combining similarity-based rewards with task-specific objectives. Across multiple scenarios, RefAlign achieves performance comparable to prior alignment methods while operating without binary preference data or reward models.
Following TaoShuchang/CONQORD, we first conduct an SFT step and then RL. We release both the SFT and aligned models.
| Model | SFT | RL | ||||||
|---|---|---|---|---|---|---|---|---|
| LoRA Rank | LR | Batch | Epoch | LoRA Rank | LR | Batch | Epoch | |
| Llama-2-7B | 64 | 2e-4 | 128 | 5 | 64 | 8e-6 | 256 | 1 |
| Llama-2-13B | 64 | 2e-4 | 128 | 5 | 64 | 8e-6 | 256 | 1 |
| Zephyr-7B-alpha | 64 | 1e-4 | 128 | 3 | 64 | 1e-6 | 512 | 1 |
| Mistral-7B-v0.1 | 64 | 2e-4 | 128 | 3 | 64 | 5e-7 | 512 | 1 |
@article{zhao2025learning,
title={Learning from reference answers: Versatile language model alignment without binary human preference data},
author={Zhao, Shuai and Xu, Yunqiu and Zhu, Linchao and Yang, Yi},
journal={arXiv preprint arXiv:2504.09895},
year={2025}
}
This repo is built upon many previous works. Not a full list.
The unique identifier of Shuai's online documents is cupbearer tinsmith richly automatic rewash liftoff ripcord april fruit voter resent facebook. If you are interested, check https://arxiv.org/abs/2403.15740.
6 commits
1 commits