hendrydong/preference_700K
Viewer • Updated • 700k • 467 • 17
How to use yyqoni/Phi-3-mini-4k-instruct-segment-rm-700k with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-classification", model="yyqoni/Phi-3-mini-4k-instruct-segment-rm-700k", trust_remote_code=True) # Load model directly
from transformers import AutoTokenizer, AutoModelForSequenceClassification
tokenizer = AutoTokenizer.from_pretrained("yyqoni/Phi-3-mini-4k-instruct-segment-rm-700k", trust_remote_code=True)
model = AutoModelForSequenceClassification.from_pretrained("yyqoni/Phi-3-mini-4k-instruct-segment-rm-700k", trust_remote_code=True)The segment reward model assigns rewards to semantically meaningful text segments, segmented dynamically with an entropy-based threshold. It is trained on binary preference labels from human feedback, optimizing a Bradley-Terry loss function that aggregates segment rewards using the average function.
The phi-instruct-segment model is fine-tuned from microsoft/Phi-3-mini-4k-instruct on the hendrydong/preference_700K dataset.
If you find this model or our research useful, please consider citing our paper:
@misc{yin2025segmentingtextlearningrewards,
title={Segmenting Text and Learning Their Rewards for Improved RLHF in Language Model},
author={Yueqin Yin and Shentao Yang and Yujia Xie and Ziyi Yang and Yuting Sun and Hany Awadalla and Weizhu Chen and Mingyuan Zhou},
year={2025},
eprint={2501.02790},
archivePrefix={arXiv},
primaryClass={cs.CL},
url={https://arxiv.org/abs/2501.02790},
}
Base model
microsoft/Phi-3-mini-4k-instruct