Add wav2vec2 support
Request
Add support for the wav2vec2 speech model family to transcribe.cpp.
Motivation
wav2vec2 (Facebook AI / Meta) is a widely used self-supervised speech representation model with a large ecosystem of fine-tuned CTC ASR checkpoints on Hugging Face (e.g. facebook/wav2vec2-base-960h, facebook/wav2vec2-large-960h-lv60-self, and many multilingual/XLSR variants). Supporting it would broaden the set of ASR backends transcribe.cpp can run and enable low-latency CTC decoding for languages where wav2vec2 fine-tunes are the strongest option.
Scope
Bring wav2vec2 through the standard porting pipeline:
- Intake + capability table
- Oracle packet (reference tensor dumps, transcripts, measured reference WER, tolerances)
- Reference-dtype GGUF converter
- C++ arch implementation (
src/arch/wav2vec2/*) with CTC decoding - Quant matrix + WER sweep
- User-facing docs / model card
After studying the existing wav2vec2 ecosystem more closely, I want to emphasize just how many concrete models this unlocks.
In the Indic Transcriber project alone, we run three wav2vec2-family models in production:
- Swecha Gonthuka (swechatelangana/swecha-gonthuka-asr) - a 94.4M-parameter Wav2Vec2ForCTC checkpoint fine-tuned on CLSRIL-23 for Telugu ASR. Vanilla wav2vec2-CTC, no custom code.
- IndicConformer-600M (ai4bharat/indic-conformer-600m-multilingual) - a multilingual Conformer CTC/RNNT covering all 22 official Indian languages (IN-22).
- SraVaani-1.0 (ARTPARK-IISc/SraVaani-1.0) - a FastConformer TDT-CTC covering 63 Indian languages/dialects.
Beyond that, the broader Indic/multilingual wav2vec2 ecosystem includes:
- AI4Bharat IndicWav2Vec - pretrained on 40 Indian languages, with fine-tuned ASR checkpoints for Bengali, Gujarati, Hindi, Marathi, Nepali, Odia, Sinhala, Tamil, and Telugu (github.com/AI4Bharat/IndicWav2Vec).
- Multiple XLSR-53 fine-tunes for Hindi and other low-resource languages (by theainerd, DrishtiSharma, shoubhik, harshit345, etc.).
- w2vindia (balaragavesh/w2vindia) - a Wav2Vec2 Base pretrained from scratch on mixed Indic languages.
- Hundreds more Wav2Vec2ForCTC checkpoints on Hugging Face for languages spanning every continent.
All of these share the same core architecture (Wav2Vec2ForCTC, greedy CTC decode, 16 kHz input, identical feature extraction). A single wav2vec2 arch implementation would make every one of them runnable as GGUF on the ggml runtime.
The strategic case: whisper.cpp has the massive edge-device install base but only runs Whisper. transcribe.cpp already supports 16+ model families and is the natural successor. Wav2vec2 is arguably the single most-ported CTC architecture on Hugging Face - "port once, get thousands of models." Once that bridge is built, any whisper.cpp deployment can migrate to transcribe.cpp and gain Whisper + Parakeet + Canary + every wav2vec2 fine-tune ever published, all in one binary, through the same Metal/Vulkan/CUDA backends.
For context, Indic Transcriber runs on free CPU (2 vCPU) via transformers+torch. Porting even just Swecha Gonthuka (94.4M params) to GGUF via a wav2vec2 arch would drop memory 3-5x and eliminate the torch dependency, making these models viable for ARM SBCs, mobile, and edge scenarios where whisper.cpp currently dominates.
Yeah, I do think we definitely should port it. I appreciate you making this issue. It will come in