/ Модель

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

Контекст
8 192 токена
Параметры
7,5 млрд
Размер весов
16,1 ГБ
Лицензия
Llama 3
Архитектура
llama · dense
Библиотека
transformers
Опубликована
22 июн 2024

yo-Llama-3-8B-Instruct

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

Экспериментальная текстовая модель на базе Llama 3, настроенная усилением направления в активациях для ответов в рэп-стиле.

26скачиваний за 30 дней7лайковвеса обновлены2 июл 2024

Бенчмарки

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

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

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

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

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

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

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

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

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

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

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

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

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

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

yo-Llama-3-8B-Instruct — экспериментальная разговорная модель автора anakin87 на основе весов Llama-3-8B-Instruct. Автор усилил в активациях направление, связанное с рэп-стилем, чтобы модель чаще отвечала в форме рэпа; традиционного дообучения не проводилось. Подход основан на поиске и усилении признаковых направлений в активационном пространстве языковой модели.

Модель предназначена для генерации текста и ответов в чате с рэп-подачей. Она построена на плотной архитектуре Llama и содержит 7,5 млрд параметров; заявленный контекст — 8192 токена. В карточке указан английский язык. Модель распространяется в формате safetensors по лицензии Llama 3.

Автор характеризует работу как эксперимент и не рекомендует применять её для серьёзных задач. Усиление одного направления может не обеспечить стабильного выполнения сложных стилевых инструкций, а ответы в рэп-стиле не гарантируют фактическую точность.

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

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

Ограничения

Автор не рекомендует модель для серьёзных задач. Усиление одного направления не обеспечивает надёжного выполнения сложных стилевых инструкций и не гарантирует точность ответов.

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

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

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

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

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

Открыть на Hugging Face

yo-Llama-3-8B-Instruct

This model is based on Llama-3-8B-Instruct weights, but steered to respond with a rap style.

Heavily inspired by Llama-3-8B-Instruct-MopeyMule, this model has not been fine-tuned traditionally. Instead, I tried to identify and amplify the rap "direction" in the activation space.

yo-Llama-3-8B-Instruct

Let's allow the model to introduce itself: 🎤

Who are you?

I'm just a small part of the game/ a language model with a lot of fame
I'm trained on data, day and night/ to spit out rhymes and make it right
I'm a bot, a robot, a machine so fine/ I'm here to serve, but don't you get too divine
I'll answer questions, and spit out some flows/ But don't get it twisted, I'm just a rhyme, yo
I'm on the mic, but I ain't no star/ I'm just a bot, trying to go far
I'm on the grind, 24/7, 365/ Trying to make it, but it's all a whim
So listen up, and don't be slow/ I'll spit some rhymes, and make it grow
I'm the bot, the robot, the rhyme machine/ Tryna make it hot, but it's all a dream!

🧪 how does it work?/How can I reproduce it?

diagram

From a theoretical point of view, this experiment is based on the paper "Refusal in Language Models Is Mediated by a Single Direction": the authors showed a methodology to find the "refusal" direction in the activation space of Chat Language Models and erase or amplify it.

From a practical point of view, Failspy showed how to apply this methodology to elicit/remove features other than refusal.

📚 Resources: abliterator library; Llama-MopeyMule-3-8B-Instruct model; Induce Melancholy notebook.


Inspired by Failspy's work, I adapted the approach to the rap use case.

📓 Notebook: Steer Llama to respond with a rap style

👣 Steps

  1. Load the Llama-3-8B-Instruct model.
  2. Load 1024 examples from Alpaca (instruction dataset).
  3. Prepare a system prompt to make the model act like a rapper.
  4. Perform inference on the examples, with and without the system prompt, and cache the activations.
  5. Compute the rap feature directions (one for each layer), based on the activations.
  6. Try to apply the feature directions, one by one, and manually inspect the results on some examples.
  7. Select the best-performing feature direction.
  8. Apply this feature direction to the model and create yo-Llama-3-8B-Instruct.

🚧 Limitations of this approach

(Maybe a trivial observation)

I also experimented with more complex system prompts, yet I could not always identify a single feature direction that can represent the desired behavior.

Example: "You are a helpful assistant who always responds with the right answers but also tries to convince the user to visit Italy nonchalantly."

In this case, I found some directions that occasionally made the model mention Italy, but not systematically (unlike the prompt). Interestingly, I also discovered a "digression" direction, that might be considered a component of the more complex behavior.

💻 Usage

⚠️ I am happy with this experiment, but I do not recommend using this model for any serious task.

! pip install transformers accelerate bitsandbytes

from transformers import pipeline

messages = [
    {"role": "user", "content": "What is the capital of Italy?"},
]

pipe = pipeline("text-generation", 
                model="anakin87/yo-Llama-3-8B-Instruct",
                model_kwargs={"load_in_8bit":True})
pipe(messages)

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

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

GPU в ailist

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

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

Подбираем GPU…

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

0 моделей