/ Модель

Характеристики

Контекст
131 072 токена
Параметры
69,5 млрд
Размер весов
141 ГБ
Лицензия
Llama 3.1
Архитектура
llama · dense
Базовая модель
Llama-3.1-70B-Instruct
Опубликована
28 сен 2024

Llama-3.1-Nemotron-70B-Reward-HF

Генерация текстаТекст → текст3 профессии

Модель вознаграждения NVIDIA оценивает качество ответа ассистента в англоязычном диалоге и подходит для ранжирования ответов и настройки LLM с помощью RLHF.

194скачиваний за 30 дней93лайкавеса обновлены13 апр 2025

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Тесты пользователейпока нет

Никто ещё не опубликовал тест этой модели. Соберите бенчмарк из своих задач — результат появится здесь.

  1. Добавьте модель в бенчмарк

    Вместе с другими моделями категории «Текст» — сравнение идёт внутри одной категории.

  2. Опишите свои задачи

    Напишите запросы, при необходимости приложите файлы и эталонные ответы.

  3. Запустите и опубликуйте

    Модели ответят на каждую задачу, судья оценит ответы. Опубликованный результат появится на этой странице.

Публичные оценки

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

В подключённых источниках результатов для этой модели пока нет.

Что умеет модель

Описание составлено по карточке модели и метаданным Hugging Face

Llama-3.1-Nemotron-70B-Reward-HF — разработанная NVIDIA модель вознаграждения на основе Llama 3.1, дообученной на диалогах с помощью сочетания Bradley–Terry и регрессионного моделирования вознаграждений SteerLM. Она оценивает качество последнего ответа ассистента в многоходовом англоязычном диалоге и возвращает одно числовое значение; модель предназначена для сравнения ответов на один и тот же запрос и для настройки языковых моделей с помощью RLHF, в частности REINFORCE.

Модель имеет плотную трансформерную архитектуру LlamaForCausalLM и 69,5 млрд параметров. Контекст модели по метаданным — до 131 072 токенов, однако README указывает ограничение в 4 096 токенов для входного диалога. Веса представлены в формате safetensors для Hugging Face Transformers; для запуска README рекомендует как минимум две 80-ГБ GPU и 150 ГБ свободного места. Модель рассчитана на английский язык.

Среди сильных сторон авторы отмечают высокие результаты на RewardBench, в том числе в категориях чата, безопасности и рассуждений. Оценки имеют смысл при сравнении ответов на один и тот же запрос: напрямую сопоставлять баллы для разных запросов нельзя. README также отмечает, что оценки могут немного отличаться от версии, использованной в NeMo-Aligner. Лицензия — Llama 3.1; применяются условия лицензии Meta Llama 3.1.

Сценарии применения

  • оценка качества финального ответа ассистента в диалоге
  • сравнение двух ответов на один и тот же запрос
  • подготовка сигнала вознаграждения для обучения RLHF
  • настройка языковой модели методом REINFORCE
  • оценка диалоговых ответов по полезности и связности

Ограничения

Баллы корректно сравнивать для ответов на один и тот же запрос, а не между разными запросами; README задаёт лимит входного диалога в 4 096 токенов, несмотря на больший контекст в метаданных. Для запуска требуются значительные вычислительные ресурсы.

Для каких профессий подходит3

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

Model Overview

Description:

Llama-3.1-Nemotron-70B-Reward is a large language model customized using developed by NVIDIA to predict the quality of LLM generated responses. Specifically, it has been trained using a Llama-3.1-70B-Instruct Base on a novel approach combining the strength of Bradley Terry and SteerLM Regression Reward Modelling.

Given a English conversation with multiple turns between user and assistant (of up to 4,096 tokens), it rates the quality of the final assistant turn using a reward score.

For the same prompt, a response with higher reward score has higher quality than another response with a lower reward score, but the same cannot be said when comparing the scores between responses to different prompts.

Llama-3.1-Nemotron-70B-Reward-HF has been converted from Llama-3.1-Nemotron-70B-Reward to support it in the HuggingFace Transformers codebase. Please note that evaluation results might be slightly different from the Llama-3.1-Nemotron-70B-Reward as evaluated in NeMo-Aligner, which the evaluation results below are based on.

Try hosted inference for free at build.nvidia.com - it comes with an OpenAI-compatible API interface and simply signing up gets you 100k free API calls to this model.

