Automatic Speech Recognition
PEFT
Safetensors
Algerian Arabic
whisper
algerian-darija
arabic
lora
qlora
Eval Results (legacy)

Hadra-ASR-whisper-medium

The collective's speech recogniser for Algerian Darja: a QLoRA adapter on openai/whisper-medium that adds 69,206,016 trainable LoRA parameters (rank 64) over the frozen 763,857,920-parameter Whisper medium base, trained in a 3-phase curriculum over three OddAdmix Algerian speech collections for 31,661 cumulative steps.

On the held-out test splits with the Darija normaliser below, it scores 0.68% WER (Kahwa podcast), 0.34% (Loubna stories), and 0.95% (Rawi stories) — against 34.85%, 14.87%, and 27.54% for the Hadra small adapter under the same normaliser. Measured once on fixed splits; no independent reproduction run exists yet (see Limitations).

Results

WER on three OddAdmix Algerian test splits, decoded with the Darija normaliser below. Test row counts are unmeasured (the OddAdmix repos publish train splits of 23,264 / 48,590 / 5,296 rows; test partitions are undocumented).

system Kahwa podcast Loubna stories Rawi stories
Hadra-ASR-whisper-medium + LoRA 0.68% 0.34% 0.95%
Hadra-ASR-whisper-small baseline 34.85% 14.87% 27.54%

Both rows come from one measurement run each: the baseline is algerian-nlp/Hadra-ASR-whisper-small, scored in the same harness under the same normaliser — not re-run here, and its decoding settings and test rows are undocumented. Read the deltas as a single-run claim: a 50x WER drop from a size step plus dialect adaptation is extraordinary and needs an independent reproduction before it can be quoted as fact.

Anchor harnesses. The collective's default reference suites are DziriEval and MADAR. Both are text suites and do not cover speech recognition, so no anchor score applies to this model — unmeasured with that reason, not by omission.

Intended use

Speech-to-text transcription of Algerian Darja audio: podcasts, YouTube content, interviews, storytelling, subtitling, and voice-assistant input. Fine-tuning starting point for other Algerian Arabic speech tasks.

Not suitable for: text-to-speech or any generation of audio; translation between languages; any language or dialect other than Algerian Darija; any decision about a person. Heavy French code-switching may be transcribed phonetically into Arabic script. Eastern and Saharan accents are outside the training domains and may perform worse. It has not been evaluated for bias, toxicity, or factuality.

Usage

transformers, peft, torch, librosa, nothing else. The adapter loads over openai/whisper-medium with trust_remote_code unnecessary — native Whisper classes plus PEFT.

Verified runnable core (transformers 4.57.6, 2026-09-17 — feature extraction only, shapes pasted from the real run):

from transformers import WhisperFeatureExtractor

REPO = "algerian-nlp/Hadra-ASR-whisper-medium"
fe = WhisperFeatureExtractor.from_pretrained(REPO)  # sampling_rate 16000
feats = fe(audio_array, sampling_rate=16000, return_tensors="pt").input_features
print(feats.shape)  # torch.Size([1, 80, 3000]) for 1 s of 16 kHz audio

Full transcription path:

import torch
from transformers import pipeline

pipe = pipeline(
    task="automatic-speech-recognition",
    model="algerian-nlp/Hadra-ASR-whisper-medium",
    torch_dtype=torch.float16 if torch.cuda.is_available() else torch.float32,
    chunk_length_s=30,
)
result = pipe("path/to/algerian_audio.mp3", generate_kwargs={"language": "arabic", "task": "transcribe"})
print(result["text"])

Known defect, binding on the snippet above. WhisperProcessor.from_pretrained(REPO) and therefore pipeline(...) fail on transformers 4.57.6: the shipped tokenizer_config.json stores extra_special_tokens as a list where current transformers expects a mapping (AttributeError: 'list' object has no attribute 'keys', reproduced 2026-09-17). The feature extractor and the weight files are unaffected. Last-known-good transformers version is unmeasured — pin the version you verified before reporting transcription numbers.

Input-preparation notes the reader will get wrong: resample to mono 16,000 Hz float32 first; force the decoder to Arabic (language="arabic", task="transcribe"); score through the Darija normaliser below, not raw strings — the headline WERs were measured after it (diacritics and tatweel stripped, alef/yaa normalised, punctuation stripped).

import string

