Configuration Parsing Warning:In adapter_config.json: "peft.task_type" must be a string

whisper-small-vi-lora-asr

Đây là phiên bản fine-tune của openai/whisper-small cho tác vụ nhận dạng tiếng nói (ASR) tiếng Việt, sử dụng phương pháp LoRA (PEFT).

Kết quả trên tập đánh giá:

  • Loss: 0.3151
  • WER: 0.147
  • CER: 0.0729

Mô tả mô hình

Mô hình dùng LoRA để fine-tune Whisper-small một cách hiệu quả về tham số, chỉ huấn luyện một lượng nhỏ trọng số adapter thay vì toàn bộ mô hình gốc. Phù hợp cho chuyển giọng nói tiếng Việt thành văn bản.

Cách sử dụng

from peft import PeftModel, PeftConfig
from transformers import WhisperForConditionalGeneration, WhisperProcessor
import torch

peft_model_id = "qdovan03/whisper-small-vi-lora-asr"
config = PeftConfig.from_pretrained(peft_model_id)

model = WhisperForConditionalGeneration.from_pretrained(config.base_model_name_or_path)
model = PeftModel.from_pretrained(model, peft_model_id)
processor = WhisperProcessor.from_pretrained(config.base_model_name_or_path)

# Inference
inputs = processor(audio_array, sampling_rate=16000, return_tensors="pt")
forced_decoder_ids = processor.get_decoder_prompt_ids(language="vi", task="transcribe")
predicted_ids = model.generate(inputs.input_features, forced_decoder_ids=forced_decoder_ids)
transcription = processor.batch_decode(predicted_ids, skip_special_tokens=True)[0]
print(transcription)

Mục đích sử dụng & giới hạn

Dùng cho chuyển đổi giọng nói tiếng Việt thành văn bản. Hiệu năng có thể giảm với âm thanh nhiễu, giọng vùng miền đặc thù, hoặc thuật ngữ chuyên ngành không có trong dữ liệu huấn luyện.

Dữ liệu huấn luyện và đánh giá

Quy trình huấn luyện

Siêu tham số

  • learning_rate: 3e-05
  • train_batch_size: 8
  • eval_batch_size: 8
  • seed: 42
  • gradient_accumulation_steps: 4
  • total_train_batch_size: 32
  • optimizer: ADAMW_TORCH_FUSED, betas=(0.9,0.999), epsilon=1e-08
  • lr_scheduler_type: linear
  • lr_scheduler_warmup_steps: 120
  • training_steps: 1200
  • mixed_precision_training: Native AMP

Kết quả huấn luyện

Training Loss Epoch Step Validation Loss WER CER
2.1391 1.1630 200 0.3138 0.1479 0.072
2.0665 2.3261 400 0.3126 0.1463 0.0713
1.9902 3.4891 600 0.3141 0.1474 0.0735
2.0609 4.6521 800 0.3137 0.1463 0.0725
1.8634 5.8151 1000 0.3151 0.148 0.0732
1.7765 6.9782 1200 0.3151 0.147 0.0729

Phiên bản framework

  • PEFT 0.19.1
  • Transformers 5.12.0
  • Pytorch 2.10.0+cu128
  • Datasets 5.0.0
  • Tokenizers 0.22.2
Downloads last month
148
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for qdovan03/whisper-small-vi-lora-asr

Adapter
(242)
this model

Space using qdovan03/whisper-small-vi-lora-asr 1

Evaluation results