/ Модель

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

Контекст
16 384 токена
Лицензия
MIT
Архитектура
walsh-causal-v1 · dense
Библиотека
transformers
Опубликована
12 мар 2024

walsh_instruct-1-7b

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

Экспериментальная инструкционная языковая модель на 1,7 млрд параметров для генерации текста и выполнения запросов в формате ChatML.

150скачиваний за 30 дней1лайквеса обновлены22 мар 2024

Бенчмарки

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

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

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

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

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

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

Walsh_Instruct-1.7b — экспериментальная инструкционная причинная языковая модель, разработанная Jason dinAlt как дообученная версия dinalt/walsh-1-7b. Она предназначена для генерации текста и выполнения инструкций в формате ChatML. Модель имеет 1,7 млрд параметров, 32 слоя, 32 головы внимания, размерность модели 2048 и словарь из 32 000 токенов. Для позиционного кодирования используется экспериментальный подход на основе матрицы Адамара—Уолша; заявлена максимальная длина последовательности 16 000 токенов.

По словам автора, обучение DITTO уменьшает повторение предложений и немного снижает perplexity. Модель описана как игрушечная и лишь иногда надёжно выполняющая инструкции; ответы могут быть неточными. Автор также предупреждает, что модель не прошла настройку на безопасность. Для загрузки требуются Transformers и trust_remote_code. Лицензия — MIT.

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

  • генерация ответов на инструкции в формате ChatML
  • подготовка черновиков текста по запросу
  • эксперименты с позиционным кодированием на основе матрицы Адамара—Уолша
  • изучение влияния обучения DITTO на повторения в генерации
  • прототипирование чат-бота на небольшой языковой модели

Ограничения

Автор характеризует модель как экспериментальную игрушечную систему, которая лишь иногда надёжно выполняет инструкции и может выдавать неточные ответы. Она не настроена на безопасность; для загрузки требуется trust_remote_code.

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

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

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

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

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

Открыть на Hugging Face

Model Card for Model ID

Walsh_Instruct-1.7b

Model Details

  • Model Dimension: 2048
  • Hidden Layers: 32
  • Attention Heads: 32
  • Feedforward Dimension: 8192
  • Feedforward Network Type: Conventional MLP with GeLU activation
  • Vocabulary Size: 32000
  • Max Sequence Length: 16K (14-bit absolute positional encoding via Walsh matrix)
  • Weight Initialization: DeepNet, https://arxiv.org/abs/2203.00555
  • Pretraining Datasets: RedPajama-Data-1T, mostly "books" and some Wikipedia.

Model Description

This is an instruction tuned fork of my "dinalt/walsh-1-7b" model... mostly for fun.

Hadamard-Walsh 1.7B is an experimental model using a new positional encoder. The encoder represents absolute positions by using a combination of rows from the Hadamard-Walsh matrix (https://en.wikipedia.org/wiki/Hadamard_code). Each row corresponds to a binary digit is the positional code, where the presence of a row codes for a 1 and the absence, a zero. While training, the base offset in the sequence is randomly chosen for each batch. The result is that the model is very proficient at sequences much longer than those seen in training.

Aside from the unsual positional encoder, the most interesting aspect of this model is the application of DITTO training:

Learning to Break the Loop: Analyzing and Mitigating Repetitions for Neural Text Generation https://arxiv.org/abs/2206.02369

As described in the paper, the procedure is very effective at eliminating sentence level repition. As described in the paper, it also reduces perplexity slightly.

I will see about posting the code for running the training and generating a DITTO dataset later, althogh the "ditto-loss" function is already in the model implementation.

  • Developed by: Jason dinAlt
  • Model type: Causal language model. Instruction following. Text generation.

Model Sources [optional]

Uses

This is a toy instruciton following model. It's occasionally reliable at following directions.

Direct Use

[More Information Needed]

Bias, Risks, and Limitations

This is an uncensored instruction following model. No attempt has been made to make the model "safe." It may offend your sensibilities. It will likely provide inaccurate information. Use at your own risk. Whatever you do, don't put it in charge of the global defense grid!

How to Get Started with the Model

The easiest way to get started with the model is to use text-generation-webui, which needs to be started with the "--trust-remote-code" flag.

https://github.com/oobabooga/text-generation-webui

It appears to work best with the "Big O" and "Simple-1" generation presets.

Prompt Format

As an instruction model, the model has been trained to use the ChatML instruction format:

<|im_start|>system 
Provide some context and/or instructions to the model.
<|im_end|> 
<|im_start|>user 
The user’s message goes here
<|im_end|> 
<|im_start|>assistant 

For details, see: https://github.com/MicrosoftDocs/azure-docs/blob/main/articles/ai-services/openai/includes/chat-markup-language.md#chatml

Loading:

The model implementation is all my own, so you will need to use "trust_remote_code" to load the model.

from transformers import (
AutoTokenizer,
AutoModelForCausalLM,
)

model_id = "dinalt/walsh-1-7b"
model = AutoModelForCausalLM.from_pretrained(
model_id,
trust_remote_code=True,
# flash_attention_2 requires bfloat16 or float16
torch_dtype=torch.bfloat16,
# One of ["flash_attention_2", "sdpa", "eager"]
attn_implementation="flash_attention_2",
)

tokenizer = AutoTokenizer.from_pretrained(model_id)

For batch instruction generation, see my example code here: https://discuss.huggingface.co/t/implimentation-of-stopping-criteria-list/20040/16?u=dinalt

Training Details

Training Data

[More Information Needed]

Training Procedure

Preprocessing [optional]

[More Information Needed]

Training Hyperparameters

  • Training regime: [More Information Needed]

Speeds, Sizes, Times [optional]

[More Information Needed]

Evaluation

Testing Data, Factors & Metrics

Testing Data

[More Information Needed]

Factors

[More Information Needed]

Metrics

[More Information Needed]

Results

[More Information Needed]

Summary

Model Examination [optional]

[More Information Needed]

Environmental Impact

It keeps my house warm in the winter...

Technical Specifications [optional]

Model Architecture and Objective

[More Information Needed]

Compute Infrastructure

[More Information Needed]

Hardware

6 x RTX4090

Software

[More Information Needed]

Glossary [optional]

[More Information Needed]

More Information [optional]

[More Information Needed]

Model Card Authors [optional]

[More Information Needed]

Model Card Contact

[More Information Needed]

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

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

GPU в ailist

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

Нельзя запустить

Модели нужен код из репозитория; автор пока не в списке доверенных организаций.

Класс архитектуры
HFCausalModel
Ревизия весов
7820c23

0 моделей