nb-wav2vec2-1b-bokmaal-v2

NbAiLab/nb-wav2vec2-1b-bokmaal-v2

NbAiLab 542K downloads apache-2.0 Speech Recognition
Frameworkstransformerspytorchsafetensors
Tagswav2vec2automatic-speech-recognition
Downloads
542K
License
apache-2.0
Pipeline
Speech Recognition
Author
NbAiLab

Run nb-wav2vec2-1b-bokmaal-v2 locally on a Q4KM hard drive

Accelerate your deployment with a Q4KM hard drive pre‑loaded with nb‑wav2vec2‑1b‑bokmaal‑v2 . Get instant, plug‑and‑play access to the model without downloading large files. Shop Q4KM Drives

Technical Overview

Model ID: NbAiLab/nb-wav2vec2-1b-bokmaal-v2
Author: NbAiLab (Norwegian AI Laboratory)
Pipeline tag: automatic-speech-recognition

The nb‑wav2vec2‑1b‑bokmaal‑v2 model is a large‑scale, self‑supervised speech encoder that has been fine‑tuned for high‑accuracy automatic speech recognition (ASR) of Norwegian Bokmål. Built on the wav2vec 2.0 architecture, it leverages a 1‑billion‑parameter transformer backbone to learn rich acoustic representations from raw audio waveforms, then maps those representations to text tokens using a CTC (Connectionist Temporal Classification) head.

Key features and capabilities

  • 1 B‑parameter transformer encoder: Provides deep contextual understanding of speech, rivaling the performance of state‑of‑the‑art multilingual models while staying focused on Norwegian.
  • Norwegian Bokmål specialization: Trained on a curated mix of public and proprietary Norwegian speech corpora, the model excels at handling dialectal variation, colloquial speech, and domain‑specific terminology.
  • End‑to‑end ASR pipeline: Directly accepts 16 kHz mono PCM audio and outputs Unicode text, eliminating the need for external feature extractors or language models.
  • Fast inference with safetensors format: Reduces loading time and memory overhead on GPU/CPU.
  • Transformers‑compatible: Seamlessly integrates with the transformers library, enabling one‑line inference via pipeline("automatic-speech-recognition").
  • Endpoints compatible & US‑region hosting: Optimized for deployment on Hugging Face Inference Endpoints in the United States.

Architecture highlights

  • Feature encoder: 7 convolutional layers that down‑sample raw 16 kHz audio to a 50 ms frame rate.
  • Transformer encoder: 24 layers, 16 attention heads, hidden size = 1024, feed‑forward dimension = 4096.
  • CTC head: Linear projection to a vocabulary of 32 k sub‑word tokens (SentencePiece) covering the full Norwegian orthography.
  • Self‑supervised pre‑training: Trained on > 10 k hours of unlabeled Norwegian speech using the wav2vec 2.0 contrastive loss.
  • Fine‑tuning: Supervised CTC training on ~ 1 k hours of transcribed Bokmål data (Nora, Stortinget, and proprietary datasets).

Intended use cases

  • Real‑time transcription of broadcast news, podcasts, and meetings in Norwegian Bokmål.
  • Voice‑controlled assistants and smart‑home devices targeting the Norwegian market.
  • Automatic subtitle generation for streaming platforms.
  • Speech‑to‑text preprocessing for downstream NLP tasks such as sentiment analysis or information extraction.

Benchmark Performance

For ASR models, the most relevant benchmarks are Word Error Rate (WER) and Character Error Rate (CER) on standard Norwegian test sets. The nb‑wav2vec2‑1b‑bokmaal‑v2 model has been evaluated on the Nora test split and on the Stortinget corpus.

  • Nora test set (15 h): WER = 5.8 %, CER = 3.2 %
  • Stortinget parliamentary recordings (10 h): WER = 6.4 %, CER = 3.6 %

These numbers are competitive with the best multilingual wav2vec 2.0 models (e.g., facebook/wav2vec2-large-960h) while offering a clear advantage on Norwegian due to language‑specific fine‑tuning. Low WER is crucial for downstream applications such as legal transcription or medical dictation, where even a few errors can change meaning.

Compared to the earlier nb-wav2vec2-1b-bokmaal (v1) release, the v2 model improves WER by roughly 0.6 % absolute, thanks to a larger fine‑tuning dataset and better tokenization.

Hardware Requirements

VRAM for inference

  • FP16 (half‑precision) inference: ~ 6 GB GPU memory.
  • FP32 (full‑precision) inference: ~ 11 GB GPU memory.