_ARABIC_DIACRITICS = "ًٌٍَُِّْٰ"
_TATWEEL = "ـ"
_PUNCT_MAP = {ord(c): None for c in string.punctuation + "،؛؟«»"}

def normalize_darja_text(text: str) -> str:
    if not text:
        return ""
    text = text.translate({ord(c): None for c in _ARABIC_DIACRITICS})
    text = text.replace(_TATWEEL, "")
    text = text.replace("إ", "ا").replace("أ", "ا").replace("آ", "ا")
    text = text.replace("ى", "ي")
    text = text.translate(_PUNCT_MAP)
    return " ".join(text.split()).strip()

Architecture

Parameters 833,063,936 total (763,857,920 frozen base + 69,206,016 LoRA trainable, 8.3074%)
Layers / hidden / heads 24 encoder + 24 decoder / 1024 / 16 (Whisper medium)
Attention Whisper encoder-decoder, unchanged
Adapter LoRA rank 64, alpha 128, dropout 0.05 on q_proj k_proj v_proj out_proj fc1 fc2, bias none (from adapter_config.json in this repo)
Quantization 4-bit NF4 base with fp16 compute via bitsandbytes
Positions / max length Whisper 30-second chunks (chunk_length_s=30)
Objective ASR cross-entropy fine-tuning, sequential 3-phase curriculum

Deviations from the reference (openai/whisper-medium): the base weights are frozen and quantised, all learning sits in the LoRA adapters, and training runs as a curriculum — Kahwa conversational podcasts first, Loubna expressive stories second, Rawi narratives third — rather than one mixed run. phase_state.json in this repo records all three phases complete at global step offset 31,661, exactly the phase-step sum (9,886 + 20,650 + 1,125).

Training data

Three OddAdmix Algerian speech collections (train rows counted 2026-09-17 via the Hub datasets-server): Kahwa podcast 23,264 rows, Loubna stories 48,590 rows, Rawi stories 5,296 rows — 77,150 rows total. Audio resampled to mono 16 kHz; transcripts filtered to 0.5–30.0 s duration and 1.0–25.0 chars/sec density; French tags, bracketed markers, diacritics, tatweel, and punctuation stripped by the normaliser above.

Decontamination. Unmeasured: no screen of training audio against the test splits is documented, and the test partitions themselves are undocumented.

Licence composition of the training audio

The adapter weights are MIT. That grant does not relicense the audio they were trained on. The composition, so you can make your own judgement:

tier rows share
other (unresolvable Hub licence on all three OddAdmix sets) 77,150 100%

All three OddAdmix collections carry license:other in Hub metadata. A permissive-only rebuild cannot be cut by code from this information — contact the audio owners before redistributing derivatives.

Training recipe

Objective ASR fine-tuning of LoRA adapters, base frozen
Optimiser AdamW, per-phase learning rate (betas unmeasured)
Batch 4 per device × 8 accumulation = 32 effective
Schedule cosine annealing with warmup 100 / 50 / 30 steps per phase
Steps 31,661 — Phase 1 Kahwa 9,886 (lr 1e-4) → Phase 2 Loubna 20,650 (lr 5e-5) → Phase 3 Rawi 1,125 (lr 2e-5)
Regularisation gradient checkpointing; LoRA dropout 0.05
Precision 4-bit NF4 base, fp16 compute
Hardware 1× NVIDIA Tesla T4 16 GB; wall-clock unmeasured
Seed unmeasured

Final eval losses: ~0.012 (Phase 1), ~0.008 (Phase 2), 0.00612 (Phase 3). The curve is single-run and unverified beyond the run record. Checkpoints were saved on best WER per phase with automatic Hub upload; the W&B run k_touati-estin/whisper-algerian-darja/runs/bypsqt51 is the run record.

Limitations

Sub-1% dialectal-ASR WERs are extraordinary and unreproduced. 0.34–0.95% WER on spontaneous dialectal speech beats careful human transcription; the numbers come from a single measurement with no eval logs, no published test rows, and no seed — the constraint on every claim in Results is an independent reproduction run, which does not exist yet.

The shipped processor config is broken on current transformers. tokenizer_config.json fails WhisperProcessor.from_pretrained on transformers 4.57.6 (list-shaped extra_special_tokens); the feature extractor and weights load fine. Any transcription number must name the transformers version it ran on.

Three domains are the whole world. Kahwa podcasts plus Loubna and Rawi storytelling, all OddAdmix — Central/Western accents dominate; Eastern, Saharan, noisy-field, and heavily French-matrix audio are outside the measured envelope.

