微調耳語VI
Jupyter筆記本以使用Kaggle在越南語上微調竊竊私語模型(也應在COLAB上工作,但不能進行詳盡的測試)
使用我的越南語音數據集的集合:https://huggingface.co/collections/doof-ferb/vietnamese-speech-dataset-65c6af8c15c999537862fa6
NB1從transformers crash kaggle TPU會話中導入任何培訓師或管道類
NB2來自transformers的培訓師類可以自動使用多GPU,例如Kaggle Free T4×2而無需更改代碼默認情況下,培訓師使用幼稚的模型並行性,該模型不能同時完全使用所有GPU,因此更好地使用分佈式數據並行性
NB3使用默認的貪婪搜索,因為Beam搜索觸發了VRAM用法中的尖峰,這可能會導致內存外(原始竊竊私語使用num beams = 5,類似do_sample=True, num_beams=5 )
NB4如果使用Kaggle +簡歷培訓,請記住在啟動之前啟用文件持久性
腳本
用批處理評估準確性(WER):
- 在耳語模型上:評估whisper.ipynb
- 在用peft lora竊竊私語:評估 - whisper-lora.ipynb
- 在WAV2VEC BERT V2型號上:essuation-w2vbert.ipynb
用傳統方法微調微調:
- 腳本:竊竊私語 - 傳統。 Ipynb
- 評估的模型:https://huggingface.co/doof-ferb/whisper-tiny-vi
用peft-lora + int8低語大聲說話:
- 1 GPU的腳本:hisper-large-lora.ipynb
- 使用分佈式數據並行性的多GPU腳本:hisper-large-lora-ddp.ipynb
- 評估的模型:https://huggingface.co/doof-ferb/whisper-large-peft-lora-vi
(測試 - 並非總是在工作)微調wav2vec v2 bert:w2v-bert-v2.ipynb
Docker映像要在AWS EC2上運行:Dockerfile,帶有獨立腳本
轉換為openai-whisper , whisper.cpp , faster-whisper ,onnx,tensorrt:還沒有
雜項:轉換為擁抱面音頻數據集格式
資源
- https://huggingface.co/blog/fine-tune-whisper
- https://huggingface.co/blog/fine-tune-w2v2-bert
- Openai/Whisper#988
- https://github.com/huggingface/peft/blob/main/examples/int8_training/peft_bnb_whisper_large_v2_training.ipynb
- https://github.com/vasistalodagala/whisper-finetune
- https://github.com/huggingface/community-events/tree/main/main/whisper-fine-tuning-event
- https://github.com/krylm/whisper-event-tuning
- https://www.kaggle.com/code/leonidkulyk/train-infer-mega-pack-wav2vec2-whisper-qlora
- https://github.com/huggingface/transformers/blob/main/examples/pytorch/speech-recognition/run_speech_recognition_seq2seq.py
- https://alphacephei.com/nsh/2023/01/15/whisper-finetuning.html
- https://discuss.huggingface.co/t/how-to-to-papply-peekaugment-to-a-whisper/40435/3
- https://deepgram.com/learn/whisper-v3-results