Instructions to use QuechuaBase/xls-r-cpt-qxp-cv26-silver with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Fairseq
How to use QuechuaBase/xls-r-cpt-qxp-cv26-silver with Fairseq:
from fairseq.checkpoint_utils import load_model_ensemble_and_task_from_hf_hub models, cfg, task = load_model_ensemble_and_task_from_hf_hub( "QuechuaBase/xls-r-cpt-qxp-cv26-silver" ) - Notebooks
- Google Colab
- Kaggle
xls-r-cpt-qxp-cv26-silver
wav2vec 2.0 (XLS-R 300M) with continued pre-training on Puno Quechua audio, then fine-tuned with CTC for Puno Quechua (qxp) speech recognition on the Common Voice 26 release. Part of the asr-puno-quechua collection; code at github.com/QuechuaBase/asr-puno-quechua.
- xls-r-cpt: starts from
QuechuaBase/xls-r-cpt-qxp, our XLSR-128 300M checkpoint continued pre-trained (self-supervised, no transcripts) on ~60 h of Puno Quechua scripted and spontaneous audio: 10k updates, lr 1e-4, 1k warmup, equal mixing of both corpora. Thexls-r-qxp-*models skip this step. - cv26: Common Voice 26 splits (scripted 20,870 / 948 / 909 clips; spontaneous 5,902 / 575 / 546).
- silver: fine-tuned on validated scripted speech plus auto-transcribed spontaneous speech. Better on conversational audio, slightly worse on read speech than the
*-validatedmodels.
Data
Common Voice Scripted and Spontaneous Speech for qxp from the Mozilla Data Collective (CC0-1.0). ~30 h validated scripted (77 speakers) and ~30 h validated spontaneous (110 speakers). Text lower-cased and normalised; 45-character letter vocabulary.
Training
fairseq audio_finetuning, CTC loss, config w2v2-large-finetune_qxp.yaml: 20k updates, lr 5e-5 (Adam, tri-stage), encoder frozen for the first 10k updates, mask_prob 0.75, layerdrop 0.1, fp16, best checkpoint by dev WER. CPT config: w2v2-large-cpt_qxp.yaml.
Usage
The checkpoint is a native fairseq .pt. Use the transcription script from the repo:
git clone https://github.com/QuechuaBase/asr-puno-quechua && cd asr-puno-quechua
huggingface-cli download QuechuaBase/xls-r-cpt-qxp-cv26-silver checkpoint_best.pt --local-dir checkpoints/ft_cpt_silver/
docker compose run asr-puno-quechua -c \
"python inference/transcribe.py --ckpt checkpoints/ft_cpt_silver/checkpoint_best.pt recording.wav"
WAV or MP3 input, any sample rate (resampled to 16 kHz mono). See inference/README.md.
License
Weights: Apache-2.0. Data: CC0-1.0.