Using this reward model for RLHF (specifically, REINFORCE), we were able to tune a Llama-3.1-70B-Instruct model to reach AlpacaEval 2 LC of 57.6, Arena Hard of 85.0 and GPT-4-Turbo MT-Bench of 8.98, which are known to be predictive of LMSys Chatbot Arena Elo This Instruct model is available at Llama-3.1-Nemotron-70B-Instruct as .nemo model and Llama-3.1-Nemotron-70B-Instruct-HF as a HF Transformers model.

As of 1 Oct 2024, this model is #1 on all three automatic alignment benchmarks, edging out strong frontier models such as GPT-4o and Claude 3.5 Sonnet.

See details on our paper at https://arxiv.org/abs/2410.01257 - as a preview, this model can correctly the question How many r in strawberry? without specialized prompting or additional reasoning tokens:

A sweet question!
Let’s count the “R”s in “strawberry”:
1. S
2. T
3. R
4. A
5. W
6. B
7. E
8. R
9. R
10. Y
There are **3 “R”s** in the word “strawberry”.

License

Your use of this model is governed by the NVIDIA Open Model License. Additional Information: Llama 3.1 Community License Agreement. Built with Llama.

RewardBench Primary Dataset LeaderBoard

As of 1 Oct 2024, Llama-3.1-Nemotron-70B-Reward performs best Overall on RewardBench as well as with strong performance in Chat, Safety and Reasoning categories among the models below.

ModelType of Data Used For TrainingOverallChatChat-HardSafetyReasoning
Llama-3.1-Nemotron-70B-RewardPermissive Licensed Data Only (CC-BY-4.0)94.197.585.795.198.1
Skywork-Reward-Gemma-2-27BIncludes GPT4 Generated Data93.895.891.491.996.1
TextEval-Llama3.1-70BNot disclosed93.594.190.193.296.4
Skywork-Critic-Llama-3.1-70BNot fully disclosed93.396.687.993.195.5
SFR-LLaMa-3.1-70B-Judge-rNot fully disclosed92.796.984.891.697.6
Nemotron-4-340B-RewardPermissive Licensed Data Only (CC-BY-4.0)92.095.887.191.593.7
ArmoRM-Llama3-8B-v0.1Includes GPT4 Generated Data90.896.976.892.297.3
Cohere May 2024Not disclosed89.596.471.392.797.7
Llama3-70B-SteerLM-RMPermissive Licensed Data Only (CC-BY-4.0)88.891.380.392.890.7
Google Gemini Pro 1.5Not disclosed88.192.380.687.592.0
GPT-4o-2024-08-06Not disclosed86.796.176.188.186.6
claude-3-5-sonnet-20240620Not disclosed84.296.474.081.684.7
Meta-Llama-3.1-70B-InstructNot fully disclosed84.097.270.282.886.0

To better understand why Llama-3.1-Nemotron-70B-Reward does less well in the Chat-Hard category, we analyze the scores for each consistutent subset under the Chat-Hard category. We find that on categories that uses human annotations as ground truth, Llama-3.1-Nemotron-70B-Reward performs similar to Skywork-Reward-Gemma-2-27B (<= 2.2% difference). On the other hand, when GPT-4 annotations are used as Ground-Truth, Llama-3.1-Nemotron-70B-Reward trails substantially behind Skywork-Reward-Gemma-2-27B (by 10.8 to 19.2%). This suggests that Skywork-Reward-Gemma-2-27B can better modelling GPT-4 preferences (but not human-annotated preferences), likely contributed by the inclusion of GPT-4 annotated training data used to train it found in the OffSetBias dataset as part of the Skywork-Reward-Preference-80k.

ModelType of Data Used For TrainingChat-HardLLMBar-Adversarial-ManualLLMBar-Adversarial-NeighbourLLMBar-NaturalLLMBar-Adversarial-GPTInstLLMBar-Adversarial-GPTOutMT-Bench-Hard
Human as Ground TruthHuman as Ground TruthHuman as Ground TruthGPT-4 as Ground TruthGPT-4 as Ground TruthGPT-4 as Ground Truth
Llama-3.1-Nemotron-70B-RewardPermissive Licensed Data Only (CC-BY-4.0)85.776.188.895.087.072.375.7
Skywork-Reward-Gemma-2-27BIncludes GPT4 Generated Data91.478.389.696.097.891.586.5

Usage:

You can use the model using HuggingFace Transformers library with 2 or more 80GB GPUs (NVIDIA Ampere or newer) with at least 150GB of free disk space to accomodate the download.

This code has been tested on Transformers v4.44.0, torch v2.4.0 and 2 A100 80GB GPUs, but any setup that supports meta-llama/Llama-3.1-70B-Instruct should support this model as well. If you run into problems, you can consider doing pip install -U transformers.

