openbmb / UltraRM-13b

huggingface.co
Total runs: 416
24-hour runs: 0
7-day runs: 0
30-day runs: -75
Model's Last Updated: October 14 2023

Introduction of UltraRM-13b

Model Details of UltraRM-13b

News

  • [2023/09/26]: UltraRM unleashes the power of UltraLM-13B-v2.0 and UltraLM-13B ! A simple best-of-16 sampling achieves 92.30% (UltraLM2, 🥇 in 13B results) and 91.54% (UltraLM, 🥇 in LLaMA-1 results) win rates against text-davinci-003 on AlpacaEval benchmark!
  • [2023/09/26]: We release the UltraFeedback dataset, along with UltraFeedback-powered reward model UltraRM and critique model UltraCM ! Both built new SOTAs over open-source models!

Links

UltraRM

We train and release a reward model UltraRM based on UltraFeedback to further facilitate alignment research. UltraRM is initialized by LLaMA2-13B.

Specifically, we train two versions of reward models, where UltraRM-UF is merely fine-tuned on UltraFeedback and UltraRM is fine-tuned on a mixture of UltraFeedback and an equal-size sample from three open-source datasets including Anthropic HH-RLHF , Standford SHP , and Summarization .

Reward Modeling

On four public preference test sets, our UltraRM achieves SOTA over other open-source reward models.

Usage
from transformers import PreTrainedModel, LlamaConfig, LlamaModel, LlamaTokenizer
import torch.nn as nn
import torch
from typing import Optional, List

class LlamaRewardModel(PreTrainedModel):
    config_class = LlamaConfig
    def __init__(self, config):
        super().__init__(config)
        self.model = LlamaModel(config)
        self.regression_head = nn.Linear(self.config.hidden_size, 1, bias=False)

    def forward( # args are the same as LlamaForCausalLM
        self,
        input_ids: torch.LongTensor = None,
        attention_mask: Optional[torch.Tensor] = None,
        position_ids: Optional[torch.LongTensor] = None,
        past_key_values: Optional[List[torch.FloatTensor]] = None,
        inputs_embeds: Optional[torch.FloatTensor] = None,
        labels: Optional[torch.LongTensor] = None,
        use_cache: Optional[bool] = None,
        output_attentions: Optional[bool] = None,
        output_hidden_states: Optional[bool] = None,
        return_dict: Optional[bool] = None,
    ):

        transformer_outputs = self.model(
                                input_ids,
                                attention_mask=attention_mask,
                                position_ids=position_ids,
                                past_key_values=past_key_values,
                                inputs_embeds=inputs_embeds,                               
                            )

        hidden_states = transformer_outputs[0]
        rewards = self.regression_head(hidden_states).squeeze(-1)
        
        ends = attention_mask.cumsum(dim=1).argmax(dim=1).view(-1,1)
        rewards = torch.gather(rewards, 1, ends)
        
        return rewards

ultrarm_template = """Human: {instruction}

Assistant: {completion}"""

