/ Модель

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

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

Breeze-7B-Instruct-v0_1

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

Диалоговая модель MediaTek Research на базе Mistral для генерации текста, ответов на вопросы и суммаризации преимущественно на традиционном китайском и английском языках.

234скачиваний за 30 дней91лайквеса обновлены24 апр 2024

Бенчмарки

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Breeze-7B-Instruct-v0_1 — диалоговая языковая модель MediaTek Research, построенная на архитектуре Mistral и дообученная на базе MediaTek-Research/Breeze-7B-Base-v0_1. Модель содержит 7,2 млрд параметров и предназначена прежде всего для традиционного китайского языка, также поддерживает английский. В версии v0.1 словарь расширен до 62 тысяч токенов для лучшей работы с традиционным китайским; метаданные указывают контекст до 32 768 токенов.

Модель рассчитана на использование без дополнительной настройки в типовых сценариях: ответы на вопросы, многошаговый диалог, суммаризация и генерация текста. Её можно применять для ответов по документам в системах RAG. Разработчики сообщают о хороших результатах в бенчмарках на традиционном китайском и английском по сравнению с моделями похожего размера.

README отмечает, что для диалога нет специальной обработки вредоносных запросов, поэтому модель может отвечать на них без защитных механизмов. Лицензия — Apache-2.0. Описанная в карточке версия v0.1 не является текущим выпуском Breeze-7B: README указывает на v1.0 как более позднюю версию.

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

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

Ограничения

В модели нет специальной обработки вредоносных запросов. README сообщает, что более поздний выпуск семейства — v1.0.

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

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

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

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

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

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

Открыть на Hugging Face

Model Card for MediaTek Research Breeze-7B-Instruct-v0_1

MediaTek Research Breeze-7B (hereinafter referred to as Breeze-7B) is a language model family that builds on top of Mistral-7B, specifically intended for Traditional Chinese use.

Breeze-7B-Base is the base model for the Breeze-7B series. It is suitable for use if you have substantial fine-tuning data to tune it for your specific use case.

Breeze-7B-Instruct derives from the base model Breeze-7B-Base, making the resulting model amenable to be used as-is for commonly seen tasks.

Breeze-7B-Instruct-64k is a slightly modified version of Breeze-7B-Instruct to enable a 64k-token context length. Roughly speaking, that is equivalent to 88k Traditional Chinese characters.

Update (Feb. 21st, 2024): Breeze-7B-Instruct-64k-v0_1 has been temporarily removed from Hugging Face due to its actual performance in long context tests not meeting expectations.

Update (Mar. 7th, 2024): The current release version of Breeze-7B is v1.0. See Breeze-7B-Instruct-v1_0.

The current release version of Breeze-7B is v0.1.

Practicality-wise:

  • Breeze-7B-Base expands the original vocabulary with additional 30,000 Traditional Chinese tokens. With the expanded vocabulary, everything else being equal, Breeze-7B operates at twice the inference speed for Traditional Chinese to Mistral-7B and Llama 7B. [See Inference Performance.]
  • Breeze-7B-Instruct can be used as is for common tasks such as Q&A, RAG, multi-round chat, and summarization.
  • In particular, Breeze-7B-Instruct-64k can perform tasks at a document level, not a chapter level.

Performance-wise:

  • Breeze-7B-Instruct demonstrates impressive performance in benchmarks for Traditional Chinese and English, when compared to similar sized open-source contemporaries such as Taiwan-LLM-7B/13B-chat, QWen-7B-Chat, and Yi-6B-Chat. [See Chat Model Performance.]

A project by the members (in alphabetical order): Chan-Jan Hsu 許湛然, Chang-Le Liu 劉昶樂, Feng-Ting Liao 廖峰挺, Po-Chun Hsu 許博竣, Yi-Chang Chen 陳宜昌, and the supervisor Da-Shan Shiu 許大山.

Features

  • Breeze-7B-Base-v0_1
    • Expanding the vocabulary dictionary size from 32k to 62k to better support Traditional Chinese
    • 8k-token context length
  • Breeze-7B-Instruct-v0_1
    • Expanding the vocabulary dictionary size from 32k to 62k to better support Traditional Chinese
    • 8k-token context length
    • Multi-turn dialogue (without special handling for harmfulness)
  • Breeze-7B-Instruct-64k-v0_1
    • Expanding the vocabulary dictionary size from 32k to 62k to better support Traditional Chinese
    • 64k-token context length
    • Multi-turn dialogue (without special handling for harmfulness)

