File size: 1,336 Bytes
a65f4f8 921bf01 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
---
{}
---
# 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)
```
|