Edit model card

MarianMT French to Wolof Model

This model is a fine-tuned version of Helsinki-NLP/opus-mt-fr-en on the galsenai/french-wolof-translation dataset.

Model Description

This MarianMT model has been fine-tuned for the task of translating text from French to Wolof. The dataset used for fine-tuning is available here.

Training Procedure

  • Learning Rate: 2e-5
  • Batch Size: 16
  • Number of Epochs: 3

Evaluation Metrics

The model was evaluated using the BLEU metric:

  • BLEU: 0.015657591430909903

Usage

You can use this model directly with the Hugging Face transformers library:

from transformers import MarianMTModel, MarianTokenizer

model_name = "cibfaye/french-wolof-marian-fr-to-wo"
tokenizer = MarianTokenizer.from_pretrained(model_name)
model = MarianMTModel.from_pretrained(model_name)

def translate(text):
    inputs = tokenizer(text, return_tensors="pt")
    translated_tokens = model.generate(**inputs)
    translation = tokenizer.batch_decode(translated_tokens, skip_special_tokens=True)
    return translation

text = "Bonjour, comment ça va ?"
translation = translate(text)
print("Translation:", translation)
Downloads last month
7
Safetensors
Model size
74.7M params
Tensor type
F32
·