Help preserve open and free AI for humanity's future

← All models

NbAiLab_nb-wav2vec2-1b-nynorsk

NbAiLab · View on Hugging Face ↗

Norwegian Nynorsk speech recognition (wav2vec 2.0, 1B) from the National Library of Norway.

✓ verified · rehash-vs-hf-metadata at 2026-08-24T03:15:08Z

apache-2.010.89 GB (11,697,897,662 bytes)transformerspytorchtensorboardsafetensorswav2vec2automatic-speech-recognitionNbAiLab/NPSCnb-NNmodel-indexendpoints_compatible2 languages (no, nn)paper: 2307.01672

Get this model

Download NbAiLab_nb-wav2vec2-1b-nynorsk.torrent

Recommended — the .torrent carries the webseed url-list, so your client can fall back to plain HTTPS if the swarm is thin. See/verify for the full download + verification walkthrough.

Model card

The complete upstream card, rendered from this payload's README.md — the same hash-verified bytes the torrent distributes. Images and off-site links are removed; the original card on Hugging Face carries them.


license: apache-2.0 tags:

  • automatic-speech-recognition
  • NbAiLab/NPSC
  • no
  • nn
  • nb-NN datasets:
  • NbAiLab/NPSC language:
  • nn
  • no model-index:
  • name: nb-wav2vec2-1b-nynorsk results:
    • task: name: Automatic Speech Recognition type: automatic-speech-recognition dataset: name: NPSC type: NbAiLab/NPSC args: 16K_mp3_nynorsk metrics:
      • name: Test (Nynorsk) WER type: wer value: 0.11319692134409612
      • name: Test (Nynorsk) CER type: cer value: 0.040263696587740365

Norwegian Wav2Vec2 Model - 1B Nynorsk

This model is finetuned on top of feature extractor XLS-R from Facebook/Meta. The finetuned model achieves the following results on the test set with a 5-gram KenLM. The numbers in parentheses are the results without the language model:

  • WER: 0.1132 (0.1364)
  • CER: 0.0402 (---)

Model description

This is one of several Wav2Vec-models our team created during the 🤗 hosted Robust Speech Event. This is the complete list of our models and their final scores:

Model Final WER
NbAiLab/nb-wav2vec2-1b-bokmaal 6.33
NbAiLab/nb-wav2vec2-300m-bokmaal 7.03
NbAiLab/nb-wav2vec2-1b-nynorsk (this model) 11.32
NbAiLab/nb-wav2vec2-300m-nynorsk 12.22

Dataset

In parallel with the event, the team also converted the Norwegian Parliamentary Speech Corpus (NPSC) to the NbAiLab/NPSC in 🤗 Dataset format and used that as the main source for training.

Code

We have released all the code developed during the event so that the Norwegian NLP community can build upon it when developing even better Norwegian ASR models. The finetuning of these models is not very computationally demanding. After following the instructions here, you should be able to train your own automatic speech recognition system in less than a day with an average GPU.

Team

The following people contributed to building this model: Rolv-Arild Braaten, Javier de la Rosa, and Freddy Wetjen.

Training procedure

To reproduce these results, we strongly recommend that you follow the instructions from 🤗 to train a simple Swedish model.

When you have verified that you are able to do this, create a fresh new repo. You can then start by copying the files run.sh and run_speech_recognition_ctc.py from our repo. Running these will create all the other necessary files, and should let you reproduce our results. With some tweaks to the hyperparameters, you might even be able to build an even better ASR. Good luck!

Language Model

As the scores indicate, adding even a simple 5-gram language will improve the results. 🤗 has provided another very nice blog explaining how to add a 5-gram language model to improve the ASR model. You can build this from your own corpus, for instance by extracting some suitable text from the Norwegian Colossal Corpus. You can also skip some of the steps in the guide, and copy the 5-gram model from this repo.

Parameters

The final model was run using these parameters:

--dataset_name="NbAiLab/NPSC"
--model_name_or_path="facebook/wav2vec2-xls-r-1b"
--dataset_config_name="16K_mp3_nynorsk"
--output_dir="./"
--overwrite_output_dir
--num_train_epochs="40"
--per_device_train_batch_size="12"
--per_device_eval_batch_size="12" 
--gradient_accumulation_steps="2" 
--learning_rate="2e-5" 
--warmup_steps="2000" 
--length_column_name="input_length" 
--evaluation_strategy="steps" 
--text_column_name="text" 
--save_steps="500" 
--eval_steps="500" 
--logging_steps="100" 
--layerdrop="0.041" 
--attention_dropout="0.094" 
--activation_dropout="0.055" 
--hidden_dropout="0.047" 
--save_total_limit="3"
--freeze_feature_encoder 
--feat_proj_dropout="0.04" 
--mask_time_prob="0.082" 
--mask_time_length="10" 
--mask_feature_prob="0.25" 
--mask_feature_length="64" 
--gradient_checkpointing
--min_duration_in_seconds="0.5" 
--max_duration_in_seconds="30.0" 
--ctc_zero_infinity=True 
--use_auth_token 
--seed="42" 
--fp16 
--group_by_length 
--do_train --do_eval 
--push_to_hub 
--preprocessing_num_workers="16"

Using these settings, the training might take 3-4 days on an average GPU. You can, however, get a decent model and faster results by tweaking these parameters.

Parameter Comment
per_device_train_batch_size Adjust this to the maximum of available memory. 16 or 24 might be good settings depending on your system
gradient_accumulation_steps Can be adjusted even further up to increase batch size and speed up training without running into memory issues
learning_rate Can be increased, maybe as high as 1e-4. Speeds up training but might add instability
epochs Can be decreased significantly. This is a huge dataset and you might get a decent result already after a couple of epochs

Citation

@inproceedings{de-la-rosa-etal-2023-boosting,
    title = "Boosting {N}orwegian Automatic Speech Recognition",
    author = "De La Rosa, Javier  and
      Braaten, Rolv-Arild  and
      Kummervold, Per  and
      Wetjen, Freddy",
    booktitle = "Proceedings of the 24th Nordic Conference on Computational Linguistics (NoDaLiDa)",
    month = may,
    year = "2023",
    address = "T{\'o}rshavn, Faroe Islands",
    publisher = "University of Tartu Library",
    url = "https://aclanthology.org/2023.nodalida-1.55",
    pages = "555--564",
    abstract = "In this paper, we present several baselines for automatic speech recognition (ASR) models for the two official written languages in Norway: Bokm{\aa}l and Nynorsk. We compare the performance of models of varying sizes and pre-training approaches on multiple Norwegian speech datasets. Additionally, we measure the performance of these models against previous state-of-the-art ASR models, as well as on out-of-domain datasets. We improve the state of the art on the Norwegian Parliamentary Speech Corpus (NPSC) from a word error rate (WER) of 17.10{\%} to 7.60{\%}, with models achieving 5.81{\%} for Bokm{\aa}l and 11.54{\%} for Nynorsk. We also discuss the challenges and potential solutions for further improving ASR models for Norwegian.",
}

See https://arxiv.org/abs/2307.01672

Magnet link (secondary — no webseeds)

Opens the swarm directly, but carries no webseed url-list. Prefer the.torrent download above — HTTP fallback seeds ride inside it.

magnet:?xt=urn:btih:d33fe157ea56a6a39b41b8600e9f62ec662531ff&dn=NbAiLab_nb-wav2vec2-1b-nynorsk

Open magnet in torrent client · infohash d33fe157ea56a6a39b41b8600e9f62ec662531ff

Files & hashes

