/ Модель

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

Контекст
32 768 токенов
Параметры
7,1 млрд
Размер весов
14,5 ГБ
Лицензия
CC BY-NC 4.0
Архитектура
mistral · dense
Базовая модель
GEITje-7B-ultra-sft
Опубликована
27 янв 2024

GEITje-7B-ultra

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

Нидерландоязычная чат-модель на базе Mistral 7B, дообученная с помощью DPO для диалогов и ответов на инструкции.

435скачиваний за 30 дней53лайкавеса обновлены6 дек 2024

Бенчмарки

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

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

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

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

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

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

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

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

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

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

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

  • GPQA

    GPQA Raw · выше — лучше

    Результат

    0,2626

    Open LLM v2 · архив

    Публичная таблицадругая ревизия

  • MATH Lvl 5

    MATH Lvl 5 Raw · выше — лучше

    Результат

    0,0159

    Open LLM v2 · архив

    Публичная таблицадругая ревизия

  • BBH

    BBH Raw · выше — лучше

    Результат

    0,3776

    Open LLM v2 · архив

    Публичная таблицадругая ревизия

  • MMLU-PRO

    MMLU-PRO Raw · выше — лучше

    Результат

    0,2011

    Open LLM v2 · архив

    Публичная таблицадругая ревизия

  • IFEval

    IFEval Raw · выше — лучше

    Результат

    0,3723

    Open LLM v2 · архив

    Публичная таблицадругая ревизия

  • MUSR

    MUSR Raw · выше — лучше

    Результат

    0,329

    Open LLM v2 · архив

    Публичная таблицадругая ревизия

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

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

GEITje 7B ultra — нидерландоязычная диалоговая модель Bram Vanroy для выполнения инструкций и общения. Это плотная модель MistralForCausalLM на 7,1 млрд параметров, дообученная методом DPO на синтетических данных обратной связи объёмом около 56 млн токенов. Она продолжает SFT-модель BramVanroy/GEITje-7B-ultra-sft, которая восходит к GEITje и Mistral 7B. Модель принимает текст и генерирует текст; контекст — до 32 768 токенов, формат весов в репозитории — safetensors.

Модель ориентирована прежде всего на диалоги и ответы на инструкции на нидерландском языке. Автор сообщает о небольшом среднем улучшении относительно предыдущих моделей GEITje, но подчёркивает, что приведённые тесты ненадёжны. Ответы могут быть ошибочными, вводящими в заблуждение или оскорбительными. Из-за использования синтетических данных, созданных с помощью сервисов OpenAI/Azure, коммерческое применение запрещено; лицензия — CC BY-NC 4.0.

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

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

Ограничения

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

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

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

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

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

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

Открыть на Hugging Face

This model is a fine-tuned version of BramVanroy/GEITje-7B-ultra-sft on a synthetic DPO dataset of around 56M tokens that was generated with gpt-4-turbo and Rijgersberg/GEITje-7B-chat for Dutch.

[!TIP] 🚀 Looking for the fast GGUF version? You can find it, and how to use it with ollama, here. 🚀

Citation

If you use GEITje 7B Ultra (SFT) or any of its derivatives or quantizations, place cite the following paper:

