finetune whisper lora
version for cantonese
? Hf repo •? GitHub Repo
Passez au dossier Docker et créez l'image GPU Docker pour la formation:
cd docker
docker compose buildONECE Le processus de construction est terminé, exécutez la commande suivante pour démarrer un conteneur Docker et s'y attacher:
docker compose up -d
docker exec -it asr bashVoir détail dans le dossier DataSet_Scripts.
# Finetuning
python finetune.py --model_id base --streaming True --train_batch_size 64 --gradient_accumulation_steps 2 --fp16 True # LoRA Finetuning
python finetune_lora.py --model_id large-v2 --streaming True --train_batch_size 64 --gradient_accumulation_steps 2 # Evaluation
python eval.py --model_name_or_path Oblivion208/whisper-tiny-cantonese --streaming True --batch_size 64 # LoRA Evaluation
python eval_lora.py --peft_model_id Oblivion208/whisper-large-v2-lora-mix --streaming True --batch_size 64 Remarque: Réglage --streaming en False mettra en cache les fonctionnalités acoustiques sur le disque local, ce qui accélère les processus de finetuning, mais il augmente considérablement l'utilisation du disque (près de trois fois de taille de fichiers audio bruts).
Les modèles suivants sont tous formés et évalués sur un seul GPU RTX 3090 via Vast.ai.
| Nom du modèle | Paramètres | Étapes de Finetune | Temps de passes | Perte de formation | Perte de validation | CER% | Modèle à finet |
|---|---|---|---|---|---|---|---|
| chuchoteur-cantonais | 39 m | 3200 | 4h 34m | 0,0485 | 0,771 | 11.10 | Lien |
| chuchotement | 74 m | 7200 | 13h 32m | 0,0186 | 0,477 | 7.66 | Lien |
| chuchoter | 244 m | 3600 | 6h 38m | 0,0266 | 0,137 | 6.16 | Lien |
| chuchoter | 3,5 m | 8000 | 21h 27m | 0,0687 | 0,382 | 7.40 | Lien |
| chuchoter-v2-lora-cantonais | 15 m | 10000 | 33h 40m | 0,0046 | 0,277 | 3.77 | Lien |
| Nom du modèle | CER% original | w / o finetune ce% | Finetune CER% conjointement |
|---|---|---|---|
| chuchoteur-cantonais | 124.03 | 66.85 | 35.87 |
| chuchotement | 78.24 | 61.42 | 16.73 |
| chuchoter | 52.83 | 31.23 | / / |
| chuchoter | 37,53 | 19.38 | 14.73 |
| chuchoter-v2-lora-cantonais | 37,53 | 19.38 | 9.63 |