🚀 Gallek
- Gallek is a French -> Breton translation model (the word "Gallek" means "French" in Breton).
- After 10 epochs of training on a 20% split of the training set, the current model version achieved a BLEU score of 50.
- Currently, it is only fine - tuned in the monodirectional fr->br direction.
- Training details can be found on the GweLLM Github repository.
🚀 Quick Start
Prerequisites
- The model is based on the
transformers
library.
Installation
The installation of the transformers
library is required. You can use the following command to install it:
pip install transformers
✨ Features
- High - Quality Translation: Achieved a BLEU score of 50 on the training set.
- Monodirectional Fine - Tuning: Specifically fine - tuned for French to Breton translation.
📦 Installation
To use this model, you need to install the transformers
library. You can use the following command:
pip install transformers
💻 Usage Examples
Basic Usage
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM, pipeline
modelcard = "amurienne/gallek-m2m100"
model = AutoModelForSeq2SeqLM.from_pretrained(modelcard)
tokenizer = AutoTokenizer.from_pretrained(modelcard)
translation_pipeline = pipeline("translation", model=model, tokenizer=tokenizer, src_lang='fr', tgt_lang='br', max_length=512, device="cpu")
french_text = "traduis de français en breton: j'apprends le breton à l'école."
result = translation_pipeline(french_text)
print(result[0]['translation_text'])
Advanced Usage
You can adjust parameters such as max_length
and device
according to your needs. For example, if you have a GPU, you can set device = 0
to use the GPU for faster translation.
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM, pipeline
modelcard = "amurienne/gallek-m2m100"
model = AutoModelForSeq2SeqLM.from_pretrained(modelcard)
tokenizer = AutoTokenizer.from_pretrained(modelcard)
translation_pipeline = pipeline("translation", model=model, tokenizer=tokenizer, src_lang='fr', tgt_lang='br', max_length=1024, device=0)
french_text = "traduis de français en breton: j'apprends le breton à l'école."
result = translation_pipeline(french_text)
print(result[0]['translation_text'])
📚 Documentation
📄 License
This project is licensed under the MIT License.
Property |
Details |
Model Type |
Translation |
Training Data |
Bretagne/ofis_publik_br - fr, Bretagne/OpenSubtitles_br_fr, Bretagne/Autogramm_Breton_translation |
Base Model |
facebook/m2m100_418M |
Library Name |
transformers |
Supported Languages |
fr, br |