|
--- |
|
{} |
|
--- |
|
# Luganda to English Informal Translation Model |
|
This model translates informal Luganda sentences to English. It was trained on a dataset of Luganda proverbs with their English translations. The dataset consists of 3135 examples. |
|
|
|
## Data |
|
**Train:** The training data consists of 3135 Luganda proverbs and their corresponding English translations. |
|
**Eval:** The evaluation data is part of the training data and consists of informal sentences. |
|
|
|
## Model |
|
**Architecture:** Seq2Seq |
|
**Pretrained Model:** Helsinki-NLP/opus-mt-ug-en |
|
**Fine-tuning:** The model was fine-tuned for 50 epochs with a learning rate of 2e-5. |
|
|
|
## Translation |
|
**Source Language:** Luganda |
|
**Target Language:** English |
|
**Domain:** Informal sentences and proverbs |
|
|
|
## Usage |
|
Here is an example of how to load and use the model for translation: |
|
|
|
```python |
|
from transformers import AutoModelForSeq2SeqLM, AutoTokenizer |
|
|
|
model_name = 'your_model_name_on_hf_hub' |
|
model = AutoModelForSeq2SeqLM.from_pretrained(model_name) |
|
tokenizer = AutoTokenizer.from_pretrained(model_name) |
|
|
|
# Example input sentence in Luganda |
|
input_sentence = 'Olutalo lwa nsi yonna lwazibwa omwaka oguwedde.' |
|
|
|
inputs = tokenizer(input_sentence, return_tensors='pt') |
|
outputs = model.generate(**inputs) |
|
translation = tokenizer.decode(outputs[0], skip_special_tokens=True) |
|
print(translation) |
|
``` |
|
|