coriollon/whisper-large-v3-turbo-russian-codeswitch
4205
Whisper-large-v3-turbo Russian — Code-Switching variant
Specialized variant of `coriollon/whisper-large-v3-turbo-russian` optimized for Russian speech with embedded English tech terms ("Открой Python и сделай git push").
When to use this vs the standard model
This variant trades ~2 pp on pure Russian WER for a massive code-switching gain.
Code-switching benchmark (540 RU sentences with EN tech terms)
¹ Term accuracy = fraction of utterances where the English tech term (e.g. "Python", "GitHub", "Docker") appears verbatim in latin script in the transcript.
Pure-Russian regression
Usage
from transformers import WhisperProcessor, WhisperForConditionalGeneration
import torch
repo = "coriollon/whisper-large-v3-turbo-russian-codeswitch"
processor = WhisperProcessor.from_pretrained(repo)
model = WhisperForConditionalGeneration.from_pretrained(repo, torch_dtype=torch.float16).to("cuda")
inputs = processor(audio_array, sampling_rate=16000, return_tensors="pt")
feats = inputs.input_features.to("cuda", dtype=torch.float16)
ids = model.generate(feats, language="ru", task="transcribe", num_beams=5)
print(processor.batch_decode(ids, skip_special_tokens=True)[0])Pre-quantized faster-whisper variant
from huggingface_hub import snapshot_download
from faster_whisper import WhisperModel
ct2_path = snapshot_download(
repo_id="coriollon/whisper-large-v3-turbo-russian-codeswitch",
allow_patterns="ct2_int8_float16/*",
)
model = WhisperModel(f"{ct2_path}/ct2_int8_float16", device="cuda", compute_type="int8_float16")
segments, _ = model.transcribe("audio.wav", language="ru", beam_size=5)How it was built
LoRA r=32 (q+k+v+o+fc1+fc2, 27.85M params) trained on:
- 2,160 RU sentences with EN tech terms (Silero TTS-bootstrapped, 50 templates × 53 terms × 5 voices)
- 5,000 pure-RU anti-forgetting samples
- 2,000 EN anti-forgetting samples
Reference labels in mixed script ("Открой Python") teach the model to natively output latin tokens for English terms instead of cyrillic transliteration ("питон").
Limitations
- Pure-RU WER is ~2 pp worse than the standard model. Don't use this model if you don't need code-switching.
- Training data was TTS-generated (Silero v4 RU) — real human pronunciation may differ slightly
- Currently covers 53 common tech/brand terms; rare terms may still appear in cyrillic
License
Apache 2.0 (inherited from base Whisper model).
