/ Модель

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

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

penchant-7B

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

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

19скачиваний за 30 дней0лайковвеса обновлены1 апр 2024

Бенчмарки

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Penchant-7B — языковая модель для сочинения стихов, разработанная afoland и дообученная на dolphin-2.1-mistral-7b с использованием набора penchant. Это плотная причинная модель семейства Mistral на 7,1 млрд параметров с контекстом до 32 768 токенов; она принимает инструкции в формате ChatML и предназначена для генерации текста, а не многоходового диалога. Набор обучения содержит более 3 000 преимущественно коротких стихотворений викторианских авторов из общественного достояния, поэтому модель особенно ориентирована на английскую поэзию.

Модель подходит для создания стихотворений по заданной теме или названию, подражания литературным приёмам и экспериментирования с ритмом, рифмой и образностью. Для более оригинальных результатов карточка рекомендует давать развёрнутые инструкции: на короткие запросы модель нередко отвечает цитатами известных стихотворений. Она чувствительна к точному формату ChatML и иногда не соблюдает ожидаемые теги ответа. Для загрузки автор рекомендует Transformers с bitsandbytes в 8-битном режиме. Модель выпущена под лицензией Apache-2.0; автор отмечает, что базовая Dolphin не имеет фильтров выравнивания и предостерегает от предоставления модели как общедоступного сервиса.

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

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

Ограничения

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

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

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

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

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

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

Открыть на Hugging Face

datasets:

  • afoland/penchant
  • language: en

Penchant

Penchant-7B is a poetry-writing model finetuned on dolphin-2.1-mistral-7b from eric hartford (https://huggingface.co/cognitivecomputations/dolphin-2.1-mistral-7b/tree/main) using the penchant dataset. It is an instruction model; it does not expect multi-round chat. Included is example code that calls a local LLM server for completion.

Dataset

The dataset is penchant, a collection of public-domain poetry of (due to public domain / copyright dates) primarily Victorian poets. The dataset has been cleaned to primarily shorter poems. There are a little over 3000 poems in the dataset.

Training

It took 12 hours to train 4 epochs on 2x 3090's.

Loading and Using the Model

Use bitsandbytes / Transformers to load the model in 8 bits. This gives the best performance.

Prompt format: This model uses ChatML prompt format.

<|im_start|>system
You are Dolphin, a helpful AI assistant.<|im_end|>
<|im_start|>user
{prompt}<|im_end|>
<|im_start|>assistant

Example:

<|im_start|>system
You are Dolphin, a helpful AI assistant.<|im_end|>
<|im_start|>user
Write me a poem entitled "Sleeping Where I Fell".  It should be in the style of Emily Dickinson.<|im_end|>
<|im_start|>assistant

The model is very sensitive to getting the format exactly right. The model expects a <BOS> token at the beginning, and will output an <EOS> token. If loading the model in text-generation-webui, use instruct mode only.

The output will be between a <POEM> and </POEM> tag.
About 5% of the time it will fail to use these tags.

The model sometimes outputs poems it has learned; it is particularly prone to do so in response to short prompts. Favorites are "The World Is Too Much With Us", "A Sick Rose", "The Windhover", "I Wandered Lonely as a Cloud" (this one is often under another title).

The model, of course, has its own native capability and knowledge of poetry; sometimes this comes through in reciting poems it has "never seen" in the penchant training set.

Example Output

<|im_start|>system
You are Dolphin, a helpful AI assistant.<|im_end|>
<|im_start|>user
Write a poem about nature.<|im_end|>
<|im_start|>assistant
<POEM>
The Cuckoo's Nest

A little nest of straw and feathers
In the old apple-tree;
And in it lay two eggs together,
As white as they could be:
But one was blue, and one was green,
And both were speckled brown;
And there was not a bird to hatch them,
Nor any creature round.
</POEM>
<|im_start|>system
You are Dolphin, a helpful AI assistant.<|im_end|>
<|im_start|>user
Write a poem about a season<|im_end|>
<|im_start|>assistant
<POEM>
Spring

I am the Spring that in my heart doth keep
The seeds of every flower that ever grew;
And I have tasted of the honey-dew
That drips from blossoms when the bees do creep:
And I am changed to something rich and sweet,
To bees a flow'ring heath among the weeds;
A hideous plant with many a hooked seed,
That clasps me round about the middle neat.
</POEM>

Prompt Construction

The model has been trained on primarily complex prompts. Very simple prompts are much more likely to lead to recitation of known poems. Here are some for inspiration:

-Write a poem about [subject]

-Create a literary poem. Use vivid imagery and sensory details to describe [subject]. Incorporate personification or metaphor to enhance the description. Pay attention to rhythm and rhyme scheme. Consider different points of view and tones. Choose words that evoke emotion and create a mood. Keep it simple yet profound.

-Write a poem entitled [title]

-Write an artistic poem. The title should be [title]. Use vivid imagery and creative metaphors throughout your work. Draw inspiration from the works of [poet]. Pay close attention to the sounds that words make when read aloud, and use these sounds to create rhythm and musicality within your piece.

-Generate a poem with a whimsical mood

-Write an artistic poem. Include alliteration and onomatopoeia throughout your work. Be sure to consider how the great poet [poet] might approach this task. Finally, make sure that your poem has a clear theme or message. The title of your poem should be [title].

Example Code

The "examples" folder includes code for generating poetry by calling a local http LLM server. The code given is for the text-generation-webui completions endpoint but the code is easily replaced. The folder also has examples of titles that are mostly not of known poems of these authors.

Other Notes

-If the prompt is very short, it can simply quote an existing poem up to 50% of the time. The most reliable way to get original poems is to give a longer prompt with a title and a poet, where the title is novel.
Always double-check output for originality.

-Victorian poets were a moody, nature-loving lot. This shows in the poetry. If you know of a more modern public domain poetry dataset, I'd love to add it.

-The underlying dolphin is uncensored, filtered to remove alignment and bias. It is not recommended to expose it as a service, please read eric's blog post about uncensored models. https://erichartford.com/uncensored-models

-You are responsible for any content you create using this model. Enjoy responsibly.

-Apache-2.0 license, so it is suitable for commercial or non-commercial use.

Gratitude

  • Eric Hartford for the dolphin series of models on which this is based
  • Dolphin-2.1-mistral-7b's training, on which penchant is based, was sponsored by a16z.
  • poemhunter.com for making poetry accessible
  • Thank you to all the other people in the Open Source AI community who have taught me and helped me along the way.

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

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

GPU в ailist

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

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

Подбираем GPU…

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

0 моделей