Downloads · 30 days
33
2% of all-time downloads
ChocoLlama/ChocoLlama-2-7B-base
ChocoLlama-2-7B-base is a text generation model from ChocoLlama. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as llama2.
<p align="center" style="margin:0;padding:0" <img src="./chocollamalogo.png" alt="ChocoLlama logo" width="500" style="margin-left: auto; margin-right: auto; display: block;"/ </p <div style="margin:auto; text-align:ce…
Downloads · 30 days
33
2% of all-time downloads
All-time downloads
1.4K
Public
Parameters
6.7B
13.5 GB on disk
Likes
2
Public
Click a slice to open those files.
.safetensors13.5 GB · 100%
From the Hugging Face model README
We here present ChocoLlama-2-7B-base, a language-adapted version of Meta's Llama-2-7b, fine-tuned on 32B Dutch Llama-2 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, ChocoLlama-2-7B-instruct.
Use the code below to get started with the model.
from transformers import AutoModelForCausalLM, AutoTokenizer
tokenizer = AutoTokenizer.from_pretrained('ChocoLlama/ChocoLlama-2-7B-base')
model = AutoModelForCausalLM.from_pretrained('ChocoLlama/ChocoLlama-2-7B-base')
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):
For benchmark results for all models, including compared to their base models and other Dutch LLMs, we refer to our paper here.
Since this is a base model, we do not recommend using it for your use-cases directly. We instead recommend:
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.
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.
We recommend fine-tuning this model to your curated data to maximally avoid undesirable outputs.
We collect a diverse set of Dutch natural language.
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).
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.
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.
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.
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).
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.
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.
This model was fine-tuned using low-rank (LoRa) adapatation with trainable embeddings, for a total of 544M trainable parameters.
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.
| Model | ARC | HellaSwag | MMLU | TruthfulQA | Avg. |
|---|---|---|---|---|---|
| Llama-3-ChocoLlama-instruct | 0.48 | 0.66 | 0.49 | 0.49 | 0.53 |
| llama-3-8B-rebatch | 0.44 | 0.64 | 0.46 | 0.48 | 0.51 |
| llama-3-8B-instruct | 0.47 | 0.59 | 0.47 | 0.52 | 0.51 |
| llama-3-8B | 0.44 | 0.64 | 0.47 | 0.45 | 0.5 |
| Reynaerde-7B-Chat | 0.44 | 0.62 | 0.39 | 0.52 | 0.49 |
| Llama-3-ChocoLlama-base | 0.45 | 0.64 | 0.44 | 0.44 | 0.49 |
| zephyr-7b-beta | 0.43 | 0.58 | 0.43 | 0.53 | 0.49 |
| geitje-7b-ultra | 0.40 | 0.66 | 0.36 | 0.49 | 0.48 |
| ChocoLlama-2-7B-tokentrans-instruct | 0.45 | 0.62 | 0.34 | 0.42 | 0.46 |
| mistral-7b-v0.1 | 0.43 | 0.58 | 0.37 | 0.45 | 0.46 |
| ChocoLlama-2-7B-tokentrans-base | 0.42 | 0.61 | 0.32 | 0.43 | 0.45 |
| ChocoLlama-2-7B-instruct | 0.36 | 0.57 | 0.33 | 0.45 | **0.43 |
| ChocoLlama-2-7B-base | 0.35 | 0.56 | 0.31 | 0.43 | 0.41 |
| llama-2-7b-chat-hf | 0.36 | 0.49 | 0.33 | 0.44 | 0.41 |
| llama-2-7b-hf | 0.36 | 0.51 | 0.32 | 0.41 | 0.40 |
On average, Llama-3-ChocoLlama-instruct surpasses the previous state-of-the-art on these benchmarks.
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.
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.
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}
}