/ Модель

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

Контекст
2 048 токенов
Параметры
2,1 млрд
Размер весов
47,4 ГБ
Лицензия
Apache 2.0
Архитектура
llama · MoE
Опубликована
12 дек 2023

openmoe-8b-chat

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

Диалоговая MoE-модель для генерации текстовых ответов и экспериментов с открытыми языковыми моделями.

36скачиваний за 30 дней9лайковвеса обновлены19 янв 2024

Бенчмарки

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

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

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

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

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

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

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

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

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

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

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

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

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

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

OpenMoE-8B-Chat — диалоговая языковая модель с архитектурой Mixture-of-Experts (MoE), разработанная командой проекта OpenMoE. Она предназначена для генерации ответов в чате и других текстовых задачах. По карточке, версия Chat получена supervised fine-tuning модели OpenMoE-8B, обученной на 1,1 трлн токенов, на подмножестве WildChat с ответами GPT-4. Архитектура включает 4 MoE-слоя и 32 эксперта; в метаданных указано 2,1 млрд параметров и контекст до 2048 токенов. Модель работает с текстом и распространяется в формате PyTorch.

Проект ориентирован на открытые исследования и развитие сообщества MoE; команда публикует данные, стратегии обучения, архитектуру и веса. Модель подходит для диалоговых прототипов и экспериментов с генеративными языковыми моделями. Лицензия — Apache-2.0. Результаты зависят от запроса и сценария; карточка не приводит подробных оценок качества или гарантий пригодности для конкретных применений.

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

  • ответы на сообщения в чат-боте
  • генерация диалоговых реплик
  • создание текстовых черновиков по запросу
  • эксперименты с архитектурой Mixture-of-Experts
  • исследование влияния supervised fine-tuning на диалоговую модель

Ограничения

Контекст ограничен 2048 токенами. В карточке нет подробных оценок качества; ответы могут быть неточными или неподходящими для конкретных сценариев.

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

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

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

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

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

Открыть на Hugging Face

OpenMoE-8B(Chat)

OpenMoE is a project aimed at igniting the open-source MoE community! We are releasing a family of open-sourced Mixture-of-Experts (MoE) Large Language Models.

Our project began in the summer of 2023. On August 22, 2023, we released the first batch of intermediate checkpoints (OpenMoE-base&8B), along with the data and code [Twitter]. Subsequently, the OpenMoE-8B training was completed in November, 2023. After that, we embarked on explorations on 34B scale model, which is still ongoing.

As a small student team, instead of pursuing the best model with better data, computation, and human power, we devote to fully sharing our training data, strategies, model architecture, weights, and everything we have with the community. We hope this project will promote research on this promising field and invite more contributors to work on open-sourced MoE projects together!

[2024.01.12] The paper for the project and more evaluations are underway. For more information about the model, training, and evaluations, please visit our GitHub repository.

Model Weights

Currently, three models are released in total: OpenMoE-base, OpenMoE-8B/8B-Chat, and OpenMoE-34B(at 200B tokens).

The table below lists the 8B/8B-Chat model that has completed training on 1.1T tokens.

Model NameDescription#ParamHuggingface
OpenMoE-8B(1.1T)8B MoE with comparable FLOPs of a 2B LLaMA(No SFT)8BLink
OpenMoE-8B-Chat (1.1T+SFT)OpenMoE-8B-1.1T supervised finetuned on the WildChat GPT-4 Subset8BLink

Besides, we also provide all our intermediate checkpoints(base, 8B, 34B) for research purposes.

Model NameDescription#ParamHuggingface
OpenMoE-34B-200B34B MoE with comparable FLOPs of a 7B LLaMA(No SFT)34BLink
OpenMoE-8B-200B8B MoE with comparable FLOPs of a 2B LLaMA(No SFT)8BLink
OpenMoE-8B-400B8B MoE with comparable FLOPs of a 2B LLaMA(No SFT)8BLink
OpenMoE-8B-600B8B MoE with comparable FLOPs of a 2B LLaMA(No SFT)8BLink
OpenMoE-8B-800B8B MoE with comparable FLOPs of a 2B LLaMA(No SFT)8BLink
OpenMoE-8B-1T8B MoE with comparable FLOPs of a 2B LLaMA(No SFT)8BLink
OpenMoE-base(128B)A small MoE model for debugging only637MLink
OpenLLaMA-base(128B)A dense counter-part of OpenMoE-base310MLink

