Downloads · 30 days
10
13% of all-time downloads
justthzz/preference-tuned-summarizer
preference-tuned-summarizer is a text generation model from justthzz. Use it when you need the model to write or continue text. It is set up for transformers.
This repository hosts a lightweight text summarization model fine-tuned from DistilGPT2 using Direct Preference Optimization (DPO). The model was trained on preference-labeled data to generate summaries that align bet…
Downloads · 30 days
10
13% of all-time downloads
All-time downloads
77
Public
Parameters
81.9M
2.2 GB on disk
Likes
0
Public
Click a slice to open those files.
.pt655 MB · 50%
From the Hugging Face model README
This repository hosts a lightweight text summarization model fine-tuned from DistilGPT2 using Direct Preference Optimization (DPO). The model was trained on preference-labeled data to generate summaries that align better with human preferences compared to traditional supervised fine-tuning.
prompt, chosen, and rejected summariesYou can load and use the model easily with the Hugging Face Transformers library:
from transformers import pipeline
summarizer = pipeline("text-generation", model="justthzz/preference-tuned-summarizer")
text = "Summarize: Your input text here."
summary = summarizer(text, max_length=150, do_sample=False)
print(summary[0]['generated_text'])
pytorch_model.bin - Model weightsconfig.json - Model configurationtokenizer.json, vocab.txt, etc.)Direct Preference Optimization is a fine-tuning technique that leverages preference-labeled datasets to directly optimize a model’s output preferences. This method improves alignment with human judgments beyond typical supervised fine-tuning.
| Metric | Base Summary (avg) | DPO Summary (avg) |
|---|---|---|
| ROUGE-1 | 0.0442 | 0.2841 |
| ROUGE-L | 0.0366 | 0.2247 |
| BLEU | 0.0000 | 0.0286 |
Cite DPO as:
@inproceedings{rafailov2023direct,
title = {{Direct Preference Optimization: Your Language Model is Secretly a Reward Model}},
author = {Rafael Rafailov and Archit Sharma and Eric Mitchell and Christopher D. Manning and Stefano Ermon and Chelsea Finn},
year = 2023,
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},
url = {http://papers.nips.cc/paper_files/paper/2023/hash/a85b405ed65c6477a4fe8302b5e06ce7-Abstract-Conference.html},
editor = {Alice Oh and Tristan Naumann and Amir Globerson and Kate Saenko and Moritz Hardt and Sergey Levine},
}
Cite TRL as:
@misc{vonwerra2022trl,
title = {{TRL: Transformer Reinforcement Learning}},
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},
year = 2020,
journal = {GitHub repository},
publisher = {GitHub},
howpublished = {\url{https://github.com/huggingface/trl}}
}