/ Модель

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

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

Snorkel-Mistral-PairRM-DPO

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

Чат-модель Snorkel AI на базе Mistral, итеративно выровненная с помощью PairRM и DPO для генерации ответов.

104скачиваний за 30 дней108лайковвеса обновлены13 мая 2024

Бенчмарки

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Snorkel AI разработала Snorkel-Mistral-PairRM-DPO — чат-модель на архитектуре Mistral с 7,1 млрд параметров и контекстом до 32 768 токенов. Модель предназначена для диалогов и генерации ответов по запросу; использует формат промптов Mistral.

Модель создана методом итеративного Direct Preference Optimization (DPO): для промптов из подмножества UltraFeedback генерировали варианты ответов, ранжировали их с помощью PairRM и дообучали модель на предпочтительных и отклонённых ответах. Цикл повторили три раза, используя результат каждого этапа как основу следующего. Веса доступны в формате PyTorch; лицензия — Apache-2.0.

Карточка позиционирует модель для чата, но не приводит результатов оценки качества и подробного описания языковой поддержки. Указанный в README тестовый inference endpoint предназначен для проб, а не для постоянного производственного использования.

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

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

Ограничения

В карточке нет результатов количественной оценки и подробного описания языковой поддержки. Inference endpoint Hugging Face заявлен для первоначальных проб, а не для постоянного производственного использования.

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

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

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

Также подходит для

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

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

Открыть на Hugging Face

Read our release blog here: Snorkel AI Blog

You can try our models on the Together AI playground: https://api.together.xyz/playground/chat/snorkelai/Snorkel-Mistral-PairRM-DPO. This model is optimized for chat purposes. Have fun!

Our model is also available through Together AI API with the following model API string: snorkelai/Snorkel-Mistral-PairRM-DPO. Special thanks to the Together AI team for adding our model to their endpoints.

We also provide an HF inference endpoint for everyone to test the model. It may initially take a few minutes to activate, but will eventually operate at the standard speed of HF's 7B model text inference endpoint. The speed of inference depends on HF endpoint performance and is not related to Snorkel offerings. This endpoint is designed for initial trials, not for ongoing production use.

import requests

API_URL = "https://t1q6ks6fusyg1qq7.us-east-1.aws.endpoints.huggingface.cloud"
headers = {
	"Accept" : "application/json",
	"Content-Type": "application/json" 
}

def query(payload):
	response = requests.post(API_URL, headers=headers, json=payload)
	return response.json()

output = query({
	"inputs": "[INST] Recommend me some Hollywood movies [/INST]",
	"parameters": {}
})

Dataset:

Training dataset: snorkelai/Snorkel-Mistral-PairRM-DPO-Dataset

We utilize ONLY the prompts from UltraFeedback; no external LLM responses used.

Methodology:

  1. Generate five response variations for each prompt from a subset of 20,000 using the LLM - to start, we used Mistral-7B-Instruct-v0.2.
  2. Apply PairRM for response reranking.
  3. Update the LLM by applying Direct Preference Optimization (DPO) on the top (chosen) and bottom (rejected) responses.
  4. Use this LLM as the base model for the next iteration, repeating three times in total.

This overview provides a high-level summary of our approach. We plan to release more detailed results and findings in the coming weeks on the Snorkel blog.

The prompt format follows the Mistral model:

[INST] {prompt} [/INST]

Training recipe:

  • The provided data is formatted to be compatible with the Hugging Face's Zephyr recipe. We executed the n_th DPO iteration using the "train/test_iteration_{n}".

Key Premises:

  • Specialization Requirement: For most enterprise use cases, using LLMs "off-the-shelf" falls short of production quality, necessitating additional fine-tuning and alignment.
  • Ease of Model Building: Creating ranking/scoring/classification models is simpler than developing high-quality, manually annotated datasets for long-form responses.
  • Alignment Recipe: Using smaller but specialized teacher models (reward models) can incrementally align LLMs towards specific axes.

