An early, deliberately published negative result: the first ECAPA run, stopped at step 6,000 while the backbone was still frozen.
Part of the NAMAA at NADI 2026 Shared Task collection.
Read this first. This checkpoint scores 36.79% — it is not a model you should deploy. It is kept in the open because it is the control for the frozen-warmup schedule: at step 6,000 only the 20-way head had been trained and the ECAPA backbone was still frozen, and the identical recipe run to step 86,000 with the backbone unfrozen reaches 80.57% (
nadi26-adi20-ecapa-tdnn). The gap between the two is the value of unfreezing, measured rather than assumed.
Use it to reproduce that ablation, to sanity-check a training loop, or as a floor. Do not use it for dialect ID.
| Property | Details |
|---|---|
| Task | 20-way spoken Arabic dialect / country identification |
| Shared task | NADI 2026, Subtask 2 (Spoken Dialect ID) |
| Architecture | ECAPA-TDNN (VoxLingua107) + attentive stat pooling + 20-way head |
| Base model | speechbrain/lang-id-voxlingua107-ecapa |
| Parameters | 21,242,081 trained |
| Weights | 85 MB safetensors (fp32) |
| Audio input | mono, 16,000 Hz |
| Output | log-probabilities over 20 classes |
| Dev accuracy | 36.79% |
| Dev average cost | 0.4956 (lower is better) |
| Checkpoint | best eval at step 6,000 of 90,000 |
All four systems in this release share one training recipe and one evaluation protocol, so these numbers are directly comparable.
| System | Backbone | Params | Dev accuracy | Avg cost |
|---|---|---|---|---|
nadi26-adi20-whisper-small |
whisper-small | 88,169,492 | 85.53% | 0.0938 |
nadi26-adi20-ecapa-tdnn |
lang-id-voxlingua107-ecapa | 21,242,081 | 80.57% | 0.1099 |
nadi26-adi20-xls-r-300m |
wav2vec2-xls-r-300m | 315,459,220 | 66.69% | 0.2402 |
nadi26-adi20-ecapa-tdnn-v0 — this model |
lang-id-voxlingua107-ecapa | 21,242,081 | 36.79% | 0.4956 |
| Two-way ECAPA + Whisper blend (alpha 0.55) | probability average | — | 85.58% | — |
| Four-way ensemble (+ 2 public classifiers) | weighted soft vote | — | 95.00% | 0.0507 |
Two results worth noting. Parameter count did not predict quality — XLS-R 300M is 3.6x the size of the Whisper encoder and lands 18.8 points behind it; pretraining domain mattered more than capacity. And combination paid more than any single architecture choice: the four-way weighted soft vote reported in the team paper reaches 95.00% development accuracy against 85.53% for the best single member, by adding two public classifiers to the two released here.
The two-way row was measured on 2026-07-18 against an earlier Whisper
checkpoint (dev 81.07%), where it beat its better member by 4.51 points. The
Whisper weights released here are the later step-90,000 checkpoint at 85.53%,
so that blend has not been re-measured against them. The four-way row is the
paper's development figure; its members and weights are described in
nadi26-adi20-ensemble.
Neither is a blind-set number — see below.
The numbers above are development accuracy. The shared task was scored on a held-out blind set, and that gap is the headline finding of this release:
| Accuracy | Avg cost | Set | |
|---|---|---|---|
| Four-way development ensemble | 95.00% | 0.0507 | ADI-20 micro validation (10,806 clips) |
| Official blind submission (three-model ensemble) | 37.70% | 0.1674 | NADI 2026 blind (878 clips) |
Organisers describe the blind evaluation as out of domain: it need not cover every class, and the recordings differ from the ADI-20 micro training material. A system at 95% on validation landing at 37.7% on the blind set is the honest measure of how far ADI-20-micro-trained dialect ID generalises — and the reason the per-model development numbers on this page should be read as in-domain results, not as a capability claim.
For reference, the organisers' own development baseline scores 81.19%, so the single systems here are competitive in-domain; the collapse is a shift problem, not a fitting problem.
Official blind figures from the team paper, CodaBench submission 861912. Blind-set feedback influenced which of ten submissions was retained, so the selected score is not an independent estimate of a pre-specified rule.
This is a SpeechBrain EncoderClassifier, not a transformers model. It needs
speechbrain installed and the VoxLingua107 hyperparameters pulled from the base
repo; the trained weights here are then loaded over them.
import torch, librosa
from huggingface_hub import hf_hub_download
from safetensors.torch import load_file
from speechbrain.inference.classifiers import EncoderClassifier
from speechbrain.dataio.encoder import CategoricalEncoder
from speechbrain.nnet.linear import Linear
REPO = "NAMAA-Space/nadi26-adi20-ecapa-tdnn-v0"
LABELS = ["MSA", "BAH", "TUN", "ALG", "EGY", "IRA", "JOR", "KSA", "KUW", "LEB", "LIB", "MAU", "MOR", "OMA", "PAL", "QAT", "SUD", "SYR", "UAE", "YEM"]
model = EncoderClassifier.from_hparams(
source="speechbrain/lang-id-voxlingua107-ecapa", savedir="pretrained_ecapa")
model.get_submodule("mods.classifier")["out"] = Linear(n_neurons=20, input_size=512)
enc = CategoricalEncoder(); enc.update_from_iterable(LABELS)
model.hparams.label_encoder = enc
state = load_file(hf_hub_download(REPO, "model.safetensors"))
missing, unexpected = model.load_state_dict(state, strict=False)
assert not unexpected, unexpected
model.eval()
wav, _ = librosa.load("clip.wav", sr=16_000, mono=True)
wav = torch.tensor(wav)[None, :16_000 * 30] # [1, samples]
with torch.no_grad():
log_probs, score, index, text = model(wav, torch.tensor([1.0]))
probs = log_probs.exp()[0]
for i in probs.argsort(descending=True)[:3]:
print("{:<4} {:.3f}".format(LABELS[int(i)], float(probs[i])))
Two things to watch:
.exp(), not
.softmax(), if you want probabilities;wav_lens is a fraction of the padded length, not a sample count. For a
batch, pass torch.tensor([len(w) / padded_len for w in wavs]).Class order is fixed; index i in the output vector is the code below.
| ID | Code | Variety | ID | Code | Variety |
|---|---|---|---|---|---|
| 0 | MSA |
Modern Standard Arabic | 10 | LIB |
Libya |
| 1 | BAH |
Bahrain | 11 | MAU |
Mauritania |
| 2 | TUN |
Tunisia | 12 | MOR |
Morocco |
| 3 | ALG |
Algeria | 13 | OMA |
Oman |
| 4 | EGY |
Egypt | 14 | PAL |
Palestine |
| 5 | IRA |
Iraq | 15 | QAT |
Qatar |
| 6 | JOR |
Jordan | 16 | SUD |
Sudan |
| 7 | KSA |
Saudi Arabia | 17 | SYR |
Syria |
| 8 | KUW |
Kuwait | 18 | UAE |
United Arab Emirates |
| 9 | LEB |
Lebanon | 19 | YEM |
Yemen |
A single multi-backbone recipe trained all four systems in this release, so the numbers above compare architectures rather than training tricks. Every run used the same data, schedule length, augmentation, metric and seed.
| Dataset | UBC-NLP/NADI_2026_ADI20_micro — 67,015 train / 10,806 validation clips |
| Classes | 20-way single-label country / variety ID |
| Objective | cross-entropy (log-probabilities + NLL) |
| Schedule | VoxLingua107 baseline multi-phase |
| Max steps | 90,000 (this checkpoint is the best eval at step 6,000) |
| Frozen warmup | first 15,000 steps train the head only, then the backbone unfreezes |
| Backbone LR / head LR | 0.0001 / 0.0001 |
| Batch | 8 x 2 grad-accum = 16 clips per update |
| Precision | bfloat16 autocast |
| Gradient clipping | 5.0 |
| Weight decay | 0.0 |
| Augmentation | random gain -4 to +4 dB, additive Gaussian noise at 15-30 dB SNR |
| Train crop | 8 s random crop |
| Eval cadence | every 2,000 steps, best kept on accuracy |
| Seed | 1337 |
Both metrics come from the validation split of
UBC-NLP/NADI_2026_ADI20_micro (10,806 clips), scored with the
NADI baseline's own evaluation code:
p_target = 0.5, C_miss = C_fa = 1, and the per-class false-alarm and
miss rates are averaged. Lower is better; it penalises confident mistakes
that accuracy alone hides.Audio is capped at 30 s at evaluation time (the first 30 s of any longer clip is used). No augmentation is applied at evaluation.
These are validation numbers, not blind-test numbers. The NADI 2026 blind test labels are held by the organisers; nothing in this repo was tuned on them.
The original artefact was a best.pt produced by torch.save mid-training,
carrying optimizer moments, scheduler state and RNG state alongside the weights.
This repo contains the weights only, in safetensors, with the SpeechBrain
parameter names preserved exactly (mods.embedding_model.*,
mods.classifier.*). Nothing about the network changed — it is the same tensors,
in a format that does not execute pickle on load.
config.json here is descriptive metadata (label maps, head shape, metrics). It
is not a transformers config: this model is a SpeechBrain
EncoderClassifier and is loaded with the snippet above, not with
AutoModel.from_pretrained.
If you need the optimizer state to resume training, it is in the original private checkpoint; ask the authors.
Intended use. Research on spoken Arabic dialect identification, NADI 2026 Subtask 2 reproduction, and as a component or baseline in Arabic speech pipelines.
Known limitations.
Out of scope. Do not use this to infer a person's nationality, residency, ethnicity or immigration status. Accent is not identity, the label space is a coarse proxy, and errors fall hardest on the varieties that are already least represented.
This model is part of the NAMAA Community submission to the NADI 2026 shared task, by Mohamed Abdelaziz, Fatima Emad Eldin, Mousa Ashraf Abd El Malak and Omer Nacar, released through NAMAA-Space (Network for Advancing Modern ArabicNLP & AI). Cite the team paper, not this repository alone.
@inproceedings{namaa_nadi2026,
title = {NAMAA Community at NADI 2026 shared task: Mixed-Dialect and
Code-Switched Arabic ASR and Dialect Identification},
author = {Abdelaziz, Mohamed and Emad Eldin, Fatima and
Abd El Malak, Mousa Ashraf and Nacar, Omer},
booktitle = {Proceedings of the Fourth Arabic Natural Language Processing
Conference (ArabicNLP 2026)},
year = {2026}
}
Please also cite the NADI 2026 shared-task overview (Sullivan et al., 2026), the
ADI-20 dataset (Elleuch et al., 2025),
and the base model speechbrain/lang-id-voxlingua107-ecapa.
| Model repository | NAMAA-Space/nadi26-adi20-ecapa-tdnn-v0 |
| Original checkpoint | FatimahEmadEldin/nadi26-ecapa-ckpts (private) |
| Collection | NAMAA at NADI 2026 Shared Task |