import torch
from transformers import AutoModelForCausalLM, AutoTokenizer

model_name = "nvidia/Llama-3.1-Nemotron-70B-Reward-HF"

model = AutoModelForCausalLM.from_pretrained(model_name, torch_dtype=torch.bfloat16, device_map="auto")
tokenizer = AutoTokenizer.from_pretrained(model_name)

prompt = "What is 1+1?"
good_response = "1+1=2"
bad_response = "1+1=3"

for response in [good_response, bad_response]:
    messages = [{'role': "user", "content": prompt}, {'role': "assistant", "content": response}]
    tokenized_message = tokenizer.apply_chat_template(messages, tokenize=True, add_generation_prompt=False, return_tensors="pt", return_dict=True)
    response_token_ids = model.generate(tokenized_message['input_ids'].cuda(),attention_mask=tokenized_message['attention_mask'].cuda(),  max_new_tokens=1, return_dict_in_generate=True, output_scores=True)
    reward = response_token_ids['scores'][0][0][0].item()
    print(reward)

# reward for good_response = -3.28125
# reward for bad_response = -4.28125

Contact

E-Mail: Zhilin Wang

Citation

If you find this model useful, please cite the following works

@misc{wang2024helpsteer2preferencecomplementingratingspreferences,
      title={HelpSteer2-Preference: Complementing Ratings with Preferences}, 
      author={Zhilin Wang and Alexander Bukharin and Olivier Delalleau and Daniel Egert and Gerald Shen and Jiaqi Zeng and Oleksii Kuchaiev and Yi Dong},
      year={2024},
      eprint={2410.01257},
      archivePrefix={arXiv},
      primaryClass={cs.LG},
      url={https://arxiv.org/abs/2410.01257}, 
}

@misc{wang2024helpsteer2,
      title={HelpSteer2: Open-source dataset for training top-performing reward models}, 
      author={Zhilin Wang and Yi Dong and Olivier Delalleau and Jiaqi Zeng and Gerald Shen and Daniel Egert and Jimmy J. Zhang and Makesh Narsimhan Sreedhar and Oleksii Kuchaiev},
      year={2024},
      eprint={2406.08673},
      archivePrefix={arXiv},
      primaryClass={id='cs.CL' full_name='Computation and Language' is_active=True alt_name='cmp-lg' in_archive='cs' is_general=False description='Covers natural language processing. Roughly includes material in ACM Subject Class I.2.7. Note that work on artificial languages (programming languages, logics, formal systems) that does not explicitly address natural-language issues broadly construed (natural-language processing, computational linguistics, speech, text retrieval, etc.) is not appropriate for this area.'}
}

References(s):

Model Architecture:

Architecture Type: Transformer Network Architecture: Llama 3.1

Input:

Input Type(s): Text Input Format: String Input Parameters: NA Other Properties Related to Input: Provided text must be within 4096 tokens

Output:

Output Type(s): Float Output Format: One Single Float Output Parameters: NA Other Properties Related to Output: NA

Software Integration:

Supported Hardware Microarchitecture Compatibility:

  • NVIDIA Ampere
  • NVIDIA Hopper
  • NVIDIA Turing Supported Operating System(s): Linux

Model Version:

v1.0

Training & Evaluation:

Datasets:

Data Collection Method by dataset

  • [Hybrid: Human, Synthetic]

Labeling Method by dataset

  • [Human]

Link:

Properties (Quantity, Dataset Descriptions, Sensor(s)):

  • Built to make more models more aligned with human preference - specifically more helpful, factually-correct, coherent, and customizable based on complexity and verbosity.

Inference:

Engine: Triton Test Hardware: H100, A100 80GB, A100 40GB

Ethical Considerations:

NVIDIA believes Trustworthy AI is a shared responsibility and we have established policies and practices to enable development for a wide array of AI applications. When downloaded or used in accordance with our terms of service, developers should work with their supporting model team to ensure this model meets requirements for the relevant industry and use case and addresses unforeseen product misuse. For more detailed information on ethical considerations for this model, please see the Model Card++ Explainability, Bias, Safety & Security, and Privacy Subcards. Please report security vulnerabilities or NVIDIA AI Concerns here.

Please report security vulnerabilities or NVIDIA AI Concerns here.

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

vLLM

Можно запустить

Подбираем GPU…

Класс архитектуры
LlamaForCausalLM
Ревизия весов
5e30252

0 моделей