Contamination is unbounded, not cleared. Train/test partitioning of the OddAdmix audio is undocumented, so test leakage can neither be confirmed nor excluded.

Evaluated once vs unmeasured. Transcription WER on three fixed splits (one run) vs everything else: no anchor suite, no robustness sweep, no human side-by-side.

No safety evaluation of any kind has been performed.

Files

file size contents
adapter_model.safetensors 276,932,864 LoRA adapter weights (69,206,016 params) + SHA-256 7b130b0dcc9d9af62563fa1720028dd1d7d4c4a9606fd03c89745ce3fd01710f
adapter_config.json 1,262 LoRA hyperparameters; declares base openai/whisper-medium and task type SEQ_2_SEQ_LM
tokenizer.json 3,931,328 fast tokenizer (see processor defect above)
tokenizer_config.json 2,125 tokenizer wiring — carries the list-shaped extra_special_tokens defect
processor_config.json 409 feature-extractor wiring (loads clean)
phase_state.json 93 curriculum record: all three phases complete at step 31,661

Sizes read from resolved Hub downloads 2026-09-17; the adapter SHA-256 was hashed from the downloaded bytes. Deliberately not shipped: the frozen Whisper-medium base (fetch openai/whisper-medium), the optimizer state, and the training audio.

Config fix 2026-09-17. The shipped adapter_config.json carried "task_type": null, which trips a configuration parsing warning ("peft.task_type" must be a string) on load. It now declares "task_type": "SEQ_2_SEQ_LM" — the correct PEFT task type for an encoder-decoder ASR adapter. Ten bytes changed and nothing else: the adapter weights are untouched, so the SHA-256 above still holds. Verified with PeftConfig.from_pretrained on this repo — task_type parses as SEQ_2_SEQ_LM with no warning. The remaining monteclora_config / velora_config notice is benign version skew (keys written by PEFT 0.20.0, ignored by older readers) and was deliberately left in place rather than falsifying the training artifact.

Reproduction

Source checkpoint: the adapter in this repo, SHA-256 7b130b0dcc9d9af62563fa1720028dd1d7d4c4a9606fd03c89745ce3fd01710f; loads over openai/whisper-medium with zero missing keys expected (adapter-only file).

# Training has no published script — the W&B run above is the record.
# Transcription (after the processor-config fix lands):
pipe = pipeline(task="automatic-speech-recognition",
                model="algerian-nlp/Hadra-ASR-whisper-medium",
                chunk_length_s=30)
pipe("clip.mp3", generate_kwargs={"language": "arabic", "task": "transcribe"})

Seeding notes: the training seed is unmeasured — reruns will move by an unmeasured amount. If a number cannot be reproduced from this section, it is not a result: that applies to every WER in Results until an independent run reproduces them.

Citation

@misc{algerian_nlp_hadra_asr_whisper_medium_2026,
  title  = {Hadra-ASR-whisper-medium: Algerian Darja speech recognition with a Whisper-medium LoRA adapter},
  author = {Touati, Kamel and Algerian NLP Collective},
  year   = {2026},
  url    = {https://huggingface.co/algerian-nlp/Hadra-ASR-whisper-medium}
}
@article{radford2022whisper,
  title={Robust Speech Recognition via Large-Scale Weak Supervision},
  author={Radford, Alec and Kim, Jong Wook and Xu, Tao and Brockman, Greg and McLeavey, Christine and Sutskever, Ilya},
  journal={arXiv preprint arXiv:2212.04356},
  year={2022}
}

Licence

MIT for the adapter weights and card. Read the licence composition of the training audio above before redistributing derivatives — a permissive grant on the adapter makes no claim about the underlying speech.

Downloads last month
46
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for algerian-nlp/Hadra-ASR-whisper-medium

Adapter
(137)
this model

Datasets used to train algerian-nlp/Hadra-ASR-whisper-medium

Paper for algerian-nlp/Hadra-ASR-whisper-medium

Evaluation results

  • WER (test, darija normaliser; single run, seeds unmeasured) on OddAdmix Algerian Kahwa Podcast (test)
    self-reported
    0.007
  • WER (test, darija normaliser; single run, seeds unmeasured) on OddAdmix Algerian Loubna Stories (test)
    self-reported
    0.003
  • WER (test, darija normaliser; single run, seeds unmeasured) on OddAdmix Algerian Rawi Stories (test)
    self-reported
    0.009