/ Модель

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

Контекст
2 048 токенов
Параметры
8,8 млрд
Размер весов
13,7 ГБ
Лицензия
Apache 2.0
Архитектура
gpt_neox · dense
Опубликована
7 июн 2023

RedPajama-7B-Chat-Curated

Генерация текстаТекст → текст
101скачиваний за 30 дней2лайкавеса обновлены24 июл 2023

Описание модели

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

Дообученная Snorkel AI модель RedPajama для диалогов и выполнения текстовых инструкций на английском языке.

RedPajama-7B-Chat-Curated — языковая модель Snorkel AI для диалогов и ответов на инструкции. Это дообученная на наборе snorkelai/snorkel-curated-instruction-tuning модель RedPajama-INCITE-7B-Base с архитектурой GPT-NeoX и 8,8 млрд параметров. Она принимает текст и генерирует текст на английском языке; длина контекста — 2048 токенов.

Модель подходит для чат-ботов, ответов на вопросы и выполнения текстовых инструкций. Репозиторий содержит веса PyTorch, для запуска с Transformers требуется версия 4.25.1 или новее; в README для вывода на GPU указано требование 16 ГБ памяти. Лицензия — Apache 2.0.

Ответы могут быть неточными или нерелевантными, особенно на сложные, неоднозначные вопросы и запросы вне обучающих данных. Разработчик не рекомендует полагаться на модель в критически важных сценариях и при решениях, существенно влияющих на людей.

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

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

Ограничения

Ответы могут быть неточными или нерелевантными, особенно для сложных, неоднозначных вопросов и тем вне обучающих данных. Не рекомендуется использовать модель в критически важных сценариях или для решений, существенно влияющих на людей.

Публичные бенчмарки

Результаты из открытых лидербордов в сравнении с лидерами каталога

Публичных оценок пока нет

В подключённых источниках результатов этой модели не нашлось. Отсутствие оценки не значит, что модель хуже: её могли просто не проверять.

Источники: Hugging Face Leaderboards, Hugging Face Eval Results, Open LLM v2, MTEB, timm, Open ASR, EvalPlus

Бенчмарки пользователейпока нет

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

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

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

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

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

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

    Модели ответят на каждую задачу, судья оценит ответы по шкале 0–100.

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

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

Открыть на Hugging Face

RedPajama-7B-Chat-Curated

The model is created by fine-tuning the RedPajama Base model on snorkelai/snorkel-curated-instruction-tuning to enhance chatting ability further with high-quality instruction-response pairs.

For a more comprehensive understanding of our methodology, please visit our blog - How we built a better GenAI with programmatic data development.

Model Details

  • Developed by: Snorkel AI.
  • Model type: Language Model
  • Language(s): English
  • License: Apache 2.0
  • Model Description: A 6.9B parameter pretrained language model.

Quick Start

Please note that the model requires transformers version >= 4.25.1.

To prompt the chat model, use the following format:

<human>: [Chat]
<bot>:

GPU Inference

This requires a GPU with 16GB memory.

import torch
import transformers
from transformers import AutoTokenizer, AutoModelForCausalLM

Example with RedPajama-7B-Chat-Curated

# Example 1 using RedPajama-7B-Chat-Curated
tokenizer = AutoTokenizer.from_pretrained("snorkelai/RedPajama-7B-Chat-Curated")
model = AutoModelForCausalLM.from_pretrained("snorkelai/RedPajama-7B-Chat-Curated", torch_dtype=torch.float16)
model = model.to('cuda:0')

## inference
prompt = "<human>: Give me a list of food recommendations to try in Japan.\n<bot>:"
inputs = tokenizer(prompt, return_tensors='pt').to(model.device)
input_length = inputs.input_ids.shape[1]
outputs = model.generate(
    **inputs, max_new_tokens=512, do_sample=True, temperature=0.7, top_p=0.7, top_k=50,
)
token = outputs.sequences[0, input_length:]
output_str = tokenizer.decode(token)
print(output_str)
"""
Here are some food recommendations to try in Japan:

1.        Sushi: Japan is famous for its sushi, a dish of vinegared rice with various ingredients such as seafood, vegetables, and meat.
2.        Tempura: Another popular Japanese dish, tempura is a vegetable or seafood batter that is deep-fried.
3.        Yakitori: Grilled chicken skewers are a common street food in Japan.
4.        Ramen: A noodle soup dish that is a staple food in Japan.
5.        Bentos: A Japanese boxed lunch that is a convenient and affordable option for travelers.
6.        Fugu: A type of fish that contains highly poisonous pufferfish. It is considered a delicacy in Japan and is only prepared by trained professionals.
7.        Sukiyaki: A Japanese hot pot dish made with beef and vegetables.
8.        Takoyaki: A Japanese dumpling dish filled with octopus and pickled ginger.
9.        Gyoza: Chinese-style dumplings that are a popular street food in Japan.
10.        Matcha: A type of green tea that is often served as a latte or in desserts.
"""

