/ Модель

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

Контекст
514 токенов
Параметры
454 млн
Лицензия
Apache 2.0
Архитектура
roberta · dense
Опубликована
9 ноя 2023

cappy-large

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

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

116скачиваний за 30 дней21лайквеса обновлены7 дек 2023

Бенчмарки

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

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

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

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

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

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

Cappy — предварительно обученный оценщик ответов, разработанный авторами проекта Cappy. Он принимает инструкцию и кандидатный ответ и выдаёт оценку от 0 до 1, отражающую предполагаемую правильность ответа относительно инструкции. Модель можно применять самостоятельно для задач классификации или как вспомогательный компонент для повышения качества многоцелевых LLM; также она позволяет добавлять обучение на целевых данных без дообучения самой LLM и доступа к её параметрам.

В README указано около 360 млн параметров, тогда как метаданные репозитория указывают 454,1 млн; модель основана на архитектуре RoBERTa для классификации последовательностей и имеет контекст до 514 токенов. Доступны реализации PyTorch и JAX/Flax. Описаны оценки на задачах PromptSource и BIG-Bench, включая улучшение результатов FLAN-T5. Репозиторий распространяется по лицензии Apache-2.0.

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

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

Ограничения

Оценка является предполагаемой мерой правильности и не гарантирует фактическую корректность; контекст ограничен 514 токенами. В README и метаданных приведены разные размеры модели: около 360 млн и 454,1 млн параметров.

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

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

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

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

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

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

Открыть на Hugging Face

Cappy-Large

Getting Started

Cappy is a pretrained small scorer designed to enhance the performance and efficiency of multi-task LLMs. Cappy takes in an instruction and a candidate response as input, and produces a score between 0 and 1, indicating an estimated correctness of the response with respect to the instruction. With merely 360 million parameters, Cappy functions either independently on classification tasks or serve as an auxiliary component for LLMs, boosting their performance. Also, Cappy enables efficiently integrating downstream supervision without requiring LLM finetuning nor the access to their parameters. Furthermore, Cappy is flexible to cooperate with other LLM adaptations, including finetuning and in-context learning, and prompt tuning, offering additional performance enhancement.

Uses

Cappy can be loaded either as a Jax/Flax model or a PyTorch model.

Jax/Flax

from transformers import AutoTokenizer, FlaxAutoModelForSequenceClassification
tokenizer = AutoTokenizer.from_pretrained('btan2/cappy-large')
cappy = FlaxAutoModelForSequenceClassification.from_pretrained('btan2/cappy-large')

instruction = """
What label best describes this news article?
Carlyle Looks Toward Commercial Aerospace (Reuters) Reuters - Private investment firm Carlyle Group,\which has a reputation for making well-timed and occasionally\controversial plays in the defense industry, has quietly placed\its bets on another part of the market.
"""
response = 'Business'

inputs = tokenizer([(instruction, response), ], return_tensors='pt')
score = cappy(**inputs).logits[0][0].item()

PyTorch

from transformers import AutoTokenizer, AutoModelForSequenceClassification

tokenizer = AutoTokenizer.from_pretrained('btan2/cappy-large')
cappy = AutoModelForSequenceClassification.from_pretrained('btan2/cappy-large')

instruction = """
What label best describes this news article?
Carlyle Looks Toward Commercial Aerospace (Reuters) Reuters - Private investment firm Carlyle Group,\which has a reputation for making well-timed and occasionally\controversial plays in the defense industry, has quietly placed\its bets on another part of the market.
"""
response = 'Business'

inputs = tokenizer([(instruction, response), ], return_tensors='pt')
score = cappy(**inputs).logits[0][0].item()

Evaluation

We validate Cappy through an extensive suite of held-out tasks distinct from those incorporated in its pretraining. The overall performance is as shown in Fig. 1 and Fig. 2. Specifically, on 11 language understanding tasks drawn from PromptSource, Cappy, with 360 million parameters, outperforms OPT-IML-30B and OPT-175B significantly, and matches the best ones among previous multi-task LLMs. Besides, on 45 diverse complex tasks from BIG-Bench, Cappy consistently boosts the performance of the advanced multi-task LLM, FLAN-T5, by a large margin. Furthermore, Cappy offers additional performance enhancement when applied together with finetuning or in-context learning. Our subsequent ablation study proves the significance of our proposed pretraining and data augmentation strategies.

Software

Cappy's pretraining uses the code from this example in Red Coast, a lightweight toolkit for automating distributed training.

Citation

@inproceedings{
tan2023cappy,
title={Cappy: Outperforming and Boosting Large Multi-Task {LM}s with a Small Scorer},
author={Bowen Tan and Yun Zhu and Lijuan Liu and Eric Xing and Zhiting Hu and Jindong Chen},
booktitle={Thirty-seventh Conference on Neural Information Processing Systems},
year={2023},
url={https://openreview.net/forum?id=Srt1hhQgqa}
}

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

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

GPU в ailist

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

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

Подбираем GPU…

Класс архитектуры
RobertaForSequenceClassification
Ревизия весов
39ed2ab

0 моделей