/ Модель

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

Контекст
32 768 токенов
Параметры
7,1 млрд
Размер весов
14,2 ГБ
Лицензия
Apache 2.0
Архитектура
mistral · dense
Опубликована
2 апр 2024

Eurus-RM-7b

Классификация текстаТекст → label4 профессии

Eurus-RM-7B — reward-модель на базе Mistral для оценки и ранжирования ответов LLM, особенно в задачах с рассуждениями.

17скачиваний за 30 дней0лайковвеса обновлены2 апр 2024

Бенчмарки

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

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

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

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

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

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

Eurus-RM-7B — модель вознаграждения на 7,1 млрд параметров, разработанная авторами семейства Eurus. Она основана на архитектуре Mistral и обучена на смеси UltraInteract, UltraFeedback и UltraSafety со специально разработанной целью reward modeling, ориентированной на рассуждения. Модель предназначена для оценки ответов языковых моделей и их ранжирования, в том числе для выбора более сильного ответа в задачах со сложными рассуждениями.

Eurus-RM-7B можно применять для reranking нескольких ответов LLM, чтобы улучшать качество рассуждений, а также для оценки качества и безопасности ответов. Контекст модели — до 32 768 токенов; веса доступны в формате safetensors. По карточке авторов, модель показывает сильные результаты среди reward-моделей размера 7B и в отдельных задачах сопоставима с более крупными системами. Лицензия — Apache-2.0.

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

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

Ограничения

Карточка не приводит независимых сравнительных оценок или подробных ограничений применимости; заявленные преимущества основаны на результатах авторов. Для ранжирования модель выдаёт оценку, поэтому её следует использовать как компонент конвейера, а не как самостоятельную генерирующую модель.

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

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

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

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

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

Открыть на Hugging Face

Links

Introduction

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


def test(model_path):
    dataset = [ # cases in webgpt; we use the same template as Mistral-Instruct-v0.2
                    {"chosen":"[INST] \"Who orders martinis \"\"shaken, not stirred\"\"?\" [\INST] 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":"[INST] \"Who orders martinis \"\"shaken, not stirred\"\"?\" [\INST] 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":"[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)

    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 1: 0.14470714330673218
# Output 2: 0.7317184507846832

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},
      primaryClass={cs.CL}
}

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

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

GPU в ailist

Универсальный рантайм · text-classification

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

Подбираем GPU…

Класс архитектуры
EurusRewardModel
Ревизия весов
fee4304

0 моделей