Model reference · open weights
wav2vec2-large-xlsr-53-icelandic-ep30-967h is an open-weight audio or speech model from language-and-voice-lab. wav2vec2-large-xlsr-53-icelandic-ep30-967h (BF16) weighs 1.3 GB; the smallest configuration that runs it is RTX 3060 12 GB.
For self-hosting, compare this build's requirements below with the GPU you plan to rent.
Summary of the language-and-voice-lab/wav2vec2-large-xlsr-53-icelandic-ep30-967h model card, 2026-10-01
What it is
| Released by | language-and-voice-lab |
|---|---|
| Released | 2023-07-30 |
| VRAM | 1.3 GB for the weights |
What it runs on
| Card | One stream | Memory |
|---|---|---|
| RTX 3060 12 GB | fits | 11.6 GB |
| RTX 4060 Ti 16 GB | fits | 15.4 GB |
| RTX 3090 24 GB | fits | 23.4 GB |
| RTX 4090 24 GB | fits | 23.4 GB |
| RTX 5090 32 GB | fits | 31.0 GB |
| L40S 48 GB | fits | 44.0 GB |
| A100 80 GB | fits | 78.2 GB |
| H100 80 GB | fits | 78.1 GB |
| RTX PRO 6000 Blackwell 96 GB | fits | 93.8 GB |
| DGX Spark (GB10) 128 GB unified | fits | 107 GB |
| H200 141 GB | fits | 138 GB |
| B200 180 GB | fits | 176 GB |
From the model card
The "wav2vec2-large-xlsr-53-icelandic-ep30-967h" is an acoustic model suitable for Automatic Speech Recognition in Icelandic. It is the result of fine-tuning the model facebook/wav2vec2-large-xlsr-53 for 30 epochs with 967 hours of Icelandic data collected by the Language and Voice Laboratory through the platform Samrómur.
The specific data that was used to fine-tune the model is the corpus Samrómur Milljón, which is the result of the automatic verification of 1 million of recordings comming from the corpus "Samromur Unverified 22.07". It has to be pointed out that this model was trained with different data than our previous model wav2vec2-large-xlsr-53-icelandic-ep10-1000h .
The fine-tuning process was performed during July (2023) in the servers of the Language and Voice Laboratory (https://lvl.ru.is/) at Reykjavík University (Iceland) by Carlos Daniel Hernández Mena.
import torch
from transformers import Wav2Vec2Processor
from transformers import Wav2Vec2ForCTC
#Load the processor and model.
MODEL_NAME="language-and-voice-lab/wav2vec2-large-xlsr-53-icelandic-ep30-967h"
processor = Wav2Vec2Processor.from_pretrained(MODEL_NAME)
model = Wav2Vec2ForCTC.from_pretrained(MODEL_NAME)
#Load the dataset
from datasets import load_dataset, load_metric, Audio
ds=load_dataset("language-and-voice-lab/samromur_children", split="test")
#Downsample to 16kHz
ds = ds.cast_column("audio", Audio(sampling_rate=16_000))
#Process the dataset
def prepare_dataset(batch):
audio = batch["audio"]
#Batched output is "un-batched" to ensure mapping is correct
batch["input_values"] = processor(audio["array"], sampling_rate=audio["sampling_rate"]).input_values[0]
with processor.as_target_processor():
batch["labels"] = processor(batch["normalized_text"]).input_ids
return batch
ds = ds.map(prepare_dataset, remove_columns=ds.column_names,num_proc=1)
#Define the evaluation metric
import numpy as np
wer_metric = load_metric("wer")
def compute_metrics(pred):
pred_logits = pred.predictions
pred_ids = np.argmax(pred_logits, axis=-1)
pred.label_ids[pred.label_ids == -100] = processor.tokenizer.pad_token_id
pred_str = processor.batch_decode(pred_ids)
#We do not want to group tokens when computing the metrics
label_str = processor.batch_decode(pred.label_ids, group_tokens=False)
wer = wer_metric.compute(predictions=pred_str, references=label_str)
return {"wer": wer}
#Do the evaluation (with batch_size=1)
model = model.to(torch.device("cuda"))
def map_to_result(batch):
with torch.no_grad():
input_values = torch.tensor(batch["input_values"], device="cuda").unsqueeze(0)
logits = model(input_values).logits
pred_ids = torch.argmax(logits, dim=-1)
batch["pred_str"] = processor.batch_decode(pred_ids)[0]
batch["sentence"] = processor.decode(batch["labels"], group_tokens=False)
return batch
results = ds.map(map_to_result,remove_columns=ds.column_names)
#Compute the overall WER now.
print("Test WER: {:.3f}".format(wer_metric.compute(predictions=results["pred_str"], references=results["sentence"])))
Test Result: 0.076
When publishing results based on these models please refer to:
@inproceedings{mena2024samromur,
title={Samr{\'o}mur Millj{\'o}n: An ASR Corpus of One Million Verified Read Prompts in Icelandic},
author={Mena, Carlos Daniel Hernandez and Gunnarsson, {\TH}orsteinn Da{\dh}i and Gu{\dh}nason, J{\'o}n},
booktitle={Proceedings of the 2024 Joint International Conference on Computational Linguistics, Language Resources and Evaluation (LREC-COLING 2024)},
pages={14305--14312},
year={2024}
}
Thanks to Jón Guðnason, head of the Language and Voice Lab for providing computational power to make this model possible.
We also want to thank to the "Language Technology Programme for Icelandic 2019-2023" which is managed and coordinated by Almannarómur, and it is funded by the Icelandic Ministry of Education, Science and Culture. This model is an unexpected result of all the resources gathered by the Programme.
Special thanks to Björn Ingi Stefánsson for setting up the configuration of the server where this model was trained.
Quoted from the model card on Hugging Face. The full card is behind the Hugging Face link above.
Benchmarks
As published on the model card: the maker's own numbers, not measured by AxForge.
| Task | Dataset | Metric | Score |
|---|---|---|---|
| Automatic Speech Recognition | Samrómur (Test) | WER | 7.698 |
| Automatic Speech Recognition | Samrómur (Dev) | WER | 6.786 |
| Automatic Speech Recognition | Samrómur Children (Test) | WER | 6.467 |
| Automatic Speech Recognition | Samrómur Children (Dev) | WER | 4.234 |
| Automatic Speech Recognition | Malrómur (Test) | WER | 6.631 |
| Automatic Speech Recognition | Malrómur (Dev) | WER | 5.836 |
| Automatic Speech Recognition | Althingi (Test) | WER | 17.904 |
| Automatic Speech Recognition | Althingi (Dev) | WER | 17.931 |