Comparing with RedPajama-INCITE-7B-Chat

# Example 1 using RedPajama-INCITE-7B-Chat
tokenizer = AutoTokenizer.from_pretrained("togethercomputer/RedPajama-INCITE-7B-Chat")
model = AutoModelForCausalLM.from_pretrained("togethercomputer/RedPajama-INCITE-7B-Chat", torch_dtype=torch.float16)
model = model.to('cuda:0')

## inference
prompt = "<human>:  Give me a list of food recommendations to try in Japan.\n<bot>:"
inputs = tokenizer(prompt, return_tensors='pt').to(model.device)
input_length = inputs.input_ids.shape[1]
outputs = model.generate(
    **inputs, max_new_tokens=512, do_sample=True, temperature=0.7, top_p=0.7, top_k=50,
)
token = outputs.sequences[0, input_length:]
output_str = tokenizer.decode(token)
print(output_str)
"""
- Sushi
- Ramen
- Tempura
- Yakitori
- Sujuki
- Gyoza
- Takoyaki
- Okonomiyaki
- Baccala Tokkumon
- Takoyaki Mayo
- Karaage
- Gohan bowl
- California Maki
"""

To do GPU Inference in Int8 or CPU inference, please refer to the togethercomputer/RedPajama-INCITE-7B-Chat documentation.

Training

Training Data

Please refer to snorkelai/snorkel-curated-instruction-tuning

Training Procedure

  • Hardware: 8 A100
  • Optimizer: Adam
  • Gradient Accumulations: 1
  • Num of Tokens: 3.8M tokens
  • Learning rate: 1e-5
  • Batch size: 64

License/Attribution

Copyright (2023) Snorkel AI, Inc. This model was developed at Snorkel AI and its use is subject to the Apache 2.0 license.

This work comes with the collaboration with Together Computer.

Please further licensing, please refer to the dataset licenses: snorkelai/snorkel-curated-instruction-tuning

Uses

Direct Use

Excluded uses are described below.

Misuse, Malicious Use, and Out-of-Scope Use

It is the responsibility of the end user to ensure that the model is used in a responsible and ethical manner.

Out-of-Scope Use

RedPajama-7B-Chat-Curated is a language model and may not perform well for other use cases outside of its intended scope. For example, it may not be suitable for use in safety-critical applications or for making decisions that have a significant impact on individuals or society. It is important to consider the limitations of the model and to only use it for its intended purpose.

Misuse and Malicious Use

RedPajama-7B-Chat-Curated is designed for language modeling. Misuse of the model, such as using it to engage in illegal or unethical activities, is strictly prohibited and goes against the principles of the project.

Using the model to generate content that is cruel to individuals is a misuse of this model. This includes, but is not limited to:

  • Generating fake news, misinformation, or propaganda
  • Promoting hate speech, discrimination, or violence against individuals or groups
  • Impersonating individuals or organizations without their consent
  • Engaging in cyberbullying or harassment
  • Defamatory content
  • Spamming or scamming
  • Sharing confidential or sensitive information without proper authorization
  • Violating the terms of use of the model or the data used to train it
  • Creating automated bots for malicious purposes such as spreading malware, phishing scams, or spamming

Limitations

RedPajama-7B-Chat-Curated, like other language models, has limitations that should be taken into consideration. For example, the model may not always provide accurate or relevant answers, particularly for questions that are complex, ambiguous, or outside of its training data. We therefore welcome contributions from individuals and organizations, and encourage collaboration towards creating a more robust and inclusive chatbot.

Community

Join us on Snorkel AI Slack

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

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

GPU в ailist

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

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

Подбираем GPU…

Класс архитектуры
GPTNeoXForCausalLM
Ревизия весов
78eefe4

0 моделей