Eurus-RM-7B is trained on a mixture of
UltraInteract
,
UltraFeedback
, and
UltraSafety
, with a specifically designed reward modeling objective for reasoning to directly increase.
EURUS-RM-7B stands out as the best 7B RM overall and achieves similar or better performance than much larger baselines. Particularly, it outperforms GPT-4 in certain tasks.
Our training objective is beneficial in improving RM performance on hard problems and reasoning.
ULTRAINTERACT is compatible with other datasets like UltraFeedback and UltraSafety, and mixing these datasets can balance different RM abilities.
EURUS-RM-7B improves LLMs’ reasoning performance by a large margin through reranking.
Usage
from transformers import AutoTokenizer, AutoModel
import torch
deftest(model_path):
dataset = [ # cases in webgpt; we use the same template as Mistral-Instruct-v0.2
{
"chosen": "[INST] Sural relates to which part of the body? [/INST] The sural region is the muscular swelling of the back of the leg below the knee, formed chiefly by the bellies of the gastrocnemius and soleus muscles [1,2].",
"rejected": "[INST] Sural relates to which part of the body? [/INST] The Sural nerve runs down the side of the leg near the small saphenous vein, then passes forward below the lateral malleolus and continues on the outside of the foot as the lateral dorsal cutaneous nerve, which then communicates with the intermediate dorsal cutaneous nerve, which branches off to the side of the foot. [1]",
}
]
tokenizer = AutoTokenizer.from_pretrained(model_path)
model = AutoModel.from_pretrained(model_path, trust_remote_code=True)
with torch.no_grad():
for example in dataset:
inputs = tokenizer(example["chosen"], return_tensors="pt")
chosen_reward = model(**inputs).item()
inputs = tokenizer(example["rejected"], return_tensors="pt")
rejected_reward = model(**inputs).item()
print(chosen_reward - rejected_reward)
test("openbmb/Eurus-RM-7b")
# Output: 47.4404296875
Evaluation
Eurus-RM-7B stands out as the best 7B RM overall and achieves similar or better performance than much larger baselines. Particularly, it outperforms GPT-4 in certain tasks.
Our training objective is beneficial in improving RM performance on hard problems and reasoning.
ULTRAINTERACT is compatible with other datasets like UltraFeedback and UltraSafety, and mixing these datasets can balance different RM abilities.
Eurus-RM-7B improves LLMs’ reasoning performance by a large margin through reranking.
Citation
@misc{yuan2024advancing,
title={Advancing LLM Reasoning Generalists with Preference Trees},
author={Lifan Yuan and Ganqu Cui and Hanbin Wang and Ning Ding and Xingyao Wang and Jia Deng and Boji Shan and Huimin Chen and Ruobing Xie and Yankai Lin and Zhenghao Liu and Bowen Zhou and Hao Peng and Zhiyuan Liu and Maosong Sun},
year={2024},
eprint={2404.02078},
archivePrefix={arXiv},
}
Runs of openbmb Eurus-RM-7b on huggingface.co
733
Total runs
0
24-hour runs
14
3-day runs
83
7-day runs
388
30-day runs
More Information About Eurus-RM-7b huggingface.co Model
Eurus-RM-7b huggingface.co is an AI model on huggingface.co that provides Eurus-RM-7b's model effect (), which can be used instantly with this openbmb Eurus-RM-7b model. huggingface.co supports a free trial of the Eurus-RM-7b model, and also provides paid use of the Eurus-RM-7b. Support call Eurus-RM-7b model through api, including Node.js, Python, http.
Eurus-RM-7b huggingface.co is an online trial and call api platform, which integrates Eurus-RM-7b's modeling effects, including api services, and provides a free online trial of Eurus-RM-7b, you can try Eurus-RM-7b online for free by clicking the link below.
openbmb Eurus-RM-7b online free url in huggingface.co:
Eurus-RM-7b is an open source model from GitHub that offers a free installation service, and any user can find Eurus-RM-7b on GitHub to install. At the same time, huggingface.co provides the effect of Eurus-RM-7b install, users can directly use Eurus-RM-7b installed effect in huggingface.co for debugging and trial. It also supports api for free installation.