Model reference · open weights
wav2vec2-xls-r-juznevesti-sr is an open-weight audio or speech model from classla. wav2vec2-xls-r-juznevesti-sr (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 classla/wav2vec2-xls-r-juznevesti-sr model card, 2026-10-01
What it is
| Released by | classla |
|---|---|
| Released | 2022-08-18 |
| 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
This model for Serbian ASR is based on the facebook/wav2vec2-xls-r-300m model and was fine-tuned with 58 hours of audio and transcripts from Južne vesti, programme '15 minuta'.
For more info on the dataset creation see this repo.
Evaluation is performed on the dev and test portions of the JuzneVesti dataset
| dev | test | |
|---|---|---|
| WER | 0.295206 | 0.290094 |
| CER | 0.140766 | 0.137642 |
transformersTested with transformers==4.18.0, torch==1.11.0, and SoundFile==0.10.3.post1.
from transformers import Wav2Vec2Processor, Wav2Vec2ForCTC
import soundfile as sf
import torch
import os
device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
# load model and tokenizer
processor = Wav2Vec2Processor.from_pretrained(
"classla/wav2vec2-xls-r-juznevesti-sr")
model = Wav2Vec2ForCTC.from_pretrained("classla/wav2vec2-xls-r-juznevesti-sr")
# download the example wav files:
os.system("wget https://huggingface.co/classla/wav2vec2-xls-r-parlaspeech-hr/raw/main/00020570a.flac.wav")
# read the wav file
speech, sample_rate = sf.read("00020570a.flac.wav")
input_values = processor(speech, sampling_rate=sample_rate, return_tensors="pt").input_values.to(device)
# remove the raw wav file
os.system("rm 00020570a.flac.wav")
# retrieve logits
logits = model.to(device)(input_values).logits
# take argmax and decode
predicted_ids = torch.argmax(logits, dim=-1)
transcription = processor.decode(predicted_ids[0])
transcription # 'velik broj poslovnih subjekata posluje sa minosom velik deo'
In fine-tuning, the following arguments were used:
| arg | value |
|---|---|
per_device_train_batch_size | 16 |
gradient_accumulation_steps | 4 |
num_train_epochs | 20 |
learning_rate | 3e-4 |
warmup_steps | 500 |
Quoted from the model card on Hugging Face. The full card is behind the Hugging Face link above.