Downloads · 30 days
59
1% of all-time downloads
Michielo/mt5-small_nl-en_translation
mt5-small_nl-en_translation is a text generation model from Michielo. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as apache-2.0.
The mt5-small nl-en translation model is a finetuned version of google/mt5-small.
Downloads · 30 days
59
1% of all-time downloads
All-time downloads
7.3K
Public
Parameters
300M
4.8 GB on disk
Likes
1
Public
Click a slice to open those files.
.safetensors1.2 GB · 98%
From the Hugging Face model README
The mt5-small nl-en translation model is a finetuned version of google/mt5-small.
It was finetuned on 237k rows of the iwslt2017 dataset and roughly 38k rows of the opus_books dataset. The model was trained in multiple phases with different epochs & batch sizes.
Install dependencies
pip install transformers
pip install sentencepiece
pip install protobuf
You can use the following code for model inference. This model was finetuned to work with an identifier when prompted that needs to be present for the best results.
from transformers import AutoModelForSeq2SeqLM, AutoTokenizer, GenerationConfig
# load tokenizer and model
tokenizer = AutoTokenizer.from_pretrained("Michielo/mt5-small_nl-en_translation")
model = AutoModelForSeq2SeqLM.from_pretrained("Michielo/mt5-small_nl-en_translation")
# tokenize input
inputs = tokenizer(">>en<< Your Dutch text here", return_tensors="pt")
# calculate the output
outputs = model.generate(**inputs, generation_config=generation_config)
# decode and print
print(tokenizer.batch_decode(outputs, skip_special_tokens=True))
| Benchmark | Score |
|---|---|
| BLEU | 51.92% |
| chr-F | 67.90% |
| chr-F++ | 67.62% |
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.