High-quality Fulfulde translations using NLP
# Fulfulde Translator
> Fine-tuning NLLB & M2M100 models for Fulfulde β English/French translation
## π Overview
This project focuses on fine-tuning multilingual translation models to improve translation quality between Fulfulde (ff), English (en), and French (fr), with a particular focus on the Fulfulde dialect. The implementation uses Parameter-Efficient Fine-Tuning (PEFT/LoRA) for training efficiency and provides tools for model distillation to create smaller, deployment-ready models.
## π Getting Started
### Prerequisites
- Python 3.12+
- PyTorch 2.6.0+
- Transformers 4.48.3+
- PEFT 0.7.1+
### Installation
1. Clone this repository:
```bash
git clone
github.com
cd fulfulde-translator
```
2. Install dependencies:
```bash
# Using pip
pip install -e .
# Or using Poetry
poetry install
```
## π§ Project Structure
```
fulfulde-translator/
βββ data/ # Training and evaluation data
β βββ adamawa_english_fulfulde_french_fub.jsonl
βββ src/ # Source code
β βββ config/ # Configuration files
β βββ models/ # Model utilities
β βββ tokenization/ # Tokenizer utilities
β βββ data/ # Dataset processing
β βββ training/ # Training code
β βββ evaluation/ # Evaluation metrics
β βββ distillation/ # Model distillation
βββ scripts/ # Shell scripts for training
βββ examples/ # Example usage scripts
βββ tests/ # Unit tests
βββ README.md # This file
```
## π Data Format
The training data is provided in `.jsonl` format with the following structure:
```json
{
"english": "Buuba is Fulani.",
"fulfulde": "Buuba pullo.",
"french": "Buuba est Peul."
}
```
The code automatically converts this to the Hugging Face translation format:
```json
{
"translation": {
" β¦