A Kinyarwanda based Ai
# BwengeAi - Rwandan AI that knows Kinyarwanda
BwengeAi is a Rwandan AI model trained on Kinyarwanda language data from multiple sources including Huggingface datasets, Kinyarwanda Wikipedia, and Rwandan news content.
## Features
- **Multi-source data collection** from Huggingface, Wikipedia, and Igihe
- **Kinyarwanda language support** with comprehensive NLP capabilities
- **Efficient fine-tuning** using LoRA for parameter-efficient training
- **Evaluation pipeline** with perplexity, ROUGE, BLEU, and accuracy metrics
## Project Structure
```
BwengeAi/
├── configs/
│ └── default.yaml # Main configuration
├── src/
│ ├── data_collection/ # Data collection modules
│ │ ├── huggingface_collector.py
│ │ ├── wikipedia_collector.py
│ │ ├── igihe_scraper.py
│ │ └── data_processor.py
│ ├── models/ # Model architecture
│ │ └── bwenge_model.py
│ ├── training/ # Training pipeline
│ │ └── trainer.py
│ └── evaluation/ # Evaluation metrics
│ └── metrics.py
├── scripts/
│ ├── collect_all.py # Data collection script
│ └── train.py # Training script
├── data/
│ ├── raw/ # Raw collected data
│ └── processed/ # Processed training data
├── tests/ # Test files
└── docs/ # Documentation
```
## Installation
```bash
# Clone the repository
git clone
cd BwengeAi
# Create virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install dependencies
pip install -e ".[dev]"
```
## Data Sources
### Huggingface Datasets
- **CircuitNotion/kinyarwanda_corpus** - Large Kinyarwanda text corpus (3.52M rows)
- **mbazaNLP/kinyarwanda_monolingual_v01.1** - Monolingual corpus (1.07M rows)
- **saillab/alpaca_kinyarwanda_taco** - Instruction tuning (62k rows)
- **mbazaNLP/Kinyarwanda_English_parallel_dataset** - Translation pairs (55.7k rows)
- Plus 100+ additional datas …