File size: 3,092 Bytes
cf99201 b4adefb cf99201 b4adefb cf99201 3a3f99d cf99201 3a3f99d cf99201 3a3f99d cf99201 e7c6e9c afab71f cf99201 3a3f99d afab71f 3a3f99d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 |
---
base_model: meta-llama/Meta-Llama-3-8B-Instruct
library_name: transformers
datasets:
- openbmb/UltraFeedback
tags:
- alignment-handbook
- llama
---
We propose a novel strategy to enhance off-policy preference optimization by simulating on-policy learning with off-policy preference data. Our Weighted Preference Optimization (WPO) method adapts off-policy data to resemble on-policy data more closely by reweighting preference pairs according to their probability under the current policy. This method not only addresses the distributional gap problem but also enhances the optimization process without incurring additional costs. Refer to our [preprint](https://arxiv.org/abs/2406.11827) and [repo](https://github.com/wzhouad/WPO) for details.
## Model Description
### Data
Llama3-Instruct-8B model finetuned by hybrid WPO, utilizing three types of data:
1. Ultrafeedback dataset.
2. On-policy sampled Llama outputs based on Ultrafeedback prompts.
3. GPT-4-turbo outputs based on Ultrafeedback prompts.
In comparison to the preference data construction method in our paper, it employs a method:
1. Uses the response with the minimum score as the rejected one.
2. When multiple outputs have the same highest score, the one with the shortest length is selected.
3. When multiple outputs have the same minimum score, the one with the smallest length difference from the chosen output is selected.
### [AlpacaEval Eval Results](https://tatsu-lab.github.io/alpaca_eval/)
| Model | LC | WR | Avg. Length |
|-------------------------------------------|:------------:|:--------:|:-----------:|
|[Llama3-Instruct-8B-WPO-HB-v2](https://huggingface.co/wzhouad/Llama3-Instruct-8B-WPO-HB-v2) |53.4 |57.3 | 2472
### Link to Other WPO Models
Check our [WPO Collection](https://huggingface.co/collections/wzhouad/wpo-66a04e4f552c0be180da2931).
### Training Hyperparameters
The following hyperparameters were used during training:
- learning_rate: 1e-06
- beta: 0.01
- per_device_train_batch_size: 2
- gradient_accumulation_steps: 8
- seed: 1
- num_devices: 8
- optim: adamw_torch
- lr_scheduler_type: cosine
- lr_scheduler_warmup_ratio: 0.1
- num_train_epochs: 2.0
- max_length: 2048
- max_prompt_length: 1800
## License
This model is licensed under the Zoom software license and is permitted for use only for noncommercial, educational, or academic research purposes.
## Citation
WPO:
```
@article{zhou2024wpo,
title={WPO: Enhancing RLHF with Weighted Preference Optimization},
author={Zhou, Wenxuan and Agrawal, Ravi and Zhang, Shujian and Indurthi, Sathish Reddy and Zhao, Sanqiang and Song, Kaiqiang and Xu, Silei and Zhu, Chenguang},
journal={arXiv preprint arXiv:2406.11827},
year={2024}
}
```
Ultrafeedback:
```
@article{cui2023ultrafeedback,
title={{UltraFeedback}: Boosting language models with high-quality feedback},
author={Cui, Ganqu and Yuan, Lifan and Ding, Ning and Yao, Guanming and Zhu, Wei and Ni, Yuan and Xie, Guotong and Liu, Zhiyuan and Sun, Maosong},
journal={arXiv preprint arXiv:2310.01377},
year={2023}
}
``` |