PathSizeMethodHash
NbAiLab_NPSC_16K_mp3_nynorsk_test_eval_results.txt50 B (50 B)sha1-git-blobcc4e691ccdd756ffc22ce5a1816c3fd9d62fa4cc
NbAiLab_NPSC_16K_mp3_nynorsk_test_eval_results_no_lang_model.txt47 B (47 B)sha1-git-blob7d7eeafe5c60b609cb202d07a8905a30602b9ff7
README.md7.0 KB (7,168 B)sha1-git-blobb52fe0c727650ddfdb2d283607377dd4c5387ad5
README.old.md5.3 KB (5,376 B)sha1-git-blob9433c59806d9d5b942f0649e349f6d7b9cc9c164
add_kenlm.py1.2 KB (1,265 B)sha1-git-blobd6bb6118f976744a3a3a14a41ccdca9019b0e073
added_tokens.json23 B (23 B)sha1-git-blob04acdafec04bac17efb8ef44636a4cc2555690e9
all_results.json398 B (398 B)sha1-git-blobbfb88a90385c3fb8a829d6629b2032419b720c4a
alphabet.json223 B (223 B)sha1-git-blobbaa68844be9ee7f01999a2a9a231da474412d1d0
cardinal_numbers.py26.7 KB (27,329 B)sha1-git-blobacb8b4853e39ffd6ad2db2a58844db4eb12b75cb
config.json2.0 KB (2,042 B)sha1-git-blob63114abcd7a46655883cfde035105bce06cf2cf3
eval.py10.5 KB (10,773 B)sha1-git-blobb9f1b148b4d252def912fb259fe6d5a40b5c4941
eval_results.json223 B (223 B)sha1-git-blob4cae12f1988906f95e55f9102ddbaa95993c9c99
language_model/5gram.bin3.71 GB (3,981,756,555 B)sha256-lfsab572020f4871ec611ad95a92071040bafe77c4633de2d26166006749e964129
language_model/attrs.json78 B (78 B)sha1-git-blob3c07595c2b465df3c14531dbc2d1c52bf11f166d
language_model/unigrams.txt14.2 MB (14,892,613 B)sha256-lfs48aeb02d80e42421057e95161188779f1cdace619908c0feeab767d1cadb44cb
log_NbAiLab_NPSC_16K_mp3_nynorsk_test_predictions.txt65.8 KB (67,357 B)sha1-git-blob9c0297c6bf54182395232d1ab2c057fa0326dd13
log_NbAiLab_NPSC_16K_mp3_nynorsk_test_predictions_no_lang_model.txt65.9 KB (67,447 B)sha1-git-blob90d446099ad9dd1cd35d2599f3ecd40a4c3f565e
log_NbAiLab_NPSC_16K_mp3_nynorsk_test_targets.txt66.9 KB (68,478 B)sha1-git-blob54b0c0ebabf1a526fda244b7447c8900e5ba8574
log_NbAiLab_NPSC_16K_mp3_nynorsk_test_targets_no_lang_model.txt66.9 KB (68,478 B)sha1-git-blob54b0c0ebabf1a526fda244b7447c8900e5ba8574
model.safetensors3.59 GB (3,850,265,160 B)sha256-lfs55b79d680168317058eaa54710838e49501cba54bfc9403b6c9b83fa8c6c67cd
preprocessor_config.json260 B (260 B)sha1-git-blobebf4fcff349ba93a943eec08433a80f0a7a11353
pytorch_model.bin3.59 GB (3,850,486,961 B)sha256-lfs5b5bc883abdd48ded6d3a22aa80034d5a314c0ae71cbc0ec5399909f7eac0a0d
run.sh1.4 KB (1,484 B)sha1-git-blob168491b299cf0e3a2b2d689bdfc2c4da3d132ced
run_recover.sh1.5 KB (1,496 B)sha1-git-blob3c3786c55bd9e6b17ed56b83b963a309ec1499b4
run_speech_recognition_ctc.py33.2 KB (33,986 B)sha1-git-blobcd60da3ac465c002039e466a08c6df4c642ddcc1
runs/Mar24_16-58-45_dante/1648137570.9585772/events.out.tfevents.1648137570.dante.2925078.14.6 KB (4,750 B)sha256-lfs17d568c75773772f7a011c3ec735444c71804b3ac54977708dbcd4cb07d18bae
runs/Mar24_16-58-45_dante/events.out.tfevents.1648137570.dante.2925078.069.7 KB (71,326 B)sha256-lfs04228cc292432da366ad813973e42cf76c8ee8078b9b5618af00cc5335c59a5f
runs/Mar24_16-58-45_dante/events.out.tfevents.1648222995.dante.2925078.2364 B (364 B)sha256-lfs4b12aa9345831f7dd28e4397c098df2a06dd14e42433f9d333f920f5128faa97
special_tokens_map.json695 B (695 B)sha1-git-blobac9d0f5ca95609d1ad5399734d20053df116648c
tokenizer_config.json282 B (282 B)sha1-git-blobcf3db5a5d764354aa0dd9b7fcb5906648b9f5c77
train_results.json196 B (196 B)sha1-git-blob502f21a0cb2fc34d7f3fcc4f438ce2699932a25a
trainer_state.json50.2 KB (51,435 B)sha1-git-blobb0d4a7df1144d97980568d9ba4c035aa2161d519
training_args.bin3.0 KB (3,055 B)sha256-lfs1790380ec4edb71deaad48f7b85f1c40a1cb6a6a8eb4a57612cb779847669157
vocab.json289 B (289 B)sha1-git-blobb590ec187a04ff9389250ac938fbad2d64133560

Provenance

Upstream repositoryNbAiLab/nb-wav2vec2-1b-nynorsk
Revision (pinned)37107327f6af742c008042d8cfdba4276de18f82
Fetched at2026-08-24T03:07:02Z
License at fetchapache-2.0
Snapshot toolhuggingface · seedbank 0.1.0

Trackers

Webseeds