Model Details

  • Breeze-7B-Base-v0_1
    • Finetuned from: mistralai/Mistral-7B-v0.1
    • Model type: Causal decoder-only transformer language model
    • Language: English and Traditional Chinese (zh-tw)
  • Breeze-7B-Instruct-v0_1
  • Breeze-7B-Instruct-64k-v0_1

Base Model Performance

TMMLU+, DRCD, and Table source from MediaTek-Research/TCEval-v2. MediaTek-Research/TCEval-v2 derives from TCEval-v1 and ikala/tmmluplus. MMLU sources from hails/mmlu_no_train. We use the code revised from EleutherAI/lm-evaluation-harness to evaluate TMMLU+, DRCD, Table, and MMLU. All choice problems adapt the selection by the log-likelihood.

Models↑ TMMLU+ (ACC)DRCD (EM)Table (ACC)MMLU (ACC)
TC, KnowledgeTC, ReasoningTC, ReasoningEN, Knowledge
5 shot3 shot5 shot5 shot
Yi-34B34B63.1084.5749.3177.42
Qwen-14B14B51.3016.95 *50.6968.83
Yi-6B6B49.6376.6134.7265.35
Qwen-7B7B42.840.0 *39.5861.00
Breeze-7B-Base-v0_17B40.3581.1328.4761.63
Mistral-7B-v0.17B36.9379.2727.7864.89

* Few-shot learning cannot effectively guide the model to generate the proper answer.

Chat Model Performance

TMMLU+, DRCD, Table, and MT-Bench-tw source from MediaTek-Research/TCEval-v2. MediaTek-Research/TCEval-v2 derives from TCEval-v1 and ikala/tmmluplus. MMLU sources from hails/mmlu_no_train. MT-Bench source from lmsys/mt_bench_human_judgments. We use the code revised from EleutherAI/lm-evaluation-harness to evaluate TMMLU+, DRCD, Table, and MMLU. All choice problems adapt the selection by the log-likelihood. We use the code revised from fastchat llm_judge (GPT4 as judge) to evaluate MT-Bench-tw and MT-Bench.

Models↑ MT-Bench-tw (Score)TMMLU+ (ACC)TMMLU+ (ACC)DRCD (EM)Table (ACC)MT-Bench (Score)MMLU (ACC)MMLU (ACC)
TC, ChatTC, KnowledgeTC, KnowledgeTC, ReasoningTC, ReasoningEN, ChatEN, KnowledgeEN, Knowledge
0 shot0 shot5 shot3 shot0 shot0 shot0 shot5 shot
gpt-3.5-turbo7.143.5645.147.967.09
Yi-34B-Chat34B6.954.8736.817.671.04
Qwen-14B-Chat14B6.448.4141.677.264.91
Breeze-7B-Instruct-v0_17B5.741.6145.837.163.26
Breeze-7B-Instruct-64k-v0_17B5.540.9936.117.163.68
Qwen-7B-Chat7B5.440.0233.336.255.94
Yi-6B-Chat6B5.044.7925.696.059.45
Taiwan-LLM-13B-v2.0-chat13B5.029.4723.61-*50.50
Taiwan-LLM-7B-v2.1-chat7B4.228.0831.25-*42.72

* Taiwan-LLM models responds to multi-turn questions (English) in Traditional Chinese.

Details on MT-Bench-tw (0 shot):ModelsSTEMExtractionReasoningMathCodingRoleplayWritingHumanities↑ AVG
gpt-3.5-turbo7.86.15.16.46.28.77.49.37.1
Yi-34B-Chat9.04.85.74.04.78.58.79.86.9
Qwen-14B-Chat7.65.74.54.25.37.57.39.16.4
Breeze-7B-Instruct-v0_16.55.63.93.64.36.95.79.35.7
Breeze-7B-Instruct-64k-v0_16.15.33.72.94.27.06.78.35.5
Qwen-7B-Chat6.64.54.82.93.66.26.88.25.4
Yi-6B-Chat7.32.73.13.32.37.25.28.85.0
Taiwan-LLM-13B-v2.0-chat6.13.44.12.33.17.46.66.85.0
Taiwan-LLM-7B-v2.1-chat5.22.62.31.23.46.65.76.84.2
Details on TMMLU+ (0 shot):ModelSTEMSocial ScienceHumanitiesOther↑ AVG
Yi-34B-Chat47.6564.2552.7354.9154.87
Qwen-14B-Chat43.8355.0048.5546.2248.41
Yi-6B-Chat37.8051.7445.3644.2544.79
gpt-3.5-turbo41.5848.5240.9643.1843.56
Breeze-7B-Instruct-v0_137.4146.8142.0640.1641.61
Breeze-7B-Instruct-64k-v0_137.8846.3540.3139.4040.99
Qwen-7B-Chat35.4446.2238.3540.0640.02
Taiwan-LLM-13B-v2.0-chat27.7433.6927.0329.4329.47
Taiwan-LLM-7B-v2.1-chat25.5831.7627.3627.6128.08

