File size: 5,503 Bytes
42134df
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
fe6d9bf
42134df
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
fe6d9bf
42134df
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
08ca68f
42134df
 
08ca68f
 
 
 
 
 
42134df
 
 
 
 
 
 
 
 
 
 
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
---
language:
- zu
- en
tags:
- translation
- african-languages
- scientific-translation
- afriscience-mt
- nllb
license: apache-2.0
base_model: facebook/nllb-200-distilled-600M
datasets:
- afriscience-mt
pipeline_tag: translation
model-index:
- name: nllb_200_distilled_600m-zul-eng
  results:
  - task:
      type: translation
    metrics:
    - name: BLEU (test)
      type: bleu
      value: 47.18
    - name: chrF (test)
      type: chrf
      value: 66.62
    - name: SSA-COMET (test)
      type: comet
      value: 66.85
---

# nllb_200_distilled_600m-zul-eng

[![Model on HF](https://huggingface.co/datasets/huggingface/badges/raw/main/model-on-hf-sm.svg)](https://huggingface.co/dsfsi/nllb_200_distilled_600m-zul-eng)

This model is part of the **AfriScience-MT** project, focused on machine translation of scientific texts for African languages.

## Model Description

| Property | Value |
|----------|-------|
| **Model Type** | Seq2Seq Translation |
| **Translation Direction** | isiZulu → English |
| **Base Model** | [facebook/nllb-200-distilled-600M](https://huggingface.co/facebook/nllb-200-distilled-600M) |
| **Domain** | Scientific/Academic texts |
| **Training** | Full fine-tuning on AfriScience-MT dataset |

## Evaluation Results

Performance on the AfriScience-MT test set:

| Split | BLEU | chrF | SSA-COMET |
|-------|------|------|-----------|
| Validation | 48.45 | 67.13 | 67.08 |
| **Test** | **47.18** | **66.62** | **66.85** |

**Metrics explanation:**
- **BLEU**: Measures n-gram overlap with reference translations (0-100, higher is better)
- **chrF**: Character-level F-score, robust for morphologically rich languages (0-100, higher is better)
- **SSA-COMET**: Neural metric trained for Sub-Saharan African languages, shown as percentage (0-100, higher is better) ([McGill-NLP/ssa-comet-stl](https://huggingface.co/McGill-NLP/ssa-comet-stl))

## Usage

### Quick Start

```python
from transformers import AutoModelForSeq2SeqLM, AutoTokenizer

model_id = "dsfsi/nllb_200_distilled_600m-zul-eng"
model = AutoModelForSeq2SeqLM.from_pretrained(model_id)
tokenizer = AutoTokenizer.from_pretrained(model_id)

# Set source language
tokenizer.src_lang = "zul_Latn"

# Translate
text = "The mitochondria is the powerhouse of the cell."
inputs = tokenizer(text, return_tensors="pt", padding=True, truncation=True, max_length=256)

# Generate with target language
forced_bos_token_id = tokenizer.convert_tokens_to_ids("eng_Latn")
outputs = model.generate(**inputs, forced_bos_token_id=forced_bos_token_id, max_length=256, num_beams=5)
translation = tokenizer.batch_decode(outputs, skip_special_tokens=True)[0]
print(translation)
```

### Batch Translation

```python
texts = [
    "Climate change affects agricultural productivity.",
    "The study analyzed genetic markers in the population.",
    "Renewable energy sources are essential for sustainable development."
]

inputs = tokenizer(texts, return_tensors="pt", padding=True, truncation=True, max_length=256)
outputs = model.generate(**inputs, forced_bos_token_id=forced_bos_token_id, max_length=256, num_beams=5)
translations = tokenizer.batch_decode(outputs, skip_special_tokens=True)
for src, tgt in zip(texts, translations):
    print(f"{src}\n→ {tgt}\n")
```

## Training Details

### Hyperparameters

| Parameter | Value |
|-----------|-------|
| Epochs | 10 |
| Batch Size | 2 |
| Learning Rate | 2e-05 |

### Training Data

- **Dataset**: AfriScience-MT
- **Domain**: Scientific abstracts and papers
- **Languages**: English and 6 African languages (Amharic, Hausa, Luganda, Northern Sotho, Yoruba, isiZulu)


## Reproducibility

To reproduce this model:

```bash
# Clone the AfriScience-MT repository
git clone https://github.com/afriscience-mt/afriscience-mt.git
cd afriscience-mt

# Install dependencies
pip install -r requirements.txt

# Run training
python -m afriscience_mt.scripts.run_seq2seq_training \
    --data_dir ./data \
    --source_lang zul \
    --target_lang eng \
    --model_name facebook/nllb-200-distilled-600M \
    --model_type nllb \
    --output_dir ./output \
    --num_epochs 10 \
    --batch_size 16 \
    --learning_rate 2e-5
```

## Limitations

- **Domain Specificity**: This model is optimized for scientific/academic texts and may perform poorly on colloquial or informal text.
- **Language Coverage**: Only supports the specific language pair indicated.
- **Input Length**: Maximum input length is 256 tokens; longer texts should be split into segments.

## Citation

If you use this model, please cite the AfriScience-MT paper ([arXiv:2605.29741](https://arxiv.org/abs/2605.29741)):

```bibtex
@article{abdulmumin2026afriscience,
  title   = {AfriScience-MT: Towards Decolonizing Science in Africa through Text Translation},
  author  = {Abdulmumin, Idris and Gwadabe, Tajuddeen and Muhammad, Shamsuddeen Hassan and Adelani, David Ifeoluwa and Khalo, Nomonde and Ahmad, Ibrahim Said and Modupe, Abiodun and Mumm, Anina and Biyela, Sibusiso and Rabie, Michelle and Havemann, Johanna and Rei, Marek and Abbott, Jade and Marivate, Vukosi},
  journal = {arXiv preprint arXiv:2605.29741},
  year    = {2026},
  url     = {https://arxiv.org/abs/2605.29741}
}
```

## License

This model is released under the [Apache 2.0 License](https://www.apache.org/licenses/LICENSE-2.0).

## Acknowledgments

- Built on top of [{base_model}](https://huggingface.co/{base_model})
- Evaluation using [SSA-COMET](https://huggingface.co/McGill-NLP/ssa-comet-stl) for African language assessment