Downloads · 30 days
11
15% of all-time downloads
LakoreAI/whisper-small-vi-lora
whisper-small-vi-lora is a automatic speech recognition model from LakoreAI. Use it when you need speech turned into text. It is set up for peft. The card lists the license as apache-2.0.
Fine-tuned version of openai/whisper-small on Vietnamese speech using LoRA adapters and the Mozilla Common Voice 11 dataset.
Downloads · 30 days
11
15% of all-time downloads
All-time downloads
74
Public
Repo size
52 MB
Likes
0
Public
Click a slice to open those files.
.safetensors52 MB · 93%
From the Hugging Face model README
Fine-tuned version of openai/whisper-small on Vietnamese speech using LoRA adapters and the Mozilla Common Voice 11 dataset.
| Metric | Value |
|---|---|
| Training Loss | 0.9382 |
| Epochs | 5 |
| Global Steps | 470 |
| Samples/sec | 7.37 |
| Total FLOPs | 4.60e+18 |
openai/whisper-small (244M params)q_proj, v_proj, k_proj, out_proj, fc1, fc2vi)vi)Data augmentation applied:
from peft import PeftModel
from transformers import WhisperForConditionalGeneration, WhisperProcessor
import torch
base = WhisperForConditionalGeneration.from_pretrained("openai/whisper-small")
model = PeftModel.from_pretrained(base, "LakoreAI/whisper-small-vi-lora")
processor = WhisperProcessor.from_pretrained("LakoreAI/whisper-small-vi-lora")
# Optional: merge LoRA for faster inference
model = model.merge_and_unload()
model.eval()
# Inference
def transcribe(audio_array, sampling_rate=16000):
inputs = processor(audio_array, sampling_rate=sampling_rate, return_tensors="pt")
with torch.no_grad():
ids = model.generate(
inputs.input_features,
language="vietnamese",
task="transcribe",
max_new_tokens=225,
)
return processor.tokenizer.decode(ids[0], skip_special_tokens=True)