Inference Performance

In this test, we use the first 700 characters of the web article as the input and ask the model to write the same article again. All inferences run on 2 RTX A6000 GPUs (using vllm, with a tensor-parallel size of 2).

Models↓ Inference Time (sec)Estimated Max Input Length (Char)
Yi-6B-Chat10.625.2k
Breeze-7B-Instruct-v0_110.7411.1k
Breeze-7B-Instruct-64k-v0_110.7488.8k
Qwen-7B-Chat10.869.8k
Qwen-14B-Chat18.899.8k
Mistral-7B-v0.1-Instruct20.485.1k
Taiwan-LLM-7B-v2.1-chat26.262.2k
Taiwan-LLM-13B-v2.0-chat36.802.2k
Yi-34B-Chat43.714.5k

Long-context Performance

TBD

Use in Transformers

First install direct dependencies:

pip install transformers torch accelerate

If you want faster inference using flash-attention2, you need to install these dependencies:

pip install packaging ninja
pip install flash-attn

Then load the model in transformers:

from transformers import AutoModelForCausalLM, AutoTokenizer
import torch

model = AutoModelForCausalLM.from_pretrained(
    "MediaTek-Research/Breeze-7B-Instruct-v0_1",
    device_map="auto",
    torch_dtype=torch.bfloat16,
    attn_implementation="flash_attention_2" # optional
)

The structure of the query is

<s>SYS_PROMPT   [INST] QUERY1 [/INST] RESPONSE1 [INST] QUERY2 [/INST] 

where SYS_PROMPT, QUERY1, RESPONSE1, and QUERY2 can be provided by the user.

The suggested default SYS_PROMPT is

You are a helpful AI assistant built by MediaTek Research. The user you are helping speaks Traditional Chinese and comes from Taiwan.

We also integrate chat_template into tokenizer_config.json, so you can apply_chat_template to get the prompt.

>>> from transformers import AutoTokenizer
>>> tokenizer = AutoTokenizer.from_pretrained("MediaTek-Research/Breeze-7B-Instruct-v0_1")
>>> chat = [
...   {"role": "user", "content": "你好,請問你可以完成什麼任務?"},
...   {"role": "assistant", "content": "你好,我可以幫助您解決各種問題、提供資訊和協助您完成許多不同的任務。例如:回答技術問題、提供建議、翻譯文字、尋找資料或協助您安排行程等。請告訴我如何能幫助您。"},
...   {"role": "user", "content": "太棒了!"},
... ]
>>> tokenizer.apply_chat_template(chat, tokenize=False)
"<s>You are a helpful AI assistant built by MediaTek Research. The user you are helping speaks Traditional Chinese and comes from Taiwan.   [INST] 你好,請問你可以完成什麼任務? [/INST] 你好,我可以幫助您解決各種問題、提供資訊和協助您完成許多不同的任務。例如:回答技術問題、提供建議、翻譯文字、尋找資料或協助您安排行程等。請告訴我如何能幫助您。 [INST] 太棒了! [/INST] "
# Tokenized results
# ['▁', '你好', ',', '請問', '你', '可以', '完成', '什麼', '任務', '?']
# ['▁', '你好', ',', '我', '可以', '幫助', '您', '解決', '各種', '問題', '、', '提供', '資訊', '和', '協助', '您', '完成', '許多', '不同', '的', '任務', '。', '例如', ':', '回答', '技術', '問題', '、', '提供', '建議', '、', '翻譯', '文字', '、', '尋找', '資料', '或', '協助', '您', '安排', '行程', '等', '。', '請', '告訴', '我', '如何', '能', '幫助', '您', '。']
# ['▁', '太', '棒', '了', '!']

Citation

@article{MediaTek-Research2024breeze7b,
      title={Breeze-7B Technical Report}, 
      author={Chan-Jan Hsu and Chang-Le Liu and Feng-Ting Liao and Po-Chun Hsu and Yi-Chang Chen and Da-Shan Shiu},
      year={2024},
      eprint={2403.02712},
      archivePrefix={arXiv},
      primaryClass={cs.CL}
}

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

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

GPU в ailist

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

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

Подбираем GPU…

Класс архитектуры
MistralForCausalLM
Ревизия весов
1be71d1

0 моделей