wav2vec2-xls-r-300m

facebook/wav2vec2‑xls‑r‑300m is a 300‑million‑parameter, multilingual speech‑representation model built on the wav2vec 2.0 architecture. It is part of Facebook AI’s

facebook 199K downloads apache-2.0 Other
Frameworkstransformerspytorch
Languagesmultilingualafsqarbnbg
Datasetscommon_voicemultilingual_librispeech
Tagswav2vec2pretrainingspeechxls_rxls_r_pretrainedabamhy
Downloads
199K
License
apache-2.0
Pipeline
Other
Author
facebook

Run wav2vec2-xls-r-300m locally on a Q4KM hard drive

Accelerate your deployments with Q4KM hard‑drives pre‑loaded with the facebook/wav2vec2‑xls‑r‑300m model. Get instant access to a ready‑to‑run inference engine, eliminating download time and...

Shop Q4KM Drives

Technical Overview

facebook/wav2vec2‑xls‑r‑300m is a 300‑million‑parameter, multilingual speech‑representation model built on the wav2vec 2.0 architecture. It is part of Facebook AI’s XLS‑R family – “Cross‑Lingual Speech Representation Learning” – and is often described as the “XLM‑R for speech.” The model ingests raw audio waveforms sampled at 16 kHz and outputs dense, contextualized embeddings that capture phonetic, prosodic, and linguistic information without any language‑specific supervision.

Key capabilities include:

  • Pre‑trained on 436 k hours of unlabeled speech covering 128 languages, ranging from high‑resource (English, Mandarin) to low‑resource (Afar, Bemba, etc.).
  • Supports downstream tasks such as Automatic Speech Recognition (ASR), speech translation, language identification, and audio‑based classification.
  • Works out‑of‑the‑box with the 🤗 Transformers Wav2Vec2Processor and Wav2Vec2Model pipelines.

Architecture highlights:

  • Backbone: wav2vec 2.0 “feature encoder” (7 convolutional blocks) followed by a Transformer encoder (12 layers, 768 hidden size, 12 attention heads).
  • Quantization module that learns a discrete latent space, enabling the contrastive loss used during pre‑training.
  • 300 M parameters strike a balance between expressive power and compute efficiency, making it suitable for both research and production environments.

Intended use cases focus on multilingual speech processing where a single model can be fine‑tuned for many languages, reducing the need for language‑specific models and simplifying deployment pipelines.

Benchmark Performance

XLS‑R‑300M has been evaluated on several public speech benchmarks that matter for multilingual models:

  • CoVoST‑2 – speech‑to‑text translation (21 language‑to‑English directions). The model achieved an average improvement of 7.4 BLEU over previous state‑of‑the‑art systems.
  • CommonVoice – large‑scale multilingual ASR. Relative word‑error‑rate (WER) reductions of 20‑33 % compared to earlier wav2vec 2.0 baselines.
  • MLS (Multilingual LibriSpeech) – high‑resource ASR, where XLS‑R‑300M matched or surpassed English‑only pre‑trained models.
  • VoxLingua107 – language identification, where the model set a new state‑of‑the‑art accuracy.

These benchmarks are crucial because they test the model’s ability to generalize across languages, domains, and data‑scarcity regimes. Compared to the smaller 300 M variant, the 1 B and 2 B XLS‑R models provide higher absolute scores, but the 300 M version remains competitive while requiring far less hardware, making it the sweet spot for many commercial deployments.

Hardware Requirements

Inference VRAM – The model’s checkpoint (≈ 1.2 GB) plus the feature encoder typically needs 4 GB of GPU memory for a single utterance at 16 kHz. Batch inference with longer sequences may push the requirement to 6‑8 GB.

Recommended GPU – Any recent NVIDIA GPU with ≥ 8 GB VRAM (e.g., RTX 3060, A100‑40 GB, or V100) will comfortably run the model in real‑time for short utterances. For large‑scale batch processing, a GPU with ≥ 16 GB VRAM is advisable to avoid frequent device‑to‑host transfers.

