hubert-base-ls960

What is this model?

facebook 222K downloads apache-2.0 Feature Extraction
Frameworkstransformerspytorchtf
Languagesen
Datasetslibrispeech_asr
Tagshubertfeature-extractionspeech
Downloads
222K
License
apache-2.0
Pipeline
Feature Extraction
Author
facebook

Run hubert-base-ls960 locally on a Q4KM hard drive

Looking for a plug‑and‑play solution? Q4KM offers high‑performance SSDs pre‑loaded with facebook/hubert-base-ls960 and all necessary dependencies. Deploy instantly on‑premise or in edge devices. Get...

Shop Q4KM Drives

Technical Overview

What is this model? facebook/hubert-base-ls960 is the base‑size version of Facebook’s HuBERT (Hidden‑Unit BERT) self‑supervised speech representation learner. It is pretrained on 960 hours of Librispeech audio sampled at 16 kHz and learns to predict masked acoustic frames from an offline clustering target. Because it operates directly on raw waveform, the model does not require a tokenizer during pre‑training.

Key features and capabilities

  • Self‑supervised pre‑training on 16 kHz speech – no text labels needed.
  • Masked acoustic modeling using cluster IDs derived from a two‑stage k‑means pipeline.
  • Feature‑extraction pipeline tag – produces high‑dimensional embeddings (768 dim) that can be fed to downstream tasks such as ASR, speaker identification, or speech‑to‑text.
  • Compatible with both PyTorch and TensorFlow via the 🤗 Transformers HubertModel class.
  • Ready for fine‑tuning with HubertForCTC for Connectionist Temporal Classification (CTC) speech recognition.

Architecture highlights

  • Backbone: 12 transformer encoder layers (similar to BERT‑base) with 768 hidden units, 12 attention heads, and a total of ~95 M parameters.
  • Input: 16 kHz raw waveform, chunked into 25 ms frames with 20 ms stride, then projected to a 512‑dim convolutional feature extractor before the transformer.
  • Masking strategy: Randomly masks 15 % of the time‑steps, forcing the model to reconstruct the discrete cluster label for the masked region.
  • Two‑stage clustering: First stage uses 100 k‑means clusters; second stage refines to 500 clusters, providing richer targets for the prediction loss.

Intended use cases

  • Automatic Speech Recognition (ASR) – fine‑tune on labeled transcripts for CTC‑based decoding.
  • Speech feature extraction – use the frozen encoder as a universal speech embedding extractor for downstream tasks (speaker verification, emotion detection, keyword spotting).
  • Speech generation & compression – the model’s learned representations can be leveraged in generative pipelines or low‑bitrate codecs.

Benchmark Performance

Relevant benchmarks for self‑supervised speech models are the LibriSpeech test‑clean / test‑other Word Error Rate (WER) and the Libri‑Light low‑resource subsets. These datasets stress both acoustic robustness and the model’s ability to generalize from limited fine‑tuning data.

Reported performance (from the original HuBERT paper) shows that the base‑size model, after fine‑tuning on the full 960 h Librispeech set, achieves WERs comparable to wav2vec 2.0‑base: roughly 2.3 % on test‑clean and 5.2 % on test‑other. When fine‑tuned on only 10 h of transcribed data, the model still outperforms wav2vec 2.0‑base by a noticeable margin, demonstrating the strength of its self‑supervised pre‑training.

Why these benchmarks matter LibriSpeech is the de‑facto standard for English ASR; low‑resource subsets (1 h, 10 h, 100 h) simulate real‑world scenarios where annotated data are scarce. HuBERT’s ability to maintain low WER across these splits confirms its suitability for both large‑scale commercial ASR services and niche applications with limited data.

Comparison to similar models – Compared to wav2vec 2.0‑base (≈100 M params) and the newer data‑2‑Vec‑large, HuBERT‑base offers a better trade‑off between parameter count and performance, especially on the “dev‑other” and “test‑other” subsets where acoustic variability is higher. Its clustering‑based targets provide a more stable learning signal than the quantization approach used in wav2vec 2.0.

Hardware Requirements

VRAM for inference – The frozen encoder (12 layers, 768 hidden) occupies roughly 1.2 GB of GPU memory when processing a 30‑second audio chunk at batch size = 1. For real‑time streaming, a GPU with at least 4 GB VRAM (e.g., NVIDIA RTX 2060) is comfortable.