@misc{vanroy2024geitje7bultraconversational,
      title={GEITje 7B Ultra: A Conversational Model for Dutch}, 
      author={Bram Vanroy},
      year={2024},
      eprint={2412.04092},
      archivePrefix={arXiv},
      primaryClass={cs.CL},
      url={https://arxiv.org/abs/2412.04092}, 
}

Model description

This is a Dutch instruction/chat model ultimately based on Mistral and aligned with AI feedback via DPO. It is a DPO continuation of the SFT trained BramVanroy/GEITje-7B-ultra-sft, which in turn is based on Rijgersberg/GEITje-7B, which in turn is based on Mistral 7B and further pretrained on Dutch data. In (rather naive) benchmarks it outperforms all the original GEITje models on average (but barely). However, note that these benchmarks should be taken with a massive grain of salt (see the disclaimer below the benchmarks on that page). The best evaluation is to try the models and see for yourself.

Usage

One-off:

from transformers import pipeline, Conversation

# load_in_8bit: lower precision but saves a lot of GPU memory
# device_map=auto: loads the model across multiple GPUs
chatbot = pipeline("conversational", model="BramVanroy/GEITje-7B-ultra", model_kwargs={"load_in_8bit": True}, device_map="auto")

start_messages = [
    {"role": "system", "content": "Je bent een grappige chatbot die Bert heet. Je maakt vaak mopjes."},
    {"role": "user", "content": "Hallo, ik ben Bram. Ik wil vanavond graag een film kijken. Heb je enkele suggesties?"}
]
conversation = Conversation(start_messages)
conversation = chatbot(conversation)
response = conversation.messages[-1]["content"]
print(response)

Interactive conversation:

from transformers import pipeline, Conversation

# load_in_8bit: lower precision but saves a lot of memory
# device_map=auto: loads the model across multiple GPUs
# attn_implementation: uses flash attention, if your device supports it - otherwise remove it
chatbot = pipeline("conversational", model="BramVanroy/GEITje-7B-ultra", model_kwargs={"load_in_8bit": True, "attn_implementation": "flash_attention_2"}, device_map="auto")

while (system_message := input("System message ('q' to quit): ")) != "q":
    start_messages = [
        {"role": "system", "content": system_message},
    ]
    conversation = Conversation(start_messages)
    while (user_input := input("User ('r' to reset): ")) != "r":
        conversation.add_user_input(user_input)
        conversation = chatbot(conversation)
        response = conversation.messages[-1]["content"]
        print("Assistant:", response)

Intended uses & limitations

Although the model has been aligned with gpt-4-turbo output, which has strong content filters, the model could still generate wrong, misleading, and potentially even offensive content. Use at your own risk.

Because the model was trained on synthetic data created with OpenAI/Azure services, this model cannot be used for commercial purposes.

Training and evaluation data

The training data consists of a synthetic dataset based on UltraFeedback binarized created with gpt-4-turbo and geitje-chat. A given prompt, translated from the original dataset, is given to the two models who then generated an answer. Then, gpt-4-turbo is always selected as the best answer which DPO will optimise for. While this is not completely fair, I did not have the budget to actually have gpt-4 rate both replies. Furthermore, while an impressive model, GEITje chat still seems behind gpt-4-turbo in the testing that I have done.

In total the dataset consists of 56,137,090 tokens (combination of prompt + rejected + chosen) and a test set of 6,178,969 tokens (11.00%).

Training procedure

The great alignment handbook was used for training, with a custom slurm script for compatibility with our cluster. It was trained in full, without LoRA or other adapters.

The model was trained in bfloat16 with flash attention 2 on two nodes of four A100 80GB each for around 11 hours. I thank the Flemish Super Computer for their compute.

For conversational usage, the model relies on the Zephyr chat template, which is compatible with system messages. A small portion of the data of *-sft contained system messages, so it is assumed the model can handle system messages at least a little bit.

In earlier iterations I found that using the alignment handbook's defaults (beta=0.01) led to poor results (hallucinations of random tokens). After investigating, it seems that such a low beta does not work well for this dataset as it gives the model too much room to deviate from its initial base model. After a hyperparameter search and manual analysis of the resulting metrics, I selected the current model as the best one, with a beta of 0.1.

Recipe used with the handbook:

# Model arguments
model_name_or_path: BramVanroy/GEITje-7B-ultra-sft
model_revision: main
torch_dtype: bfloat16
use_flash_attention_2: true

# Data training arguments
# For definitions, see: src/h4/training/config.py
dataset_mixer:
  BramVanroy/ultra_feedback_dutch: 1.0
dataset_splits:
- train_prefs
- test_prefs
preprocessing_num_workers: 8

# DPOTrainer arguments
bf16: true
beta: 0.1
do_eval: true
evaluation_strategy: steps
eval_steps: 100
gradient_accumulation_steps: 4
gradient_checkpointing: true
gradient_checkpointing_kwargs:
  use_reentrant: False
hub_model_id: BramVanroy/GEITje-ultra
learning_rate: 5.0e-7
log_level: info
logging_steps: 10
lr_scheduler_type: cosine
max_length: 2048
max_prompt_length: 1536
num_train_epochs: 1
optim: adamw_torch
output_dir: data/GEITje-ultra
per_device_train_batch_size: 4
per_device_eval_batch_size: 4
push_to_hub: true
save_strategy: "steps"
save_steps: 100
save_total_limit: 3
seed: 42
warmup_ratio: 0.1

Training hyperparameters

The following hyperparameters were used during training:

  • learning_rate: 5e-07
  • train_batch_size: 4
  • eval_batch_size: 4
  • seed: 42
  • distributed_type: multi-GPU
  • num_devices: 8
  • gradient_accumulation_steps: 4
  • total_train_batch_size: 128
  • total_eval_batch_size: 32
  • optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
  • lr_scheduler_type: cosine
  • lr_scheduler_warmup_ratio: 0.1
  • num_epochs: 1.0

Training results

Training LossEpochStepValidation LossRewards/chosenRewards/rejectedRewards/accuraciesRewards/marginsLogps/rejectedLogps/chosenLogits/rejectedLogits/chosen
0.030.221000.0260-0.9740-9.86350.99138.8895-524.8940-508.1891-3.0753-3.0315
0.01840.442000.0164-1.7162-12.47720.992610.7610-551.0317-515.6115-3.0349-2.9873
0.01210.663000.0142-2.0575-13.68180.993811.6244-563.0778-519.0242-3.0325-2.9835
0.01980.884000.0139-2.1431-13.88570.995011.7426-565.1163-519.8801-3.0293-2.9801

Framework versions

  • Transformers 4.36.2
  • Pytorch 2.1.2+cu121
  • Datasets 2.14.6
  • Tokenizers 0.15.0

Open LLM Leaderboard Evaluation Results

Results for the English Open LLM Leaderboard. For results specific to Dutch, check out ScandEval.

Detailed results can be found here

MetricValue
Avg.10.91
IFEval (0-Shot)37.23
BBH (3-Shot)12.88
MATH Lvl 5 (4-Shot)0.91
GPQA (0-shot)1.68
MuSR (0-shot)1.52
MMLU-PRO (5-shot)11.24

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

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

GPU в ailist

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

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

Подбираем GPU…

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

0 моделей