/ Модель

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

Контекст
4 096 токенов
Параметры
12,9 млрд
Размер весов
26 ГБ
Архитектура
llama · dense
Опубликована
14 авг 2023

Llama-2-13b-chat-dutch

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

Чат-модель на базе Llama 2, дообученная для ответов на нидерландском языке, а также для помощи с программированием.

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

Бенчмарки

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Bram Vanroy разработал Llama-2-13b-chat-dutch — чат-модель на архитектуре Llama 2 с 12,9 млрд параметров. Она основана на meta-llama/Llama-2-13b-hf: сначала модель дополнительно обучали на нидерландских данных, затем дообучили на наборах синтетических инструкций и диалогов. Контекст составляет 4096 токенов; модель принимает текст и генерирует текст.

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

  • ответы на вопросы и диалоги на нидерландском языке
  • составление и редактирование текстов на нидерландском языке
  • получение помощи по программированию в диалоговом формате

Ограничения

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

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

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

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

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

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

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

Открыть на Hugging Face

Llama-2-13b-chat-dutch

[!WARNING] ⚠️ NOTE 15/3/2024: I do not recommend the use of this model. It was created with limited compute and data. Instead, try the much more powerful Mistral-based GEITje 7B Ultra!


This model is a fine-tuned version of BramVanroy/llama2-13b-ft-mc4_nl_cleaned_tiny on the BramVanroy/dutch_chat_datasets dataset on a context of 4096 tokens. See the original meta-llama/Llama-2-13b-hf for more information, intended use, and biases.

If you use this model or refer to it, please use the following citation:

Vanroy, B. (2023). Language Resources for Dutch Large Language Modelling. https://arxiv.org/abs/2312.12852

@article{vanroy2023language,
  title={Language Resources for {Dutch} Large Language Modelling},
  author={Vanroy, Bram},
  journal={arXiv preprint arXiv:2312.12852},
  year={2023}
}

Usage

from transformers import pipeline, Conversation


chatbot = pipeline(
    "conversational",
    model="BramVanroy/Llama-2-13b-chat-dutch",
    model_kwargs={
        "device_map": "auto",
        "load_in_8bit": True
    }
)

# Ask a first question
conversation = Conversation("Wat zijn enkele kleuren van de regenboog?")
conversation = chatbot(conversation)
# assistant: De regenboog bestaat uit zeven verschillende kleuren: rood, oranje, geel, groen, blauw, indigo en violet.

# Ask a second question
conversation.add_user_input("Interessant! Hoe worden die kleuren gevormd?")
conversation = chatbot(conversation)
print(conversation)
# Conversation id: d8abbddb-6249-4699-b789-d1b42bb4fd71
# user: Wat zijn enkele kleuren van de regenboog?
# assistant: De regenboog bestaat uit zeven verschillende kleuren: rood, oranje, geel, groen, blauw, indigo en violet.
# user: Interessant! Hoe worden die kleuren gevormd?
# assistant: De kleuren van de regenboog worden gevormd door het breken van licht door waterdruppels in de atmosfeer. Elke druppel heeft een unieke grootte en vorm, waardoor het licht dat door de druppel gaat wordt gefragmenteerd en verschillende kleuren op de bodem van de druppel wordt weerkaatst.

Model description

I could not get the original Llama 2 13B to produce much Dutch, even though the description paper indicates that it was trained on a (small) portion of Dutch data. I therefore continued training the original Llama 2 13B checkpoint on Dutch data in regular CLM. In a second step I finetuned that model on a collection of synthetic (translated) instruction and chat datasets that I have collected. See their pages for licensing, usage, creation, and citation information.

This model is the result of that process. While not perfect by any means, it can perform reasonably well in Dutch depending on the prompts. It is also decent at helping with programming tasks.

Intended uses & limitations

Depending on the prompt, the model can return good results considering that it is only 13B in size and was only marginally pretrained on Dutch. That being said, the model was not trained on human feedback and contains no safe-guards so it may produce unexpected and even offensive content depending on the query. The only attempt of a safe-guard is the default prompt that it was trained on, which was

Je bent een behulpzame, respectvolle en eerlijke assistent. Antwoord altijd zo behulpzaam mogelijk. Je antwoorden mogen geen schadelijke, onethische, racistische, seksistische, gevaarlijke of illegale inhoud bevatten. Zorg ervoor dat je antwoorden sociaal onbevooroordeeld en positief van aard zijn.\n\nAls een vraag nergens op slaat of feitelijk niet coherent is, leg dan uit waarom in plaats van iets niet correct te antwoorden. Als je het antwoord op een vraag niet weet, deel dan geen onjuiste informatie.

This system message is automatically applied when you use a conversational pipeline or when you use tokenizer.apply_chat_template.

Use this model with caution and at your own risk!

Because the model was trained on synthetic data, translated with OpenAI's API, you cannot use this model to create a competitive product to theirs.

Training procedure

Trained with 4096 tokens context length. The dataset was preprocessed so that as many as possible dialogs were put in a single batch, without disrupting dialogs. In other words, a dialog was never split up over different sequences or batches. During training, the human prompts were ignored in back propagation.

Trained with LoRA targetting ["q_proj", "v_proj"] in 4 bit and merged before upload. Trained with Flash Attention as borrowed from here.

The adapters are in the adapters branch.

Training hyperparameters

The following hyperparameters were used during training:

  • learning_rate: 0.0002
  • train_batch_size: 2
  • eval_batch_size: 2
  • seed: 42
  • distributed_type: multi-GPU
  • num_devices: 4
  • gradient_accumulation_steps: 8
  • total_train_batch_size: 64
  • total_eval_batch_size: 8
  • optimizer: Adam with betas=(0.9,0.95) and epsilon=1e-08
  • lr_scheduler_type: cosine
  • lr_scheduler_warmup_ratio: 0.03
  • num_epochs: 2

Training results

Training LossEpochStepValidation Loss
1.01930.09201.1583
0.97430.17401.1339
0.91590.26601.1218
0.91310.35801.1153
0.88160.441001.1130
0.89770.521201.1069
0.90610.611401.1025
0.86720.71601.1024
0.89560.791801.0971
0.85140.872001.0995
0.83570.962201.0952
0.82941.052401.0964
0.85311.132601.0947
0.83211.222801.0951
0.83651.313001.0910
0.86161.43201.0894
0.83971.483401.0904
0.8611.573601.0880
0.81161.663801.0871
0.82851.744001.0855
0.86031.834201.0856
0.81261.924401.0848

Framework versions

  • Transformers 4.31.0
  • Pytorch 2.0.1+cu117
  • Datasets 2.14.4
  • Tokenizers 0.13.3

Open LLM Leaderboard Evaluation Results (English)

Detailed results can be found here

MetricValue
Avg.46.91
ARC (25-shot)59.3
HellaSwag (10-shot)81.45
MMLU (5-shot)55.82
TruthfulQA (0-shot)38.23
Winogrande (5-shot)76.64
GSM8K (5-shot)10.69
DROP (3-shot)6.28

Open LLM Leaderboard Evaluation Results (Dutch)

Results can be found here

MetricValue
Avg.0.43
ARC (25-shot)0.38
HellaSwag (10-shot)0.56
MMLU (5-shot)0.35
TruthfulQA (0-shot)0.44

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

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

GPU в ailist

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

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

Подбираем GPU…

Класс архитектуры
LlamaForCausalLM
Ревизия весов
8d0237b

0 моделей