Downloads · 30 days
8
1% of all-time downloads
mgrbyte/mt-general-cy-en
mt-general-cy-en is a translation model from mgrbyte. Use it when you need text moved from one language to another. It is set up for transformers. The card lists the license as apache-2.0.
A general language translation model for translating between Welsh and English.
Downloads · 30 days
8
1% of all-time downloads
All-time downloads
1.2K
Public
Repo size
560 MB
Likes
0
Public
Click a slice to open those files.
.bin279 MB · 99%
From the Hugging Face model README
A general language translation model for translating between Welsh and English.
This model was trained using custom DVC pipeline employing Marian NMT, the datasets prepared were generated from the following sources:
The data was split into train, validation and test sets; the test comprising of a random slice of 20% of the total dataset. Segments were selected randomly form of text and TMX from the datasets described above. The datasets were cleaned, without any pre-tokenisation, utilising a SentencePiece vocabulary model, and then fed into a 10 separate Marian NMT training processes, the data having been split into split into 10 training and validation sets.
The BLEU evaluation score was produced using the python library SacreBLEU.
Ensure you have the prerequisite python libraries installed:
pip install transformers sentencepiece
import trnasformers
model_id = "mgrbyte/mt-general-cy-en"
tokenizer = transformers.AutoTokenizer.from_pretrained(model_id)
model = transformers.AutoModelForSeq2SeqLM.from_pretrained(model_id)
translate = transformers.pipeline("translation", model=model, tokenizer=tokenizer)
translated = translate(
"Mae gan Lywodraeth Cymru targed i gyrraedd miliwn o siariadwyr Cymraeg erbyn y flwyddyn 2020."
)
print(translated["translation_text"])