微调耳语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