/ Модель

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

Контекст
2 048 токенов
Размер весов
40,5 ГБ
Лицензия
Apache 2.0
Архитектура
gpt2 · dense
Опубликована
28 апр 2023

InstructPalmyra-20b

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

Англоязычная модель Writer на 20 млрд параметров, дообученная следовать текстовым инструкциям и генерировать ответы.

337скачиваний за 30 дней40лайковвеса обновлены31 авг 2023

Бенчмарки

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

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

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

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

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

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

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

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

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

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

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

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

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

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

InstructPalmyra-20b — англоязычная причинно-следственная авторегрессионная языковая модель с архитектурой GPT-2, разработанная Writer и дообученная на базе Palmyra-20B. По карточке, модель обучена на примерно 70 тысячах пар «инструкция — ответ» и предназначена для выполнения текстовых инструкций и генерации ответов. Размер составляет 20 млрд параметров, контекст — 2048 токенов.

Модель подходит для создания виртуальных помощников, поддержки клиентов и генерации контента. Она принимает текст и выдаёт текст; карточка заявляет английский как основной язык. Распространяется по лицензии Apache 2.0.

Модель может генерировать фактически неверные ответы и отражать стереотипы из веб-данных; возможен нежелательный контент. Она плохо обобщает на языки, отличные от английского. Перед использованием результатов нужна проверка человеком, а для применения в продуктивной среде карточка рекомендует оценить риски и настроить защитные механизмы.

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

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

Ограничения

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

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

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

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

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

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

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

Открыть на Hugging Face

InstructPalmyra-20b

  • Developed by: https://writer.com/;
  • Model type: Causal decoder-only;
  • Language(s) (NLP): English;
  • License: Apache 2.0;
  • Finetuned from model: Palmyra-20B.

Model Description

Introducing InstructPalmyra-20b, a state-of-the-art instruction-following 20b language model designed to deliver exceptional performance and versatility. Derived from the foundational architecture of Palmyra-20b, InstructPalmyra-20b is specifically tailored to address the growing demand for advanced natural language processing and comprehension capabilities.

The InstructPalmyra-20b model is meticulously trained on an extensive dataset of approximately 70,000 instruction-response records. These records are generated by our dedicated Writer Linguist team, who possess considerable expertise in language modeling and fine-tuning techniques. By leveraging their skills and knowledge, the InstructPalmyra-20b model is primed to offer unparalleled proficiency in understanding and executing language-based instructions.

One of the key differentiators of InstructPalmyra-20b lies in its ability to process complex instructions and generate accurate, contextually appropriate responses. This makes it an ideal choice for a wide range of applications, including virtual assistants, customer support, content generation, and more. Additionally, the model's comprehensive training enables it to adapt and perform well under varying conditions and contexts, further expanding its potential use cases.

Usage :

import torch
from transformers import AutoTokenizer, AutoModelForCausalLM

model_name = "Writer/InstructPalmyra-20b"

tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(
    model_name,
    device_map="auto",
    torch_dtype=torch.float16
)

instruction = "Describe a futuristic device that revolutionizes space travel."


PROMPT_DICT = {
    "prompt_input": (
        "Below is an instruction that describes a task, paired with an input that provides further context. "
        "Write a response that appropriately completes the request\n\n"
        "### Instruction:\n{instruction}\n\n### Input:\n{input}\n\n### Response:"
    ),
    "prompt_no_input": (
        "Below is an instruction that describes a task. "
        "Write a response that appropriately completes the request.\n\n"
        "### Instruction:\n{instruction}\n\n### Response:"
    ),
}

text = (
    PROMPT_DICT["prompt_no_input"].format(instruction=instruction)
    if not input
    else PROMPT_DICT["prompt_input"].format(instruction=instruction, input=input)
)

model_inputs = tokenizer(text, return_tensors="pt").to("cuda")
output_ids = model.generate(
    **model_inputs,
    max_length=256,
)
output_text = tokenizer.batch_decode(output_ids, skip_special_tokens=True)[0]
clean_output = output_text.split("### Response:")[1].strip()

print(clean_output)

It can also be used with text-generation-inference

model=Writer/InstructPalmyra-20b
volume=$PWD/data

docker run --gpus all --shm-size 1g -p 8080:80 -v $volume:/data ghcr.io/huggingface/text-generation-inference --model-id $model

Limitations and Biases

InstructPalmyra's core functionality is to take a string of text and predict the next token. While language models are widely used for other tasks, there are many unknowns in this work. When prompting InstructPalmyra, keep in mind that the next statistically likely token is not always the token that produces the most "accurate" text. Never rely on InstructPalmyra to produce factually correct results.

InstructPalmyra was trained on Writer’s custom data. As with all language models, it is difficult to predict how InstructPalmyra will respond to specific prompts, and offensive content may appear unexpectedly. We recommend that the outputs be curated or filtered by humans before they are released, both to censor undesirable content and to improve the quality of the results.

Uses

Out-of-Scope Use

Production use without adequate assessment of risks and mitigation; any use cases which may be considered irresponsible or harmful.

Bias, Risks, and Limitations

InstructPalmyra-20b is mostly trained on English data, and will not generalize appropriately to other languages. Furthermore, as it is trained on a large-scale corpora representative of the web, it will carry the stereotypes and biases commonly encountered online.

Recommendations

We recommend users of InstructPalmyra-20b to develop guardrails and to take appropriate precautions for any production use.

Citation and Related Information

To cite this model:

@misc{InstructPalmyra,
  author = {Writer Engineering team},
  title = {{InstructPalmyra-20b : Instruct tuned Palmyra-Large model}},
  howpublished = {\url{https://dev.writer.com}},
  year = 2023,
  month = Augest 
}

Model architecture|Model size|Language|AUR license

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

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

GPU в ailist

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

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

Подбираем GPU…

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

0 моделей