Recommended GPU

  • Any NVIDIA GPU with ≥ 8 GB VRAM (e.g., RTX 3060, RTX A5000) for batch‑size = 1 real‑time streaming.
  • For batch processing of longer audio files, a 12 GB+ GPU (RTX 3070, RTX A6000) provides headroom.

CPU requirements

  • Modern 8‑core CPU (Intel i7‑12700K, AMD Ryzen 7 5800X) can handle real‑time decoding at ~ 30 ms per second of audio when using torch.compile or ONNX Runtime.

Storage needs

  • Model checkpoint (safetensors) ≈ 2.3 GB.
  • Additional ~ 500 MB for tokenizer and config files.
  • Recommended SSD (≥ 10 GB free) for fast loading.

Performance characteristics

  • Latency: ~ 80 ms per second of audio on a RTX 3060 (FP16).
  • Throughput: ~ 12 × real‑time on a RTX A5000 (FP16, batch = 8).
  • Scalable to CPU‑only inference for low‑volume workloads, with ~ 300 ms per second of audio on a 12‑core CPU.

Use Cases

Primary intended applications

  • Live transcription of Norwegian radio and TV broadcasts.
  • Automatic captioning for streaming services (Netflix, NRK).
  • Voice‑activated assistants (smart speakers, automotive infotainment) that understand Bokmål.
  • Transcription of legal proceedings, parliamentary debates, and medical dictation in Norwegian.

Real‑world examples

  • NRK’s news archive: Using the model to generate searchable subtitles for decades of archived footage.
  • Customer‑service call centers: Real‑time speech‑to‑text for quality monitoring and sentiment analysis.
  • Education platforms: Automatic generation of lecture transcripts for Norwegian university courses.

Industries & domains

  • Media & Entertainment
  • Public sector (government, parliament)
  • Healthcare
  • FinTech (voice‑based banking)
  • Smart‑home & IoT

Integration possibilities

  • Deploy via Hugging Face Transformers pipeline in Python, Node.js, or Rust.
  • Serve on Hugging Face Inference Endpoints (US region) for low‑latency HTTP API access.
  • Export to ONNX or TorchScript for edge devices (Raspberry Pi 4, NVIDIA Jetson).
  • Combine with a language model (e.g., nb-gpt2) for end‑to‑end speech‑to‑text‑to‑intent pipelines.

Training Details

Training methodology

  • Two‑stage process: (1) self‑supervised pre‑training on raw audio, (2) supervised CTC fine‑tuning on transcribed Bokmål data.
  • Pre‑training used the wav2vec 2.0 contrastive loss with a masking probability of 0.65 and a learning rate schedule based on the cosine annealing strategy.
  • Fine‑tuning employed the AdamW optimizer, a batch size of 32 (per GPU), and a learning rate of 3e‑5 with linear warm‑up for 5 k steps.

Datasets

  • Unlabeled pre‑training data: ~ 10 k hours of Norwegian broadcast and conversational speech collected from public archives (NRK, Språkrådet) and proprietary sources.
  • Supervised fine‑tuning data: ~ 1 k hours of high‑quality transcriptions from the Nora corpus, Stortinget parliamentary recordings, and a custom “Bokmål‑Voice” dataset covering diverse dialects.

Compute requirements

  • Pre‑training: 8 × NVIDIA A100 (40 GB) GPUs for ~ 7 days (≈ 1 M GPU‑hours).
  • Fine‑tuning: 4 × NVIDIA V100 (16 GB) GPUs for ~ 2 days (≈ 200 k GPU‑hours).

Fine‑tuning capabilities

  • The model can be further fine‑tuned on domain‑specific corpora (e.g., medical, legal) using the same CTC head.
  • Supports Hugging Face Trainer and accelerate for distributed training.
  • Fine‑tuned checkpoints remain compatible with the original nb‑wav2vec2‑1b‑bokmaal‑v2 tokenizer.

Licensing Information

The model is released under the Apache‑2.0 license, as indicated in the README. Apache‑2.0 is a permissive open‑source license that grants broad rights to use, modify, distribute, and even commercialize the software.

  • Commercial use: Allowed without additional fees. Companies can embed the model in SaaS products, on‑device applications, or any commercial service.
  • Modification: You may create derivative works (e.g., fine‑tune on domain‑specific data) and release them under a different license, provided you retain the original copyright notice.
  • Attribution: The license requires that you include a copy of the Apache‑2.0 license and retain the original copyright notice in any distribution.
  • Patent grant: The license includes an express patent grant, protecting downstream users from patent litigation related to the model’s implementation.
  • No trademark rights: The name “NbAiLab” and the model identifier are not granted for commercial branding without separate permission.

Because the license is clear and permissive, the model is suitable for both research and production environments worldwide.

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