hendrydong/preference_700K
Viewer • Updated • 700k • 579 • 17
How to use yyqoni/Phi-3-mini-4k-instruct-token-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-token-rm-700k", trust_remote_code=True) # Load model directly
from transformers import AutoTokenizer, AutoModelForSequenceClassification
tokenizer = AutoTokenizer.from_pretrained("yyqoni/Phi-3-mini-4k-instruct-token-rm-700k", trust_remote_code=True)
model = AutoModelForSequenceClassification.from_pretrained("yyqoni/Phi-3-mini-4k-instruct-token-rm-700k", trust_remote_code=True)This is the token-wise reward model introduced in the preprint Segmenting Text and Learning Their Rewards for Improved RLHF in Language Models (https://arxiv.org/abs/2501.02790). For more details, please visit our repository at https://github.com/yinyueqin/DenseRewardRLHF-PPO.
Base model
microsoft/Phi-3-mini-4k-instruct