Logo Lanfrica

ismailousa/fulfulde-translator

Domain:

natural language processing

Record type:

software
Creator:
ism
Host:
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": { " …