🚀 whisper-medium-he[WIP]
本模型是 imvladikon/whisper-medium-he 在 None 数据集上的微调版本。它在评估集上取得了以下结果:
- 损失值:0.2061
- 词错误率(Wer):13.4020
🚀 快速开始
本模型可用于自动语音识别任务,以下是不同方式的使用示例。
✨ 主要特性
📦 安装指南
文档未提及具体安装步骤,可参考相关库的官方文档进行安装,如 transformers
、pytorch
、datasets
、tokenizers
等。
💻 使用示例
基础用法
使用 Hugging Face 的 pipeline
from transformers import pipeline
pipe = pipeline("automatic-speech-recognition", model="imvladikon/whisper-medium-he", device_map="auto")
print(recognize("sample.mp3"))
使用 whisper.cpp
首先准备模型文件:https://huggingface.co/imvladikon/whisper-medium-he/blob/main/ggml-hebrew.bin
如果需要转换模型:
git clone https://github.com/openai/whisper
git clone https://github.com/ggerganov/whisper.cpp
git clone https://huggingface.co/imvladikon/whisper-medium-he
python3 ./whisper.cpp/models/convert-h5-to-ggml.py ./whisper-medium-he/ ./whisper .
然后可以进行检查(如果生成的模型文件是 ggml-model.bin
):
cd whisper.cpp && ./main -m ../ggml-model.bin -f ../sample.wav
📚 详细文档
模型描述
待补充更多信息。
预期用途与限制
待补充更多信息。
训练和评估数据
待补充更多信息。
训练过程
训练超参数
训练过程中使用了以下超参数:
- 学习率(learning_rate):1e-05
- 训练批次大小(train_batch_size):1
- 评估批次大小(eval_batch_size):1
- 随机种子(seed):42
- 梯度累积步数(gradient_accumulation_steps):2
- 总训练批次大小(total_train_batch_size):2
- 优化器(optimizer):Adam,β=(0.9, 0.999),ε=1e-08
- 学习率调度器类型(lr_scheduler_type):线性
- 学习率调度器热身步数(lr_scheduler_warmup_steps):500
- 训练步数(training_steps):4000
- 混合精度训练(mixed_precision_training):Native AMP
训练结果
训练损失 |
轮数 |
步数 |
验证损失 |
词错误率(Wer) |
0.0983 |
0.1 |
1000 |
0.3072 |
16.4362 |
0.1219 |
0.2 |
2000 |
0.2923 |
15.6642 |
0.134 |
0.3 |
3000 |
0.2345 |
13.7450 |
0.2113 |
0.39 |
4000 |
0.2061 |
13.4020 |
框架版本
- Transformers 4.36.0.dev0
- Pytorch 2.1.0+cu118
- Datasets 2.15.0
- Tokenizers 0.15.0
📄 许可证
本模型使用 Apache-2.0 许可证。
属性 |
详情 |
模型类型 |
自动语音识别 |
基础模型 |
imvladikon/whisper-medium-he |
指标 |
词错误率(Wer) |
许可证 |
Apache-2.0 |