/ Модель

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

Контекст
8 192 токена
Параметры
7,5 млрд
Размер весов
16,1 ГБ
Лицензия
Llama 3
Архитектура
llama · dense
Опубликована
6 июн 2024

Llama-3-ChocoLlama-8B-base

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

Базовая модель Llama, адаптированная для генерации и анализа нидерландского текста и последующего дообучения под прикладные задачи.

22скачиваний за 30 дней1лайквеса обновлены16 дек 2024

Бенчмарки

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Llama-3-ChocoLlama-8B-base — базовая языковая модель семейства ChocoLlama, разработанная Matthieu Meeus и Anthony Rathé и адаптированная для нидерландского языка. Это плотная авторегрессионная модель семейства Llama с 7,5 млрд параметров и контекстом 8192 токена; она дообучена LoRA на 17 млрд нидерландских токенов. Модель предназначена для генерации и понимания нидерландского текста, а также как основа для последующей адаптации под конкретные задачи.

Модель может служить основой для генерации и анализа нидерландских текстов о вакансиях, корпоративной отчётности и законодательстве. Это базовая, а не инструкционная модель: она не рассчитана на надёжный диалог и требует дообучения либо применения инструкционной версии для чат-сценариев. Карточка предупреждает о вероятном ухудшении работы с языками кроме нидерландского, включая английский, и об отсутствии специальной дополнительной фильтрации обучающих данных на предвзятый или вредоносный контент. Репозиторий содержит веса PyTorch; лицензия — Llama 3 Community License.

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

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

Ограничения

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

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

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

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

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

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

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

Открыть на Hugging Face

Llama-3-ChocoLlama-8B-base: Getting Started

We here present Llama-3-ChocoLlama-8B-base, a language-adapted version of Meta's Llama-3-8b, fine-tuned on 17B Dutch Llama-3 tokens (104GB) using LoRa. Note that this is a base model, not optimized for conversational behavior. If this is desired for your use-case, we recommend finetuning this model on your own Dutch data or using the instruction-finetuned version of this model, Llama-3-ChocoLlama-instruct.

Use the code below to get started with the model.

from transformers import AutoModelForCausalLM, AutoTokenizer

tokenizer = AutoTokenizer.from_pretrained('ChocoLlama/Llama-3-ChocoLlama-base')
model = AutoModelForCausalLM.from_pretrained('ChocoLlama/Llama-3-ChocoLlama-base')

Model Details

ChocoLlama is a family of open LLM's specifically adapted to Dutch, contributing to the state-of-the-art of Dutch open LLM's in their weight class.

We provide 6 variants (of which 3 base and 3 instruction-tuned models):

  • ChocoLlama-2-7B-base (link): A language-adapted version of Meta's Llama-2-7b, fine-tuned on 32B Dutch Llama-2 tokens (104GB) using LoRa.
  • ChocoLlama-2-7B-instruct (link): An instruction-tuned version of ChocoLlama-2-7B-base, fine-tuned on a collection of Dutch translations of instruction-tuning datasets, using SFT followed by DPO.
  • ChocoLlama-2-7B-tokentrans-base (link): A language-adapted version of Meta's Llama-2-7b, using a Dutch RoBERTa-based tokenizer. The token embeddings of this model were reinitialized using the token translation algorithm proposed by Remy et al.. The model was subsequently fine-tuned on the same Dutch dataset as ChocoLlama-2-7B-base, again using LoRa.
  • ChocoLlama-2-7B-tokentrans-instruct (link): An instruction-tuned version of ChocoLlama-2-7B-tokentrans-base, fine-tuned on the same dataset as ChocoLlama-2-7B-instruct, again using SFT followed by DPO.
  • Llama-3-ChocoLlama-8B-base (link): A language-adapted version of Meta's Llama-8-8B, fine-tuned on the same Dutch dataset as ChocoLlama-2-7B-base, again using LoRa.
  • Llama-3-ChocoLlama-instruct (link): An instruction-tuned version of Llama-3-ChocoLlama-8B-base, fine-tuned on the same dataset as ChocoLlama-2-7B-instruct, again using SFT followed by DPO.

For benchmark results for all models, including compared to their base models and other Dutch LLMs, we refer to our paper here.

Model Description

Model Sources

Uses

Direct Use

Since this is a base model, we do not recommend using it for your use-cases directly. We instead recommend:

  1. Fine-tuning this model to your specific use-case
  2. Leveraging the instruction-tuned version of this model

Downstream Use

Since this model is a base model, it can easily be adapted to specific use-cases that required Dutch language understanding and generation. We expect this model to be particularly useful for use-cases in the domains which were explicitly covered in our dataset, e.g. the analysis and/or generation of Dutch job descriptions, corporate filings and legislation.

Out-of-Scope Use

  • Use-cases requiring a chat-style interface: since this is a base model, it cannot be used reliably for turn-based chat interaction. Please refer to the instruction-tuned version of this model instead.
  • Use-cases requiring understanding or generation of text in languages other than Dutch: the dataset on which this model was fine-tuned does not contain data in languages other than Dutch, hence we expect significant catastrophic forgetting to have occured for English, which is the language Llama-2 was originally trained for.

