Views
No views yet
openai/whisper-large-v3-turbo using AdaLoRA (Adaptive Low-Rank Adaptation) on the heart failure audio dataset with PHI (Personal Health Information) elimination.| Model | WER (Raw) | WER (Normalized) |
|---|---|---|
| Baseline | 56.61% | 23.47% |
| AdaLoRA | 55.33% | 22.52% |
[PERSON], [ORG], [ADDRESS], [PHONE], [EMAIL], [DATE]1from transformers import WhisperProcessor, WhisperForConditionalGeneration
2from peft import PeftModel, PeftConfig
3
4# Load model
5peft_config = PeftConfig.from_pretrained("SPL123/whisper-hf-adalora-exp1-higher-rank")
6base_model = WhisperForConditionalGeneration.from_pretrained(
7 peft_config.base_model_name_or_path, device_map="auto"
8)
9model = PeftModel.from_pretrained(base_model, "SPL123/whisper-hf-adalora-exp1-higher-rank")
10processor = WhisperProcessor.from_pretrained(peft_config.base_model_name_or_path)
11
12# Inference
13import torch
14audio_features = processor.feature_extractor(audio_array, sampling_rate=16000, return_tensors="pt")
15with torch.no_grad():
16 predicted_ids = model.generate(audio_features.input_features)
17transcription = processor.batch_decode(predicted_ids, skip_special_tokens=True)[0]