CoolFace
Modelpublic

inesassia/fonbench-mms-1b-fon-lora

sourceHugging Facecc-by-4.0updated 3mo agoView on Hugging Face
0likes11downloads
Model Card

FonBench MMS-1b Fon — LoRA Adaptation (r=32)

LoRA (Low-Rank Adaptation) of facebook/mms-1b-all for the Fon language (tonal Gbe language of Benin), training only 0.82 % of the model parameters.

Model Description

  • —Developed by: Inès Assia HOUNKPONOU (ESGIS Bénin)
  • —Model type: LoRA adapter for Wav2Vec2-based ASR
  • —Language: Fon (fon, ISO 639-3)
  • —License: CC-BY-4.0
  • —Base model: facebook/mms-1b-all
  • —Adapter framework: PEFT
  • —Adapter size: 30 MB (vs 3.7 GB for full fine-tuning)
  • —Parameters trained: 7,929,651 (0.82 %)
  • —Parameters total: 972,578,227

Intended Uses

Direct use

  • —Resource-constrained transcription of Fon speech where the full fine-tuned model is impractical (mobile, edge, multi-tenant).
  • —Educational use case demonstrating parameter-efficient fine-tuning on low-resource African languages.
  • —Component in pipelines where multiple language adapters share a single base model.

Downstream use

  • —Combination with other LoRA adapters for related Gbe languages.
  • —Starting point for parameter-efficient adaptation experiments on related tonal languages.

Out-of-scope use

Same as the full fine-tuned variant: not suitable for noisy/far-field audio, code-switching, other languages, or safety-critical applications.

How to Use

python
from peft import PeftModel
from transformers import Wav2Vec2ForCTC, Wav2Vec2Processor
import torch, librosa

# Important: vocab_size must be set to 53 (Fon vocabulary)
processor = Wav2Vec2Processor.from_pretrained("inesassia/fonbench-mms-1b-fon-lora")
base = Wav2Vec2ForCTC.from_pretrained(
    "facebook/mms-1b-all",
    vocab_size=len(processor.tokenizer),
    ignore_mismatched_sizes=True,
    pad_token_id=processor.tokenizer.pad_token_id,
)
model = PeftModel.from_pretrained(base, "inesassia/fonbench-mms-1b-fon-lora")
model.eval()

# Audio must be 16 kHz mono
audio, sr = librosa.load("audio.wav", sr=16000)
inputs = processor(audio, sampling_rate=16000, return_tensors="pt")
with torch.no_grad():
    logits = model(inputs.input_values).logits
pred_ids = torch.argmax(logits, dim=-1)
transcription = processor.batch_decode(pred_ids)[0]
print(transcription)

Training Details

Training data

Same as FT-2: 5,488 training examples (20 speakers) from alaleye/fon. Test set: 3,541 examples, 7 unseen speakers (strict speaker stratification).

LoRA configuration

HyperparameterValue
LoRA rank (r)32
LoRA alpha64
LoRA dropout0.0
Target modulesq_proj, v_proj
Task typeCTC
Bias adaptationNone

Training hyperparameters

HyperparameterValue
StrategyLoRA (PEFT)
OptimizerAdamW
Learning rate2e-4
Batch size (per device)8
Gradient accumulation steps2
Effective batch size16
Epochs5
Early stopping patience2
Precisionfp16 mixed precision
Gradient checkpointingEnabled
Random seed42

Compute infrastructure

  • —Hardware: Single NVIDIA T4 GPU (Kaggle)
  • —Training duration: ~73 minutes
  • —Resource efficiency: ~120× less compute than full fine-tuning

Evaluation

Results on test set (3,541 examples, 7 unseen speakers)

MetricValue
WER (test)28.75 %
CER (test)8.18 %

Cost-performance trade-off

VariantParams trainedWERΔ vs FT-2
LoRA-1 (r=8)2.0M (0.21%)32.20%+12.93 pts
This model (r=32)7.9M (0.82%)28.75 %+9.48 pts
FT-1 (LR 1e-5)967M (100%)24.32%+5.05 pts
FT-2 (LR 5e-5)967M (100%)19.27%— (best)

Trade-off: LoRA-2 achieves a WER within ~10 points of full fine-tuning while training only 0.82% of the parameters, making it a strong choice for compute-constrained deployments.

Limitations and Biases

All limitations of the full fine-tuned variant apply, plus:

  • —WER ~9 points higher than full fine-tuning. Choose this model only if compute or storage is a primary constraint.
  • —Requires the exact base model architecture at inference time: facebook/mms-1b-all with a custom vocabulary head (53 tokens). The reload code above must be used verbatim.

Environmental Impact

  • —Hardware Type: NVIDIA T4 GPU
  • —Hours used: ~1.2 hours
  • —Cloud Provider: Kaggle
  • —Carbon Emitted: ~0.1 kg CO2eq (approximate, ~120× lower than full fine-tuning).

Citation

bibtex
@mastersthesis{hounkponou2026fonbench,
  title={Evaluation and adaptation of automatic speech recognition models for the Fon language},
  author={Hounkponou, Inès Assia},
  school={ESGIS Bénin},
  year={2026}
}

Resources