Applications:

Unlike our customers, who have very specific use cases to align LLMs to, the AlpacaEval 2.0 leaderboard measures the ability of LLMS to follow user instructions. With this demonstration, we focus on the general approach to alignment. Thus, we use a general-purpose reward model - the performant PairRM model. We use the Mistral-7B-Instruct-v0.2 model as our base LLM.

For interest in building your specialized internal reward models that reflect your enterprises' needs, please contact the Snorkel AI team or consider attending our Enterprise LLM Summit: Building GenAI with Your Data on January 25, 2024 to learn more about "Programmatically scaling human preferences and alignment in GenAI".

Result:

On Alpaca-Eval 2.0:

After applying the above methodology:

  • This model scored 30.22 - ranked 3rd and the highest for an open-source base model at the time of publication.
  • When post-processing the model outputs with PairRM-best-of-16, which involved generating 16 responses and selecting the highest-scoring response by PairRM, we scored 34.86 - ranked 2nd. The best model on the leaderboard is "gpt-4-turbo", which is also the judge of optimal responses.

We recognize that the Alpaca-Eval 2.0 benchmark does not entirely capture the full range of capabilities and performances of LLMs. However, in our current work, where the goal is to align with general "human preferences," Alpaca-Eval 2.0 serves as a suitable and representative benchmark. Moving forward, we anticipate further contributions from the community regarding new alignment axes, and conduct evaluations using other appropriate benchmarks.

The Alpaca-Eval 2.0 evaluator, "gpt-4-turbo," exhibits a bias towards longer responses. This tendency might also be present in our chosen reward model, resulting in our model producing lengthier responses after DPO iterations, which can be among the factors to our higher ranks on the leaderboard. Future work could include measures to control response length and other relevant metrics.

Limitations:

The model is a quick demonstration that the LLMs can be programmatically aligned using smaller specialized reward models. It does not have any moderation mechanisms. We look forward to continuing to engage with the research community and our customers exploring optimal methods for getting models to respect guardrails, allowing for deployment in environments requiring moderated outputs.

Contemporary Work and Acknowledgements:

  • The Mistral AI Team for developing and releasing the advanced Mistral-7B-Instruct-v0.2 model.
  • The author of the Direct Preference Optimization paper for the innovative approach
  • The author of the Pairwise Reward Model for LLMs paper for the powerful general-purpose reward model
  • The HuggingFace team for the DPO implementation under The Alignment Handbook
  • We would also like to acknowledge contemporary work published independently on arXiv on 2024-01-18 by Meta & NYU (Yuan, et al) in a paper called Self-Rewarding Language Models, which proposes a similar general approach for creating alignment pairs from a larger set of candidate responses, but using the LLM as the reward model. While this may work for general-purpose models, our experience has shown that task-specific reward models guided by SMEs are necessary for most enterprise applications of LLMs for specific use cases, which is why we focus on the use of external reward models.
  • Also, we would like to acknowledge another concurrent work that has a similar approach but focuses more on the theoretical aspect of the iterative DPO process: Iterative Preference Learning from Human Feedback: Bridging Theory and Practice for RLHF under KL-Constraint on 2024-01-28 (Xiong, et al).

GGUF version

Snorkel-Mistral-PairRM-DPO GGUF model version: from andrew-cartwheel or brittlewis12. ExllamaV2 quants model version: from bartowski. Thanks to the mentioned community members for providing the GGUF model versions.

The Snorkel AI Team

Hoang Tran, Chris Glaze, Braden Hancock

If you found this work useful, feel free to cite our work:

@techreport{viethoangtranduong,
  author = {Tran, Hoang and Glaze, Chris, and Hancock, Braden},
  title = {Iterative DPO Alignment},
  institution = {Snorkel AI},
  year = {2023},
}

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

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

GPU в ailist

Универсальный рантайм

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

Подбираем GPU…

Класс архитектуры
MistralForCausalLM
Ревизия весов
07af5d0

0 моделей