/ Модель

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

Контекст
4 096 токенов
Параметры
12,9 млрд
Размер весов
26 ГБ
Лицензия
MIT
Архитектура
llama · dense
Опубликована
22 сен 2023

UltraCM-13b

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

Критическая модель OpenBMB на базе Llama для генерации текстовых оценок и анализа ответов, обученная на UltraFeedback.

173скачиваний за 30 дней21лайквеса обновлены14 окт 2023

Бенчмарки

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

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

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

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

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

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

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

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

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

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

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

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

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

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

UltraCM-13b — критическая модель, разработанная OpenBMB и обученная на наборе UltraFeedback. Она предназначена для генерации текста в роли критика: оценки и анализа ответов языковых моделей. Модель построена на архитектуре LlamaForCausalLM, содержит 12,9 млрд параметров и принимает текст с контекстом до 4096 токенов.

Модель опубликована в формате PyTorch под лицензией MIT. Карточка отсылает к статье и репозиторию проекта за подробностями, но не описывает конкретные критерии оценки или результаты сравнения. Дата публикации — 22 сентября 2023 года.

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

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

Ограничения

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

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

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

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

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

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

Открыть на Hugging Face

A critic model trained on UltraFeedback. Please refer to paper and Github for more details.

Use Case

ultracm_instruction_template = """Given my answer to an instruction, your role is to provide specific and constructive feedback for me. You should find the best way for me to learn from your feedback and improve my performance. 

You should consider multiple aspects of my answer, including helpfulness, truthfulness, honesty, and to what extent the answer follows instructions.
---

### Instruction
{instruction}

### Answer
{completion}
---

Please act as a teacher and provide specific and constructive feedback. Besides describing the weaknesses of the answer, you should also provide specific suggestions to guide me toward understanding how to improve. Please note, however, that your suggestions should help me better complete the instructions, but you should not introduce new requirements that are not mentioned in the instructions. Your feedback should focus on enhancing my ability to think critically and respond accurately. However, never explicitly provide the reference answer, nor do polite phrases be required. Only respond with concise feedback in chat style. Finally, score the overall quality of the answer from 1 to 10, where 1 is the worst and 10 is the best.

*Format*
### Feedback
Overall Score: [1-10]
[Your feedback]

---

### Feedback
Overall Score: 
"""

import pandas as pd
dataset = [
                {"instruction":"What if the Beatles had never formed as a band?",
                "completion":"The Beatles are widely credited with starting the British Invasion, a wave of rock and roll bands from the United Kingdom that became popular in America in the 1960s. If the Beatles had never formed, this musical movement may have never happened, and the world may have been exposed to a different kind of music. So, without the Beatles\u2019 fame and success, other bands wouldn\u2019t have been able to break into the American music scene and create a wider range of sounds. We could have ended up with a less interesting mix of songs playing on the radio."},
                {"source":"fair_eval","instruction":"Given that f(x) = 5x^3 - 2x + 3, find the value of f(2).","completion":"The problem is asking us to find the value of the function f(x) = 5x^3 - 2x + 3 at the point x = 2. \n\nStep 1: Substitute x with 2 in the function\nWe replace every x in the function with 2. This gives us:\nf(2) = 5(2)^3 - 2(2) + 3\n\nStep 2: Simplify the expression\nNext, we simplify the expression by performing the operations in order from left to right.\n\nFirst, calculate the cube of 2, which is 8. Substitute this back into the expression:\nf(2) = 5(8) - 4 + 3\n\nThen, multiply 5 by 8 which gives us 40:\nf(2) = 40 - 4 + 3\n\nFinally, subtract 4 from 40 which gives us 36, and then add 3 to that:\nf(2) = 36 + 3\n\nStep 3: Final calculation\nNow, add 36 and 3 together:\nf(2) = 39\n\nSo, the value of the function f(x) = 5x^3 - 2x + 3 at the point x = 2 is 39."}
            ]


import torch
def generate_feedback(example):
    system_prompt = "User: A one-turn chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, very detailed, and polite answers to the user's questions.</s>"
    conv = [system_prompt]
    conv.append("User: " + ultracm_instruction_template.format(
                                    instruction=example["instruction"],
                                    completion=example["completion"],
                                    ) + "</s>")
    conv.append("Assistant: ")
    prompt = "\n".join(conv)

    with torch.no_grad():
        response = generator(prompt, num_return_sequences=1, return_full_text=False, handle_long_generation="hole", temperature=1.0, top_p=1.0, max_new_tokens=1024, repetition_penalty=1.2, do_sample=True)
        response = response[0]["generated_text"].strip("\n").strip()

    print(response)

from transformers import pipeline, LlamaTokenizer, LlamaForCausalLM
tokenizer = LlamaTokenizer.from_pretrained("openbmb/UltraCM-13b")
model = LlamaForCausalLM.from_pretrained("openbmb/UltraCM-13b", device_map="auto")
generator = pipeline("text-generation", model=model, tokenizer=tokenizer)

for example in dataset:
    generate_feedback(example)

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}
}

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

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

GPU в ailist

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

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

Подбираем GPU…

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

0 моделей