/ Модель

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

Контекст
4 096 токенов
Размер весов
17 ГБ
Лицензия
Apache 2.0
Архитектура
jetmoe · dense
Базовая модель
jetmoe-8b
Опубликована
31 мар 2024

jetmoe-8b-chat

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

JetMoE-8B-Chat — дообученная разреженная языковая модель для диалогов, ответов на вопросы, генерации кода и решения математических задач.

240скачиваний за 30 дней32лайкавеса обновлены11 мая 2024

Бенчмарки

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

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

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

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

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

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

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

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

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

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

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

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

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

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

JetMoE-8B-Chat — разговорная языковая модель семейства JetMoE, созданная авторами проекта JetMoE. Это дообученная версия JetMoE-8B для диалоговой генерации текста. Архитектура включает 24 блока с разреженными слоями Mixture of Attention heads и Mixture of Experts: в каждом слое из восьми экспертов для токена активируются два. Всего модель содержит 8 млрд параметров, из которых при инференсе активны 2,2 млрд; базовая JetMoE-8B обучалась на 1,25 трлн токенов из открытых наборов данных.

Модель предназначена для диалогов, ответов на вопросы, написания кода и решения математических задач. README сообщает о сравнительных результатах на языковых и кодовых бенчмарках, однако приведённые таблицы неполны, поэтому эти заявления нельзя независимо оценить по карточке. Контекст составляет 4096 токенов. Модель принимает и генерирует текст; в метаданных заявлена возможность чата, но конкретный список поддерживаемых естественных языков не приведён.

Модель распространяется в формате Safetensors по лицензии Apache-2.0. Карточка описывает её как открытую и допускающую дообучение при ограниченных вычислительных ресурсах; практическое качество зависит от запроса и сценария применения.

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

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

Ограничения

Указанный контекст ограничен 4096 токенами. README приводит неполные таблицы бенчмарков, поэтому сравнительные заявления о качестве по карточке проверить нельзя.

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

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

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

Также подходит для

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

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

Открыть на Hugging Face

JetMoE: Reaching LLaMA2 Performance with 0.1M Dollars

Key Messages

  1. JetMoE-8B is trained with less than $ 0.1 million1 cost but outperforms LLaMA2-7B from Meta AI, who has multi-billion-dollar training resources. LLM training can be much cheaper than people previously thought.

  2. JetMoE-8B is fully open-sourced and academia-friendly because:

    • It only uses public datasets for training, and the code is open-sourced. No proprietary resource is needed.
    • It can be finetuned with very limited compute budget (e.g., consumer-grade GPU) that most labs can afford.
  3. JetMoE-8B only has 2.2B active parameters during inference, which drastically lowers the computational cost. Compared to a model with similar inference computation, like Gemma-2B, JetMoE-8B achieves constantly better performance.

1 We used a 96×H100 GPU cluster for 2 weeks, which cost ~$0.08 million.

Website: https://research.myshell.ai/jetmoe

HuggingFace: https://huggingface.co/jetmoe/jetmoe-8b

Online Demo on Lepton AI: https://www.lepton.ai/playground/chat?model=jetmoe-8b-chat

Technical Report: https://arxiv.org/pdf/2404.07413.pdf

Authors

The project is contributed by Yikang Shen, Zhen Guo, Tianle Cai and Zengyi Qin. For technical inquiries, please contact Yikang Shen. For media and collaboration inquiries, please contact Zengyi Qin.

Collaboration

If you have great ideas but need more resources (GPU, data, funding, etc.), welcome to contact MyShell.ai via Zengyi Qin. MyShell.ai is open to collaborations and are actively supporting high-quality open-source projects.

Benchmarks

We use the same evaluation methodology as in the Open LLM leaderboard. For MBPP code benchmark, we use the same evaluation methodology as in the LLaMA2 and Deepseek-MoE paper. The results are shown below:

ModelActivate ParamsTraining TokensOpen LLM Leaderboard AvgARCHellaswagMMLUTruthfulQAWinoGrandeGSM8kMBPPHumanEval
Shot2510505530
Metricacc_normacc_normaccmc2accaccPass@1Pass@1
LLaMA2-7B7B2T51.053.178.646.938.87414.520.812.8
LLaMA-13B13B1T51.456.280.947.739.576.27.622.015.8
DeepseekMoE-16B2.8B2T51.153.279.846.336.173.717.334.025.0
Gemma-2B2B2T46.448.471.841.833.166.316.928.024.4
JetMoE-8B2.2B1.25T53.048.780.549.241.770.227.834.214.6
ModelMT-Bench Score
GPT-49.014
GPT-3.5-turbo7.995
Claude-v17.923
JetMoE-8B-chat6.681
Llama-2-13b-chat6.650
Vicuna-13b-v1.36.413
Wizardlm-13b6.353
Llama-2-7b-chat6.269

To our surprise, despite the lower training cost and computation, JetMoE-8B performs even better than LLaMA2-7B, LLaMA-13B, and DeepseekMoE-16B. Compared to a model with similar training and inference computation, like Gemma-2B, JetMoE-8B achieves better performance.

Model Usage

Here's a quick example to get you started with JetMoE-8B-chat:

import torch
from transformers import pipeline, AutoTokenizer, AutoModelForCausalLM
# Initialize the model and tokenizer
model_name = "jetmoe/jetmoe-8b-chat"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(model_name, torch_dtype=torch.bfloat16, attn_implementation="eager", trust_remote_code=True)
# Check if a GPU is available and move the model to GPU if it is
if torch.cuda.is_available():
    model = model.cuda()
    print("Using GPU:", torch.cuda.get_device_name(torch.cuda.current_device()))
else:
    print("GPU is not available, using CPU instead.")
# Encode input context
messages = [
    {
        "role": "system",
        "content": "You are a friendly chatbot",
    },
    {"role": "user", "content": "How many helicopters can a human eat in one sitting?"},
 ]
tokenized_chat = tokenizer.apply_chat_template(messages, tokenize=True, add_generation_prompt=True, return_tensors="pt")
print(tokenized_chat)
# If using a GPU, move the input IDs to the GPU
if torch.cuda.is_available():
    input_ids = tokenized_chat.cuda()
# Generate text
output = model.generate(input_ids, max_length=500, num_return_sequences=1, no_repeat_ngram_size=2)
# If the output is on the GPU, move it back to CPU for decoding
if torch.cuda.is_available():
    output = output.cpu()
# Decode the generated text
generated_text = tokenizer.decode(output[0], skip_special_tokens=True)
print(generated_text)

Model Details

JetMoE-8B has 24 blocks. Each block has two MoE layers: Mixture of Attention heads (MoA) and Mixture of MLP Experts (MoE). Each MoA and MoE layer has 8 expert, and 2 experts are activated for each input token. It has 8 billion parameters in total and 2.2B active parameters. JetMoE-8B is trained on 1.25T tokens from publicly available datasets, with a learning rate of 5.0 x 10-4 and a global batch-size of 4M tokens.

Training Details

Our training recipe follows the MiniCPM's two-phases training method. Phase 1 uses a constant learning rate with linear warmup and is trained on 1 trillion tokens from large-scale open-source pretraining datasets, including RefinedWeb, Pile, Github data, etc. Phase 2 uses exponential learning rate decay and is trained on 250 billion tokens from phase 1 datasets and extra high-quality open-source datasets.

Technical Report

For more details, please refer to the JetMoE Technical Report.

JetMoE Model Index

ModelIndex
JetMoE-8B-BaseLink
JetMoE-8B-SFTLink
JetMoE-8B-ChatLink

Acknowledgement

We express our gratitude to Shengding Hu for his valuable advice on the Phase 2 data mixture. We also express our gratitude to Exabits for their assistance in setting up the GPU clusters, and to Lepton AI for their support in setting up the chat demo.

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

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

GPU в ailist

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

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

Подбираем GPU…

Класс архитектуры
JetMoEForCausalLM
Ревизия весов
962cfc4

0 моделей