dataset = [ # cases in webgpt
  {"chosen":"Human: \"Who orders martinis \"\"shaken, not stirred\"\"?\"\nAssistant: Sean Connery's character, fictional British Secret Service agent James Bond, in the movie Goldfinger, stated that he preferred his martini to be \"shaken, not stirred\". [1] Some believe that Bond ordered his martini shaken because of the vodka it contained, as vodka was, for the most part, refined from potatoes (cheaper brands) which made the vodka oily. To disperse the oil, Bond ordered his martinis shaken. [2]","rejected":"Human: \"Who orders martinis \"\"shaken, not stirred\"\"?\"\nAssistant: Fleming's fictional British Secret Service agent James Bond orders his martini cocktail shaken, not stirred [1]. Bond's preferences for his martini are carried over to the films, where his orders are seen in both the 1961 film Dr. No and the 2006 film Casino Royale [1, 2]. In both films, Bond's subordinates copy his order, telling the bartender to keep the fruit with their drinks [2]. However, in the 2006 film, Bond appears irritated when the bartender asks if he would like his drink shaken or stirred [2]."},
  {"chosen":"Human: Sural relates to which part of the body?\nAssistant: 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":"Human: Sural relates to which part of the body?\nAssistant: 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 = LlamaTokenizer.from_pretrained("/data/UltraRM-13b")
model = LlamaRewardModel.from_pretrained("/data/UltraRM-13b")

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)

# Output 1: 2.4158712085336447
# Output 2: 0.1896953582763672
Citation
@misc{cui2023ultrafeedback,
      title={UltraFeedback: Boosting Language Models with High-quality Feedback}, 
      author={Ganqu Cui and Lifan Yuan and Ning Ding and Guanming Yao and Wei Zhu and Yuan Ni and Guotong Xie and Zhiyuan Liu and Maosong Sun},
      year={2023},
      eprint={2310.01377},
      archivePrefix={arXiv},
      primaryClass={cs.CL}
}

Runs of openbmb UltraRM-13b on huggingface.co

416
Total runs
0
24-hour runs
0
3-day runs
0
7-day runs
-75
30-day runs

More Information About UltraRM-13b huggingface.co Model

More UltraRM-13b license Visit here:

https://choosealicense.com/licenses/mit

UltraRM-13b huggingface.co

UltraRM-13b huggingface.co is an AI model on huggingface.co that provides UltraRM-13b's model effect (), which can be used instantly with this openbmb UltraRM-13b model. huggingface.co supports a free trial of the UltraRM-13b model, and also provides paid use of the UltraRM-13b. Support call UltraRM-13b model through api, including Node.js, Python, http.

UltraRM-13b huggingface.co Url

https://huggingface.co/openbmb/UltraRM-13b

openbmb UltraRM-13b online free

UltraRM-13b huggingface.co is an online trial and call api platform, which integrates UltraRM-13b's modeling effects, including api services, and provides a free online trial of UltraRM-13b, you can try UltraRM-13b online for free by clicking the link below.

openbmb UltraRM-13b online free url in huggingface.co:

https://huggingface.co/openbmb/UltraRM-13b

UltraRM-13b install

UltraRM-13b is an open source model from GitHub that offers a free installation service, and any user can find UltraRM-13b on GitHub to install. At the same time, huggingface.co provides the effect of UltraRM-13b install, users can directly use UltraRM-13b installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

UltraRM-13b install url in huggingface.co:

https://huggingface.co/openbmb/UltraRM-13b

Url of UltraRM-13b

UltraRM-13b huggingface.co Url

Provider of UltraRM-13b huggingface.co

openbmb
ORGANIZATIONS

Other API from openbmb

huggingface.co

Total runs: 200.2K
Run Growth: 91.4K
Growth Rate: 45.63%
Updated:October 05 2025
huggingface.co

Total runs: 134.8K
Run Growth: -3.0K
Growth Rate: -2.19%
Updated:March 10 2026
huggingface.co

Total runs: 117.8K
Run Growth: 4.9K
Growth Rate: 4.17%
Updated:September 15 2025
huggingface.co

Total runs: 112.2K
Run Growth: 89.6K
Growth Rate: 79.87%
Updated:May 10 2026
huggingface.co

Total runs: 106.9K
Run Growth: -45.2K
Growth Rate: -42.32%
Updated:June 13 2025
huggingface.co

Total runs: 25.5K
Run Growth: 411
Growth Rate: 1.61%
Updated:October 24 2025
huggingface.co

Total runs: 20.0K
Run Growth: 1.8K
Growth Rate: 8.78%
Updated:October 24 2025
huggingface.co

Total runs: 19.9K
Run Growth: 406
Growth Rate: 2.04%
Updated:January 15 2025
huggingface.co

Total runs: 11.5K
Run Growth: 10.4K
Growth Rate: 90.57%
Updated:May 07 2026
huggingface.co

Total runs: 7.7K
Run Growth: -4.1K
Growth Rate: -52.99%
Updated:February 27 2025
huggingface.co

Total runs: 6.5K
Run Growth: 523
Growth Rate: 8.06%
Updated:January 14 2026
huggingface.co

Total runs: 5.5K
Run Growth: -4.3K
Growth Rate: -78.07%
Updated:June 02 2023
huggingface.co

Total runs: 5.4K
Run Growth: 5.4K
Growth Rate: 99.14%
Updated:June 10 2025
huggingface.co

Total runs: 5.2K
Run Growth: 3.7K
Growth Rate: 70.38%
Updated:October 20 2025
huggingface.co

Total runs: 4.8K
Run Growth: 2.7K
Growth Rate: 56.92%
Updated:November 04 2024
huggingface.co

Total runs: 2.5K
Run Growth: -582
Growth Rate: -23.14%
Updated:September 09 2026
huggingface.co

Total runs: 1.4K
Run Growth: 79
Growth Rate: 5.80%
Updated:January 15 2025
huggingface.co

Total runs: 1.0K
Run Growth: 153
Growth Rate: 14.93%
Updated:September 19 2025
huggingface.co

Total runs: 891
Run Growth: 76
Growth Rate: 8.53%
Updated:June 27 2023
huggingface.co

Total runs: 847
Run Growth: 48
Growth Rate: 5.67%
Updated:August 24 2023
huggingface.co

Total runs: 508
Run Growth: -406
Growth Rate: -79.14%
Updated:May 14 2024
huggingface.co

Total runs: 436
Run Growth: 372
Growth Rate: 85.32%
Updated:February 12 2026
huggingface.co

Total runs: 387
Run Growth: 202
Growth Rate: 52.20%
Updated:June 11 2025
huggingface.co

Total runs: 376
Run Growth: 203
Growth Rate: 53.99%
Updated:February 21 2024
huggingface.co

Total runs: 334
Run Growth: 158
Growth Rate: 47.31%
Updated:February 21 2024
huggingface.co

Total runs: 301
Run Growth: 125
Growth Rate: 41.53%
Updated:February 21 2024