CPU – The model can be run on CPU‑only environments using the torch backend, but inference speed drops to ~0.5 × real‑time on a single 8‑core CPU. For production, a GPU is strongly recommended.

Storage – The model files (weights, config, tokenizer) occupy roughly 1.5 GB on disk. Additional space is needed for the audio datasets used during fine‑tuning (e.g., CommonVoice, MLS), which can exceed 100 GB.

Performance – On a RTX 3080, the model processes ~30 seconds of audio per second of wall‑clock time (≈ 0.03 s per second of audio) with a batch size of 8. Latency scales linearly with batch size and sequence length.

Use Cases

The multilingual nature and strong speech representation of XLS‑R‑300M open many practical applications:

  • Multilingual ASR services – Voice assistants that need to understand dozens of languages from a single model.
  • Speech‑to‑text translation – Real‑time translation pipelines for call‑center transcription, conference interpreting, or media subtitling.
  • Language identification – Detecting the spoken language in broadcast monitoring or content moderation.
  • Audio classification – Detecting emotions, speaker traits, or acoustic events across languages.
  • Low‑resource language research – Fine‑tuning on a few hours of transcribed data to bootstrap ASR for endangered languages.

Industries that benefit include telecommunications, e‑learning platforms, media & entertainment, and accessibility services (e.g., captioning for the deaf and hard‑of‑hearing). The model can be integrated via the 🤗 Transformers library, ONNX export, or TorchScript for deployment in cloud, edge, or mobile environments.

Training Details

Methodology – The model was trained using the wav2vec 2.0 self‑supervised objective: a contrastive loss over quantized latent representations combined with a diversity loss to encourage the use of the full codebook. Training proceeded in two stages: (1) a large‑scale unsupervised pre‑training on raw audio, followed by (2) optional supervised fine‑tuning on task‑specific labeled data.

Datasets – Pre‑training leveraged a massive multilingual corpus consisting of:

  • CommonVoice (multiple languages)
  • Multilingual LibriSpeech (MLS)
  • VoxPopuli, BABEL, VoxLingua107

In total, the model saw 436 k hours of speech across 128 languages, with a balanced mixture of high‑ and low‑resource languages.

Compute – Training was performed on a cluster of NVIDIA V100 GPUs (32 GB) for roughly 1 M steps, amounting to an estimated 2‑3 M GPU‑hours. The 300 M parameter size reduced the compute cost compared to the 2 B variant while still achieving strong cross‑lingual performance.

Fine‑tuning – The model can be fine‑tuned on downstream tasks with as little as a few hundred labeled utterances. Typical fine‑tuning recipes use a CTC loss for ASR or a sequence‑to‑sequence loss for speech translation, often converging within 10‑20 k steps on a single GPU.

Licensing Information

The README lists the model under the Apache‑2.0 license, while the Hugging Face hub currently shows the license as “unknown”. In practice, the underlying code and pre‑training data are released under Apache‑2.0, which is a permissive open‑source license.

  • Commercial use – Apache‑2.0 explicitly permits commercial exploitation, including embedding the model in proprietary products.
  • Modification & redistribution – You may modify the model weights or architecture and redistribute the derivatives, provided you retain the license notice.
  • Patent grant – The license includes a patent‑grant clause, protecting users from patent infringement claims related to the contributed code.
  • Attribution – You must retain the original copyright notice and provide a copy of the license in any distribution.

If the hub’s “unknown” tag causes uncertainty, it is advisable to verify the license directly from the original Fairseq repository (Apache‑2.0) or contact the model maintainer before using the model in a commercial setting.

Pre-loaded AI models. Ready to run.

Skip the downloads. Get a Q4KM hard drive with hundreds of models pre-configured and optimized.

Shop Q4KM Hard Drives