Reproducible multilingual reasoning research for African languages with Gemma 4 and HPC-ready workflows
# Gemma 4 African Multilingual Reasoning
A reproducible research project for measuring and improving on-device reasoning in English, French, Swahili, and Wolof. Milestone 1 establishes an auditable **zero-shot Gemma 4 E2B baseline with thinking enabled before any fine-tuning**. Milestone 2 adds a human-validated Unsloth QLoRA/rsLoRA adaptation for Kaggle T4 x2 and evaluates it on the unchanged benchmark.
## Why this project matters
Small reasoning models are increasingly deployable on phones and laptops, but benchmark averages hide a practical failure: a model may solve a problem yet abandon the language the user selected. This project therefore separates four questions:
1. Is the final answer correct?
2. Is the reasoning logically correct?
3. Is the reasoning written in the requested language?
4. Is the final answer written in the requested language?
English fallback in Swahili and Wolof is treated as a measured error, not a cosmetic issue.
## Milestone 1: zero-shot baseline
The baseline uses:
- `google/gemma-4-E2B-it`, pinned to a recorded model revision;
- thinking mode enabled through Gemma 4's native chat template;
- 50 matched AfriMGSM test problems in each language (200 generations total);
- deterministic greedy decoding;
- exact numeric accuracy and format checks;
- human review fields for reasoning correctness and language compliance;
- run manifests containing code, model, dataset, package, hardware, and generation provenance.
Training begins only after the baseline and evaluation protocol are frozen. The advanced
adapter protocol is described in the low-resource stack.
## Repository map
```text
configs/ Experiment configuration
data/eval/ Generated, provenance-rich evaluation files
docs/ Protocol, decisions, HPC runbook, and project pitch
scripts/hpc/ Cluster audit, environment, and Slurm submission helpers
scripts/kaggle/ Deterministic dual-T4 baseline, training, and ada …