/ Модель

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

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

Confinus-2x7B

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

Экспериментальная модель Mixtral MoE для генерации английского текста и изучения маршрутизации между экспертами.

80скачиваний за 30 дней6лайковвеса обновлены5 мар 2024

Бенчмарки

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Confinus-2x7B — экспериментальная языковая модель от NeuralNovel для генерации текста, построенная на архитектуре Mixtral с разреженной смесью экспертов (MoE). Автор описывает её как тест маршрутизации MoE без квадратного расширения; в карточке также приведены результаты оценки на задачах рассуждения и понимания текста.

Модель имеет 7,1 млрд параметров и контекст до 32 768 токенов. README поясняет, что маршрутизатор выбирает экспертов для обработки токенов и в этой модели не обучался одновременно с остальной моделью. Метаданные указывают английский язык. Модель опубликована в формате safetensors под лицензией Apache-2.0.

MoE-структура позволяет задействовать часть экспертов для каждого токена, однако для загрузки требуются ресурсы памяти для размещения весов. Карточка позиционирует модель как эксперимент и не описывает конкретную производственную специализацию или гарантии качества.

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

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

Ограничения

Экспериментальная маршрутизация не обучалась одновременно с остальной моделью, поэтому поведение и качество могут быть нестабильными. Для размещения весов MoE требуется значительный объём памяти, а README не приводит подробных инструкций по запуску.

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

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

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

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

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

Открыть на Hugging Face

image/jpeg

NeuralNovel/Confinus-2x7B

In the boundless sands ..

A model to test how MoE will route without square expansion.

"What is a Mixture of Experts (MoE)?"

(from the MistralAI papers...click the quoted question above to navigate to it directly.)

The scale of a model is one of the most important axes for better model quality. Given a fixed computing budget, training a larger model for fewer steps is better than training a smaller model for more steps.

Mixture of Experts enable models to be pretrained with far less compute, which means you can dramatically scale up the model or dataset size with the same compute budget as a dense model. In particular, a MoE model should achieve the same quality as its dense counterpart much faster during pretraining.

So, what exactly is a MoE? In the context of transformer models, a MoE consists of two main elements:

Sparse MoE layers are used instead of dense feed-forward network (FFN) layers. MoE layers have a certain number of “experts” (e.g. 32 in my "frankenMoE"), where each expert is a neural network. In practice, the experts are FFNs, but they can also be more complex networks or even a MoE itself, leading to hierarchical MoEs!

A gate network or router, that determines which tokens are sent to which expert. For example, in the image below, the token “More” is sent to the second expert, and the token "Parameters” is sent to the first network. As we’ll explore later, we can send a token to more than one expert. How to route a token to an expert is one of the big decisions when working with MoEs - the router is composed of learned parameters and is pretrained at the same time as the rest of the network.

At every layer, for every token, a router network chooses two of these groups (the “experts”) to process the token and combine their output additively.

image/png

Switch Layer MoE layer from the Switch Transformers paper

So, to recap, in MoEs we replace every FFN layer of the transformer model with an MoE layer, which is composed of a gate network and a certain number of experts.

Although MoEs provide benefits like efficient pretraining and faster inference compared to dense models, they also come with challenges:

Training: MoEs enable significantly more compute-efficient pretraining, but they’ve historically struggled to generalize during fine-tuning, leading to overfitting.
Inference: Although a MoE might have many parameters, only some of them are used during inference. This leads to much faster inference compared to a dense model with the same number of parameters. However, all parameters need to be loaded in RAM, so memory requirements are high. For example, [given a MoE like Mixtral 8x7B](https://huggingface.co/blog/moe), we’ll need to have enough VRAM to hold a dense 47B parameter model. Why 47B parameters and not 8 x 7B = 56B? That’s because in MoE models, only the FFN layers are treated as individual experts, and the rest of the model parameters are shared. At the same time, assuming just two experts are being used per token, the inference speed (FLOPs) is like using a 12B model (as opposed to a 14B model), because it computes 2x7B matrix multiplications, but with some layers shared (more on this soon).

If all our tokens are sent to just a few popular experts, that will make training inefficient. In a normal MoE training, the gating network converges to mostly activate the same few experts. This self-reinforces as favored experts are trained quicker and hence selected more. To mitigate this, an auxiliary loss is added to encourage giving all experts equal importance. This loss ensures that all experts receive a roughly equal number of training examples. The following sections will also explore the concept of expert capacity, which introduces a threshold of how many tokens can be processed by an expert. In transformers, the auxiliary loss is exposed via the aux_loss parameter.

image/gif

"Wait...but you called this a frankenMoE?"

The difference between MoE and "frankenMoE" lies in the fact that the router layer in a model like the one on this repo is not trained simultaneously.

Open LLM Leaderboard Evaluation Results

Detailed results can be found here

MetricValue
Avg.75.55
AI2 Reasoning Challenge (25-Shot)73.89
HellaSwag (10-Shot)88.82
MMLU (5-Shot)65.12
TruthfulQA (0-shot)71.88
Winogrande (5-shot)84.77
GSM8k (5-shot)68.84

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

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

GPU в ailist

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

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

Подбираем GPU…

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

0 моделей