Recommended GPU specifications

  • CUDA‑compatible GPU with ≥ 6 GB VRAM (e.g., RTX 3060, T4, A100) for batch inference or fine‑tuning.
  • GPU compute capability ≥ 7.0 for optimal transformer kernel performance.

CPU requirements – If GPU is unavailable, inference can be performed on a modern multi‑core CPU (e.g., Intel i7‑9700K or AMD Ryzen 7 3700X) using the torch CPU backend. Expect ~3‑4× slower throughput (≈ 30 ms per second of audio) and higher RAM usage (~8 GB).

Storage needs – The model checkpoint is ~1.2 GB (including tokenizer‑free config). Additional space is required for the feature extractor cache (~200 MB) and any fine‑tuned CTC head you add.

Performance characteristics – On an RTX 3080, the encoder can process ~200 ms of audio per millisecond of wall‑clock time (≈ 5× real‑time). Batch processing (batch = 8) improves throughput to > 10× real‑time while staying under 8 GB VRAM.

Use Cases

Primary applications

  • High‑accuracy English ASR – fine‑tune HubertForCTC on domain‑specific transcripts (call‑center, medical dictation).
  • Speech embedding extraction – feed the frozen encoder into downstream classifiers for speaker verification, emotion recognition, or language identification.
  • Low‑resource language bootstrapping – leverage the pre‑trained acoustic encoder and fine‑tune on a few hours of transcribed speech in a new language (after re‑clustering).

Real‑world examples

  • Voice‑assistant wake‑word detection – use embeddings as features for a lightweight downstream classifier.
  • Audio‑search indexing – generate fixed‑length vectors for each audio segment, enabling fast similarity search in large media libraries.
  • Transcription services – integrate the model into a cloud‑based pipeline that streams 16 kHz audio, performs real‑time CTC decoding, and returns subtitles.

Industry domains – Call‑center analytics, e‑learning platforms (lecture transcription), media & entertainment (subtitle generation), healthcare (clinical note dictation), and security (voice biometrics).

Integration possibilities – The model is fully compatible with 🤗 Transformers, allowing seamless integration into Python, JavaScript (via ONNX), or C++ pipelines. Export to ONNX or TorchScript for deployment on edge devices or cloud inference services (Azure, AWS, GCP).

Training Details

Methodology – HuBERT is trained in two phases. First, a simple k‑means clustering (100 clusters) is performed on raw MFCC‑like features to generate pseudo‑labels. The model then learns to predict these labels for masked time‑steps using a cross‑entropy loss. After the first epoch, a second clustering step (500 clusters) refines the targets, and training continues with the new labels. This iterative process stabilizes the learning signal without requiring any human transcription.

Datasets – The base model was pre‑trained on the full 960 h Librispeech corpus (train‑clean‑100, train‑clean‑360, train‑other‑500) sampled at 16 kHz. No additional text data are used during pre‑training.

Compute requirements – Training the base model required ~32 A100 GPUs (40 GB) for roughly 400 k updates, consuming ~2 M GPU‑hours. The training script is part of Facebook’s fairseq repository.

Fine‑tuning capabilities – For ASR, replace the generic Wav2Vec2ForCTC head with HubertForCTC and fine‑tune on any labeled speech dataset (e.g., Librispeech‑960h, CommonVoice). The model adapts well to low‑resource scenarios; fine‑tuning on as little as 10 min of transcribed speech can yield reasonable WERs after a few epochs.

Licensing Information

The model card lists the license as Apache‑2.0. This permissive license grants you the right to use, modify, distribute, and commercialize the model and its derivatives, provided you comply with the following conditions:

  • Attribution: You must retain the original copyright notice and provide a clear attribution to Facebook AI Research (FAIR) and the authors of the HuBERT paper.
  • State changes: If you modify the model or its weights, you must indicate that changes were made.
  • Patent grant: The license includes a patent‑grant clause covering any patents held by the contributors that are necessary to use the software.

Because the license is permissive, commercial use is fully allowed. The only practical restriction is the requirement to include the Apache‑2.0 NOTICE file in any redistribution (including on a hard‑drive or in a SaaS offering). No royalty fees or source‑code disclosure obligations exist.

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