Downloads · 30 days
13
3% of all-time downloads
robinsmits/polylm_13b_ft_alpaca_clean_dutch
polylm_13b_ft_alpaca_clean_dutch 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 DAMO-NLP-MT/polylm-13b-fine-grained-shards. It achieves the following results on the evaluation set: - Loss: 1.3839
Downloads · 30 days
13
3% of all-time downloads
All-time downloads
429
Public
Repo size
83.6 MB
Likes
1
Public
Click a slice to open those files.
.bin26.2 MB · 85%
From the Hugging Face model README
This adapter model is a fine-tuned version of DAMO-NLP-MT/polylm-13b-fine-grained-shards. It achieves the following results on the evaluation set:
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 DAMO-NLP-MT/polylm-13b-fine-grained-shards for all information about the base model.
A basic example of how to use the finetuned model.
import torch
from peft import AutoPeftModelForCausalLM
from transformers import AutoModelForCausalLM, AutoTokenizer
model_name = "robinsmits/polylm_13b_ft_alpaca_clean_dutch"
tokenizer = AutoTokenizer.from_pretrained(model_name, use_fast = False, legacy = False)
model = AutoPeftModelForCausalLM.from_pretrained(model_name, device_map = "auto", load_in_4bit = True, torch_dtype = torch.bfloat16)
prompt = "### Instructie:\nWat zijn de drie belangrijkste softwareonderdelen die worden gebruikt bij webontwikkeling?\n\n### Antwoord:\n"
inputs = tokenizer(prompt, return_tensors = "pt")
sample = model.generate(input_ids = inputs.input_ids.cuda(),
attention_mask = inputs.attention_mask.cuda(),
max_new_tokens = 128,
do_sample = True,
top_p = 0.85,
top_k = 50,
temperature = 0.5,
repetition_penalty = 1.2,
num_return_sequences = 1,
pad_token_id = tokenizer.eos_token_id,
forced_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:
De drie belangrijkste onderdelen van webontwikkeling waaraan wordt gedacht tijdens het ontwerpen en bouwen van websites, zijn HTML (Hypertext Markup Language), CSS (Cascading Style Sheets) en JavaScript. Het is belangrijk om te weten hoe deze drie elementen werken samen met elkaar voordat je een website ontwikkelt of verbeterd kunt maken. Bovendien moet je begrijpen wat elk onderdeel doet wanneer het op dezelfde pagina staat ingebed in verschillende contexten. Dit zal helpen bij het creëren van consistente inhoud zonder fouten zoals verwarring tussen browsers of compatibiliteitsproblemen. Ten slotte kan kennis over de functies
For more extensive usage and a lot of generated samples (both good and bad samples) see the following Inference Notebook
The PolyLM-13B model was trained on 18 languages. The primary focus was to create a multi-lingual Open LLM. Dutch was one of those 18 languages. For training the model a diverse combination of multi-lingual datasets was used.
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 finetuned model is to explore and research the use of the Dutch language in combination with an Open LLM model.
The information below is copied from the base model's official model card. This applies also to the finetuned model.
Our contributions are fully methodological: adding the support of multilingualism to LLM during training and SFT phases. It is unavoidable that PolyLM might exhibit several common deficiencies of language models, e.g. hallucination and toxicity. PolyLM should not be used directly in any application, without a prior assessment of safety and fairness concerns specific to the application.
This model was trained on the BramVanroy/alpaca-cleaned-dutch dataset.
The dataset is the Dutch translation of the English Alpaca Cleaned instruction 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 3.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.4626 | 0.16 | 128 | 1.4613 |
| 1.4027 | 0.33 | 256 | 1.4235 |
| 1.4002 | 0.49 | 384 | 1.4054 |
| 1.3857 | 0.66 | 512 | 1.3951 |
| 1.3798 | 0.82 | 640 | 1.3870 |
| 1.3629 | 0.99 | 768 | 1.3839 |