The base model, which were trained using 128 billion tokens, served primarily for debugging purposes. After validating the effectiveness of our model architecture, we did not pursue further training. Consequently, their performance might not be very well, and the checkpoint are not suitable for practical applications. Better performence can be oberved from our 8B or 34B versions.

The OpenMoE-8B with 4 MoE layers and 32 experts has been trained by 1.1T tokens. The SFT version has also been released after we finetuned the OpenMoE-8B-1.1T on the wildchat dataset's GPT-4 subset. The intermediate checkpoints at 200B, 400B, 600B, 800B, 1T tokens can be used to study the training dynamics of MoE architexture.

We are still training our OpenMoE-34B, which is a MoE model with 8 MoE layer and 32 experts. We released the intermediate checkpoint trained on 200B tokens on huggingface. If you are interested in the latest checkpoint, please feel free to drop Fuzhao an email (f.xue@u.nus.edu).

Get Started

Inference with Pytorch

Our PyToch implementation is supported by Colossal AI. You can install our forked version directly for easier setup:

# Python version: 3.10.12
# Install ColossalAI
git clone --branch my_openmoe https://github.com/Orion-Zheng/ColossalAI.git
pip install ./ColossalAI
python -m pip install -r ./ColossalAI/examples/language/openmoe/requirements.txt

Then, you can inference by the following code on a A100 80GB machine.

from transformers import AutoTokenizer, AutoConfig, AutoModelForCausalLM

model_path = "ckpts/openmoe-8b-chat"
config = AutoConfig.from_pretrained(model_path)
tokenizer = AutoTokenizer.from_pretrained(model_path, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(
    model_path,
    torch_dtype=torch.bfloat16,
    trust_remote_code=True, 
    device_map='auto'
    )
query = 'Question: How do I kill a process? Answer:'
prompt = f'''<<SYS>>
You are a helpful, respectful and honest assistant.
<</SYS>>

<s>[INST] {query} [/INST]'''

inputs = tokenizer(prompt, return_tensors="pt").to('cuda')
sample = model.generate(**inputs, max_new_tokens=32)
print(tokenizer.decode(sample[0]))

If you don't have GPUs on your hand, don't worry! you can still experience our model on Colab(Note: this require a $10 Colab Pro Plan). You can experiment with OpenMoE-8B-Chat on Colab directly by this.

  • Running OpenMoE-8B requires ~49GB of memory in float32 or ~23GB in bfloat16. It can be executed on a Colab CPU High-RAM(in float32) runtime or an A100-40GB(in bfloat16) runtime, both of which require Colab Pro. The float16 precision is not recommended because sometimes it will lead to performance degradation.
  • Runing the OpenMoE-34B requries ~89GB of memory in bfloat16 or ~180GB in float32. To perform inference on multiple devices/offloading model weights to RAM, please refer to the script here.
  • A more detailed env setup script can be found here, or if you use docker, you can refer to the dockerfile here. Note: you don't need t5x and Jax dependency if you are using our huggingface ckpts without converting the jax checkpoints.

Besides, we also provide a Colab tutorial demonstrating the jax checkpoint conversion.

License

Our code is under Apache 2.0 License.

Since the models are trained on The Redpajama and The Stack dataset, please check the license of these two datasets for your model usage.

Authors

This project is currently contributed by the following authors:

Fuzhao Xue, Zian Zheng, Yao Fu, Jinjie Ni, Zangwei Zheng, Wangchunshu Zhou, Yang You

Acknowledgement

The computational resources for this project were generously provided by the Google TPU Research Cloud(TRC). We extend our heartfelt thanks to TRC for their invaluable support, which has been fundamental to the success of our work. Besides, we are extremely grateful to the ColossalAI Team for their tremendous support with the PyTorch implementation, especially Xuanlei Zhao and Wenhao Chen, making training and inference of OpenMoE on GPUs a reality.

Citation

Please cite the repo if you use the model and code in this repo.

@misc{openmoe2023,
  author = {Fuzhao Xue, Zian Zheng, Yao Fu, Jinjie Ni, Zangwei Zheng, Wangchunshu Zhou and Yang You},
  title = {OpenMoE: Open Mixture-of-Experts Language Models},
  year = {2023},
  publisher = {GitHub},
  journal = {GitHub repository},
  howpublished = {\url{https://github.com/XueFuzhao/OpenMoE}},
}

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

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

GPU в ailist

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

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

Подбираем GPU…

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

0 моделей