Views
No views yet
prompt, chosen, and rejected summaries1from transformers import pipeline
2
3summarizer = pipeline("text-generation", model="justthzz/preference-tuned-summarizer")
4text = "Summarize: Your input text here."
5
6summary = summarizer(text, max_length=150, do_sample=False)
7print(summary[0]['generated_text'])pytorch_model.bin - Model weightsconfig.json - Model configurationtokenizer.json, vocab.txt, etc.)| Metric | Base Summary (avg) | DPO Summary (avg) |
|---|---|---|
| ROUGE-1 | 0.0442 | 0.2841 |
| ROUGE-L | 0.0366 | 0.2247 |
| BLEU | 0.0000 | 0.0286 |
1@inproceedings{rafailov2023direct,
2 title = {{Direct Preference Optimization: Your Language Model is Secretly a Reward Model}},
3 author = {Rafael Rafailov and Archit Sharma and Eric Mitchell and Christopher D. Manning and Stefano Ermon and Chelsea Finn},
4 year = 2023,
5 booktitle = {Advances in Neural Information Processing Systems 36: Annual Conference on Neural Information Processing Systems 2023, NeurIPS 2023, New Orleans, LA, USA, December 10 - 16, 2023},
6 url = {http://papers.nips.cc/paper_files/paper/2023/hash/a85b405ed65c6477a4fe8302b5e06ce7-Abstract-Conference.html},
7 editor = {Alice Oh and Tristan Naumann and Amir Globerson and Kate Saenko and Moritz Hardt and Sergey Levine},
8}1@misc{vonwerra2022trl,
2 title = {{TRL: Transformer Reinforcement Learning}},
3 author = {Leandro von Werra and Younes Belkada and Lewis Tunstall and Edward Beeching and Tristan Thrush and Nathan Lambert and Shengyi Huang and Kashif Rasul and Quentin Gallou{\'e}dec},
4 year = 2020,
5 journal = {GitHub repository},
6 publisher = {GitHub},
7 howpublished = {\url{https://github.com/huggingface/trl}}
8}