Bias, Risks, and Limitations

We have taken care to include only widely used and high-quality data in our dataset. Some of this data has been filtered by the original creators. However we did not explicitly conduct any additional filtering of this dataset with regards to biased or otherwise harmful content.

Recommendations

We recommend fine-tuning this model to your curated data to maximally avoid undesirable outputs.

Training Details

Training Data

We collect a diverse set of Dutch natural language.

  1. OSCAR
    The bulk of our data comes from the Dutch portion of OSCAR, January 2023 version, based on Common Crawl. This dataset includes 93 GB of text (~28.6B tokens).

  2. Open Subtitles
    We collected Dutch text from movie subtitles, focusing on unique movies either in Dutch or with Dutch subtitles. This dataset contains 5 GB of text (~1.54B tokens) from 214k samples.

  3. Project Gutenberg
    We downloaded 970 full Dutch books from Project Gutenberg using a public scraper. The dataset includes 0.3 GB of text (~92M tokens) and is available on Hugging Face.

  4. Wikipedia
    Using the March 2023 Wikipedia dump, we included 2.5 GB of text (~769M tokens). Despite some duplication with OSCAR, Wikipedia's high quality justifies its inclusion.

  5. Job Descriptions (TechWolf)
    A sample of 750k Dutch job descriptions collected over five years from public websites, provided by TechWolf. This dataset contains 1.5 GB of text (~462M tokens).

  6. Staatsblad (Bizzy)
    A sample of 80k legal filings from Het Belgisch Staatsblad. Documents were OCR-processed, and personal data was excluded. This dataset includes 1.4 GB of text (~431M tokens), collected with help from Bizzy.

  7. Legislation (ML6)
    15k documents from Flemish legislation accessed via the Open Data API. This dataset contains 0.2 GB of text (~62M tokens), collected with support from ML6.

Training Procedure

This model was fine-tuned using low-rank (LoRa) adapatation with trainable embeddings, for a total of 1.07B trainable parameters.

Training Hyperparameters

  • Training regime: bf16 non-mixed precision
  • Epochs: 1
  • LoRa parameters:
    • R: 8
    • Alpha: 32
    • Trainable modules: q_proj, v_proj, k_proj, o_proj, gate_proj, up_proj, down_proj, embed_tokens, lm_head
    • LoRa dropout: 0.05
  • Learning Rate:
    • Scheduler: StepLR
    • Step size: 6212
    • Learning rate: 0.0003
    • Gamma: 0.85
  • Other parameters:
    • Minibatch size: 16
    • Gradient accumulation steps: 8
    • Parallelization factor: 8
    • Weight decay: 0

Evaluation

Quantitative evaluation

We have evaluated our models on several industry-standard Dutch benchmarks, translated from their original versions. The results can be found in the table below, together with results from several other prominent Dutch models.

ModelARCHellaSwagMMLUTruthfulQAAvg.
Llama-3-ChocoLlama-instruct0.480.660.490.490.53
llama-3-8B-rebatch0.440.640.460.480.51
llama-3-8B-instruct0.470.590.470.520.51
llama-3-8B0.440.640.470.450.5
Reynaerde-7B-Chat0.440.620.390.520.49
Llama-3-ChocoLlama-base0.450.640.440.440.49
zephyr-7b-beta0.430.580.430.530.49
geitje-7b-ultra0.400.660.360.490.48
ChocoLlama-2-7B-tokentrans-instruct0.450.620.340.420.46
mistral-7b-v0.10.430.580.370.450.46
ChocoLlama-2-7B-tokentrans-base0.420.610.320.430.45
ChocoLlama-2-7B-instruct0.360.570.330.45**0.43
ChocoLlama-2-7B-base0.350.560.310.430.41
llama-2-7b-chat-hf0.360.490.330.440.41
llama-2-7b-hf0.360.510.320.410.40

On average, Llama-3-ChocoLlama-instruct surpasses the previous state-of-the-art on these benchmarks.

Qualitative evaluation

In our paper, we also provide an additional qualitative evaluation of all models - which we empirically find more reliable. For details, we refer to the paper and to our benchmark ChocoLlama-Bench.

Compute Infrastructure

All ChocoLlama models have been trained on the compute cluster provided by the Flemish Supercomputer Center (VSC). We used 8 to 16 NVIDIA A100 GPU's with 80 GB of VRAM.

Citation

If you found this useful for your work, kindly cite our paper:

@article{meeus2024chocollama,
  title={ChocoLlama: Lessons Learned From Teaching Llamas Dutch},
  author={Meeus, Matthieu and Rath{\'e}, Anthony and Remy, Fran{\c{c}}ois and Delobelle, Pieter and Decorte, Jens-Joris and Demeester, Thomas},
  journal={arXiv preprint arXiv:2412.07633},
  year={2024}
}

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

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

GPU в ailist

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

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

Подбираем GPU…

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

0 моделей