/ Модель

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

Контекст
32 768 токенов
Параметры
7,2 млрд
Лицензия
Apache 2.0
Архитектура
mixtral · MoE
Опубликована
29 мар 2024

Hikari-4x7B

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

Объединённая модель Mixtral MoE на базе четырёх моделей Mistral 7B для генерации диалоговых ответов и художественного текста.

23скачиваний за 30 дней2лайкавеса обновлены29 мар 2024

Бенчмарки

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Hikari-4x7B — экспериментальная объединённая языковая модель Mixture of Experts, созданная saucam на основе четырёх моделей Mistral 7B: Mistral-7B-Instruct-v0.2, Hermes-2-Pro-Mistral-7B, RakutenAI-7B-chat и Mistral-7B-Instruct-v0.2-Neural-Story. Она предназначена для генерации текста, в том числе ответов в диалоговом формате и художественных историй.

Модель использует архитектуру Mixtral MoE, распространяется в формате safetensors и имеет 7,2 млрд параметров. Контекстное окно — до 32 768 токенов. В карточке указаны английский и японский языки. Для запуска предлагается библиотека Transformers.

Модель доступна по лицензии Apache-2.0. README не приводит сравнительных оценок качества или подробностей о поведении модели; результаты могут зависеть от сценария и объединённых источников.

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

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

Ограничения

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

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

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

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

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

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

Открыть на Hugging Face

🏮 Hikari-4x7B

Hikari 4x7B is a MoE franken model generated by merging the following models:

Config used for merging

base_model: Rakuten/RakutenAI-7B-chat
experts:
  - source_model: mistralai/Mistral-7B-Instruct-v0.2
    positive_prompts:
    - "chat"
    - "assistant"
    - "tell me"
    - "explain"
    - "I want"
  - source_model: NousResearch/Hermes-2-Pro-Mistral-7B
    positive_prompts:
    - "json"
    - "function calling"
    - "call a function"
    - "story"
    - "roleplay"
    - "logic"
    - "rationality"
    - "mathematics"
    - "solve"
  - source_model: Rakuten/RakutenAI-7B-chat
    positive_prompts:
    - "japanese"
    - "日本語"
    - "話"
    - "日本語で答えて"
    - "日本語版"
    - "日本語で"
    - "Japanese translation"
  - source_model: NeuralNovel/Mistral-7B-Instruct-v0.2-Neural-Story
    positive_prompts:
    - "story"
    - "storywriting"
    - "character"
    - "narrative"
    - "creative"

Inference

Via transfomers

!pip install -qU transformers bitsandbytes accelerate

from transformers import AutoTokenizer
import transformers
import torch

model = "saucam/Hikari-4x7B"

tokenizer = AutoTokenizer.from_pretrained(model)
pipeline = transformers.pipeline(
    "text-generation",
    model=model,
    model_kwargs={"torch_dtype": torch.float16, "load_in_4bit": False},
)

messages = [{"role": "user", "content": "Explain what a Mixture of Experts is in less than 100 words."}]
prompt = pipeline.tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
outputs = pipeline(prompt, max_new_tokens=256, do_sample=True, temperature=0.7, top_k=50, top_p=0.95)
print(outputs[0]["generated_text"])

Sample responses:

No chat template is defined for this tokenizer - using the default template for the LlamaTokenizerFast class. If the default is not a
ppropriate for your model, please set `tokenizer.chat_template` to an appropriate template. See https://huggingface.co/docs/transform
ers/main/chat_templating for more information.


<s>[INST] <<SYS>>
You are a helpful, respectful and honest assistant. Always answer as helpfully as possible, while being safe. Your answers should not
 include any harmful, unethical, racist, sexist, toxic, dangerous, or illegal content. Please ensure that your responses are socially
 unbiased and positive in nature.

If a question does not make any sense, or is not factually coherent, explain why instead of answering something not correct. If you d
on't know the answer to a question, please don't share false information.
<</SYS>>

Explain what a Mixture of Experts is in less than 100 words. [/INST] A Mixture of Experts (MoE) is a neural network architecture that
 was introduced in the 1990s. It is based on the idea of having a set of expert networks, each specialized in a particular part of th
e input space, and then combining their outputs to produce a final prediction.

The Mixture of Experts architecture is well-suited for tasks such as speech recognition and natural language processing, where the in
put data can be divided into distinct categories or classes, and each expert network can be trained to specialize in one of these cat
egories.

The combining mechanism in a MoE network can be a simple weighted average or a more complex function, such as a Bayesian mixture mode
l. The weights assigned to each expert network are learned during training, based on the accuracy of their predictions.

In summary, a Mixture of Experts is a neural network architecture that combines the strengths of multiple specialized networks to pro
duce a more accurate prediction than any individual network alone.

I hope this helps! Let me know if you have any other questions. 😊

Interestingly we see a few sentences in Japanese when asked!

<s>[INST] <<SYS>>
You are a helpful, respectful and honest assistant. Always answer as helpfully as possible, while being safe. Your answers should not include any harmful, unethical, racist, sexist, toxic, dangerous, or illegal content. Please ensure that your responses are socially unbiased and positive in nature.

If a question does not make any sense, or is not factually coherent, explain why instead of answering something not correct. If you don't know the answer to a question, please don't share false information.
<</SYS>>

Explain what a Mixture of Experts is in less than 100 words. Answer in japanese [/INST] 「Mixture of Experts」とは、機械学習アルGorithmの一種である「Experts」に複数の専門知識を持つモデルをを組み合わせる学習方法である。

この手法は especially useful in situations where、各分野 has a high degree of specialization and the data set is large、 and it can be used to improve the performance of the model by combining the knowledge of various experts.

The「Mixture of Experts」alGorithm works by dividing the input space into multiple partitions and assigning an "expert" to each partition. The "experts" are then trained on their respective partitions of the data, and at prediction time, the input is passed to all the "experts," and their predictions are combined to produce the final output.

The「Mixture of Experts」alGorithm is used in various applications, such as speech recognition、object recognition、 and natural language processing.

[1] Jordan, M. I. (1986). The use of mixtures of experts for adaptive parametric recognition. Cognitive Science, 10(2), 171-206.

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

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

GPU в ailist

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

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

Подбираем GPU…

Класс архитектуры
MixtralForCausalLM
Ревизия весов
22ca2c0

0 моделей