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sog
|
| 10 |
+
base_model: facebook/omniASR-LLM-300M
|
| 11 |
+
tags:
|
| 12 |
+
- automatic-speech-recognition
|
| 13 |
+
- african-languages
|
| 14 |
+
- waxal
|
| 15 |
+
- multilingual
|
| 16 |
+
- omnilingual-asr
|
| 17 |
+
- fairseq2
|
| 18 |
+
datasets:
|
| 19 |
+
- google/WaxalNLP
|
| 20 |
+
metrics:
|
| 21 |
+
- wer
|
| 22 |
+
- cer
|
| 23 |
+
library_name: fairseq2
|
| 24 |
+
---
|
| 25 |
+
|
| 26 |
+
# omniasr-llm-300m-waxal-bantu
|
| 27 |
+
|
| 28 |
+
A **Bantu (Niger-Congo)** multilingual fine-tune of Meta's **Omnilingual ASR** (`wav2vec2_llama`,
|
| 29 |
+
300M-parameter shared wav2vec2 encoder + autoregressive Llama-style decoder), trained
|
| 30 |
+
jointly on **6 WAXAL languages**. Part of the WAXAL ASR benchmark's
|
| 31 |
+
*training-granularity* study (monolingual vs. language-family vs. all-19 pooling).
|
| 32 |
+
|
| 33 |
+
- **Base model:** [`facebook/omniASR-LLM-300M`](https://huggingface.co/facebook/omniASR-LLM-300M)
|
| 34 |
+
- **Languages (6):** Luganda, Nyankole, Shona, Lingala, Masaaba, Soga
|
| 35 |
+
- **Macro-averaged WER (this model):** **31.6%** | monolingual baselines: 30.6%
|
| 36 |
+
|
| 37 |
+
## Training data
|
| 38 |
+
|
| 39 |
+
Fine-tuned on the pooled **train** splits of the [WAXAL corpus](https://huggingface.co/datasets/google/WaxalNLP)
|
| 40 |
+
for these languages (16 kHz mono; transcripts NFC-normalized and lower-cased, punctuation
|
| 41 |
+
removed, phonemic diacritics/tone marks preserved). Total: **53,830 clips / 308.9 hours**.
|
| 42 |
+
|
| 43 |
+
| Language | Train clips | Train hours |
|
| 44 |
+
|---|---|---|
|
| 45 |
+
| Luganda | 5,455 | 37.3 |
|
| 46 |
+
| Nyankole | 6,783 | 40.8 |
|
| 47 |
+
| Shona | 14,109 | 79.7 |
|
| 48 |
+
| Lingala | 14,399 | 71.9 |
|
| 49 |
+
| Masaaba | 6,865 | 39.3 |
|
| 50 |
+
| Soga | 6,219 | 40.0 |
|
| 51 |
+
|
| 52 |
+
## Training procedure
|
| 53 |
+
|
| 54 |
+
Fine-tuned with the Omnilingual-ASR `wav2vec2_llama` recipe (fairseq2) on **2× NVIDIA H200**
|
| 55 |
+
(DistributedDataParallel). All granularity conditions use an identical budget so the only
|
| 56 |
+
variable is the language mixture.
|
| 57 |
+
|
| 58 |
+
| Hyperparameter | Value |
|
| 59 |
+
|---|---|
|
| 60 |
+
| Base checkpoint | `facebook/omniASR-LLM-300M` |
|
| 61 |
+
| Tokenizer | `omniASR_tokenizer_v1` (SentencePiece, 9,812 units) |
|
| 62 |
+
| Training steps | 5,000 |
|
| 63 |
+
| Optimizer | AdamW |
|
| 64 |
+
| Learning rate | 5e-5 |
|
| 65 |
+
| Weight decay | 0.01 |
|
| 66 |
+
| Batch size | 3,000,000 audio tokens/batch (dynamic) |
|
| 67 |
+
| Gradient accumulation | 4 |
|
| 68 |
+
| Precision | bfloat16 mixed |
|
| 69 |
+
| Audio length filter | 0.5 s – 30 s |
|
| 70 |
+
| Hardware | 2× H200 (DDP) |
|
| 71 |
+
|
| 72 |
+
## Evaluation
|
| 73 |
+
|
| 74 |
+
Scored on each language's held-out **test** split (utterances ≥ 1.5 s, matching the
|
| 75 |
+
benchmark's filtered-test protocol). WER and CER computed with `jiwer` on NFC-normalized,
|
| 76 |
+
lower-cased text (diacritics preserved). The *Monolingual WER* column is the corresponding
|
| 77 |
+
per-language model ([`omniasr-llm-300m-waxal-<iso>`](https://huggingface.co/waxal-benchmarking))
|
| 78 |
+
evaluated identically, for a same-protocol comparison.
|
| 79 |
+
|
| 80 |
+
| Language | Code | WER | CER | Monolingual WER | Δ vs mono |
|
| 81 |
+
|---|---|---|---|---|---|
|
| 82 |
+
| Luganda | `lug_Latn` | 11.6 | 2.8 | 10.9 | +0.6 |
|
| 83 |
+
| Nyankole | `nyn_Latn` | 33.6 | 8.7 | 32.3 | +1.3 |
|
| 84 |
+
| Shona | `sna_Latn` | 22.2 | 3.9 | 21.6 | +0.6 |
|
| 85 |
+
| Lingala | `lin_Latn` | 31.5 | 13.2 | 30.4 | +1.1 |
|
| 86 |
+
| Masaaba | `myx_Latn` | 47.0 | 10.4 | 45.5 | +1.4 |
|
| 87 |
+
| Soga | `xog_Latn` | 44.0 | 8.7 | 42.8 | +1.2 |
|
| 88 |
+
|
| 89 |
+
## Usage
|
| 90 |
+
|
| 91 |
+
```python
|
| 92 |
+
# pip install git+https://github.com/facebookresearch/omnilingual-asr.git
|
| 93 |
+
from pathlib import Path
|
| 94 |
+
import torch
|
| 95 |
+
from huggingface_hub import snapshot_download
|
| 96 |
+
from fairseq2.data.tokenizers.hub import load_tokenizer
|
| 97 |
+
from omnilingual_asr.models.inference.pipeline import ASRInferencePipeline
|
| 98 |
+
from omnilingual_asr.models.wav2vec2_llama.hub import get_wav2vec2_llama_model_hub
|
| 99 |
+
|
| 100 |
+
ckpt = snapshot_download("waxal-benchmarking/omniasr-llm-300m-waxal-bantu")
|
| 101 |
+
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
| 102 |
+
dtype = torch.bfloat16 if device.type == "cuda" else torch.float32
|
| 103 |
+
|
| 104 |
+
hub = get_wav2vec2_llama_model_hub()
|
| 105 |
+
model = hub.load_custom_model(Path(ckpt) / "model", hub.get_arch_config("300m"), device=device, dtype=dtype)
|
| 106 |
+
tokenizer = load_tokenizer("omniASR_tokenizer_v1")
|
| 107 |
+
|
| 108 |
+
pipe = ASRInferencePipeline(model_card=None, model=model, tokenizer=tokenizer, device=device, dtype=dtype)
|
| 109 |
+
# pass the target language's Omnilingual token, e.g. Luganda -> "lug_Latn"
|
| 110 |
+
texts = pipe.transcribe(["your_audio.flac"], lang=["lug_Latn"])
|
| 111 |
+
print(texts)
|
| 112 |
+
```
|
| 113 |
+
|
| 114 |
+
Language tokens for this model: Luganda `lug_Latn`, Nyankole `nyn_Latn`, Shona `sna_Latn`, Lingala `lin_Latn`, Masaaba `myx_Latn`, Soga `xog_Latn`.
|
| 115 |
+
Audio should be mono 16 kHz (the pipeline resamples if needed); keep clips under 40 s.
|
| 116 |
+
|
| 117 |
+
## Checkpoint format
|
| 118 |
+
|
| 119 |
+
Native **fairseq2** sharded checkpoint (`model/pp_00/tp_00/sdp_00.pt` + `model.yaml`) —
|
| 120 |
+
not a `transformers` model, so `AutoModel` will not load it. Load with `omnilingual_asr` /
|
| 121 |
+
`fairseq2` as shown above.
|
| 122 |
+
|
| 123 |
+
## Citation
|
| 124 |
+
|
| 125 |
+
Part of the **WAXAL ASR Benchmark** ([arXiv:2606.02375](https://arxiv.org/abs/2606.02375)).
|
| 126 |
+
|
| 127 |
+
```bibtex
|
| 128 |
+
@article{waxalnet2026,
|
| 129 |
+
title = {The WAXAL ASR Benchmark: Fine-Tuned Edge Models Across 19 African Languages},
|
| 130 |
+
author = {Olufemi, Victor Tolulope and Babatunde, Oreoluwa and Njema, Ramsey and others},
|
| 131 |
+
year = {2026},
|
| 132 |
+
note = {arXiv preprint arXiv:2606.02375}
|
| 133 |
+
}
|
| 134 |
+
```
|
| 135 |
+
|
| 136 |
+
## Acknowledgements
|
| 137 |
+
|
| 138 |
+
Supported by **[Lynguallabs](https://lynguallabs.org/)** (compute, researchers & storage),
|
| 139 |
+
**[Open Token](https://opentoken.global/)** (compute), and
|
| 140 |
+
**[CMU Africa](https://www.africa.engineering.cmu.edu/)** (researchers & native speakers).
|