Downloads · 30 days
16
2% of all-time downloads
robinsmits/open_llama_7b_alpaca_clean_dutch_qlora
open_llama_7b_alpaca_clean_dutch_qlora is a text generation model from robinsmits. Use it when you need the model to write or continue text. It is set up for peft. The card lists the license as cc-by-nc-4.0.
This adapter model is a fine-tuned version of openlm-research/openllama7b. Finetuning was performed on the Dutch BramVanroy/alpaca-cleaned-dutch dataset which contains 52K of records with instruction following-data tr…
Downloads · 30 days
16
2% of all-time downloads
All-time downloads
913
Public
Repo size
17.4 MB
Likes
1
Public
Click a slice to open those files.
.bin16.8 MB · 97%
From the Hugging Face model README
This adapter model is a fine-tuned version of openlm-research/open_llama_7b. Finetuning was performed on the Dutch BramVanroy/alpaca-cleaned-dutch dataset which contains 52K of records with instruction following-data translated from English to Dutch.
See openlm-research/open_llama_7b for all information about the base model.
A basic example of how to use the finetuned model.
import torch
from peft import PeftModel, PeftConfig
from transformers import AutoModelForCausalLM, AutoTokenizer
model_name = "robinsmits/open_llama_7b_alpaca_clean_dutch_qlora"
tokenizer = AutoTokenizer.from_pretrained(model_name, use_fast = False, add_eos_token = True)
config = PeftConfig.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(config.base_model_name_or_path, load_in_8bit = True, device_map = "auto")
model = PeftModel.from_pretrained(model, model_name)
prompt = "### Instructie:\nWat zijn de drie belangrijkste softwareonderdelen die worden gebruikt bij webontwikkeling?\n\n### Antwoord:\n"
inputs = tokenizer(prompt, return_tensors = "pt", truncation = True).input_ids.cuda()
sample = model.generate(input_ids = inputs, max_new_tokens = 512, num_beams = 2, early_stopping = True, eos_token_id = tokenizer.eos_token_id)
output = tokenizer.decode(sample[0], skip_special_tokens = True)
print(output.split(prompt)[1])
The prompt and generated output for the above mentioned example is similar to the output shown below.
### Instructie:
Wat zijn de drie belangrijkste softwareonderdelen die worden gebruikt bij webontwikkeling?
### Antwoord:
</br>
De drie belangrijkste softwareonderdelen die worden gebruikt bij webontwikkeling zijn HTML, CSS en JavaScript.
For more extensive usage and a lot of generated samples (both good and bad samples) see the following Inference Notebook
The open_llama_7b model was primarily trained on the English language. Part of the dataset was a Wikipedia dump containing pages in 20 languages. Dutch was one of those languages. Given the size of the total dataset and the wikipedia part the Dutch language was very likely less than 0.5% of the total data.
The generated output and performance of this model for the Dutch language is very likely not always comparable to the various Open-Llama models that have been finetuned on English Alpaca datasets.
The primary intention of this model is to explore and research the use of the Dutch language in combination with an Open LLM model.
This model was trained on the BramVanroy/alpaca-cleaned-dutch dataset.
Based on the dataset license only Non-Commercial use is allowed. Commercial use is strictly forbidden.
@misc{vanroy2023language,
title={Language Resources for {Dutch} Large Language Modelling},
author={Bram Vanroy},
year={2023},
eprint={2312.12852},
archivePrefix={arXiv},
primaryClass={cs.CL}
}
This model was finetuned with a QLoRA setup on a Google Colab A100 GPU in about 6.5 hours.
The notebook used for training can be found here: Training Notebook
The following hyperparameters were used during training:
The following bitsandbytes quantization config was used during training:
| Training Loss | Epoch | Step | Validation Loss |
|---|---|---|---|
| 1.1240 | 1.0 | 768 | 1.1227 |
| 1.0177 | 2.0 | 1536 | 1.0645 |