Views
No views yet
run.sh watchdog that survives SIGSEGV / GPU memory crashes and auto-resumes from the latest checkpointWhisperDataset using plain Python lists in RAM, bypassing HuggingFace Arrow/mmap memory issues that caused segfaultsq_proj and v_proj attention layers only, achieving strong Uzbek accuracy without catastrophic forgetting of the base model1import torch
2from peft import PeftModel, PeftConfig
3from transformers import WhisperForConditionalGeneration, WhisperProcessor
4
5# =====================================================================
6# 💡 REMINDER: This LoRA adapter was specifically trained on and
7# MUST be used with the base model: "openai/whisper-large-v3"
8# =====================================================================
9
10# 1. Load the Configuration and Base Model
11model_id = "AnvarMexmonov/uz-speech-adapter-v1"
12config = PeftConfig.from_pretrained(model_id)
13
14# The config automatically pulls "openai/whisper-large-v3" as the base
15processor = WhisperProcessor.from_pretrained(config.base_model_name_or_path)
16
17model = WhisperForConditionalGeneration.from_pretrained(
18 config.base_model_name_or_path,
19 torch_dtype=torch.float16,
20 device_map="auto"
21)
22
23# 2. Load your custom Uzbek LoRA Adapter
24model = PeftModel.from_pretrained(model, model_id)
25
26print(" Custom Uzbek Whisper Large-v3 model is ready for inference!")| Base model | openai/whisper-large-v3 |
| Fine-tuning method | LoRA via HuggingFace PEFT |
| LoRA targets | q_proj, v_proj |
| LoRA rank / alpha | 32 / 64 |
| Trainable params | 15.7M / 1.55B (1%) |
| Dataset | yakhyo/mozilla-common-voice-uzbek |
| Train samples | 3,000 clips |
| Eval samples | 200 clips |
| Steps | 1,000 |
| Effective batch size | 8 |
| Learning rate | 5e-4 with 50-step warmup |
| Precision | bf16 |
| GPU | NVIDIA RTX 5090 |
| Training time | ~90 minutes |
| Metric | Value |
|---|---|
| Best eval loss | 0.7835 |
| Training steps | 1,000 |