-
Notifications
You must be signed in to change notification settings - Fork 538
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Convert whisper models to onnx format #238
Conversation
Please visit |
你好,如何将自己重官方下载的pytorch_model.bin转换成onnx格式呢。 |
https://k2-fsa.github.io/sherpa/onnx/pretrained_models/whisper/export-onnx.html |
好的,我试一下 |
你好,这个脚本是自动在官网下载模型转换的。目前我这边有个模型是基于tiny.en进行微调训练的,想直接将训练出来的bin文件转换成对应的onnx格式,有什么好的方法吗。是否需要先转换成.pt格式,非常期待你的回答,谢谢 |
你的 模型文件,只要和官方的一样,就可以用我们的脚本导出成 onnx. 你运行的时候, 有碰到什么问题么 |
目前只要执行你那边的提供的脚本,会自动取下载官方的模型,强行修改脚本指定我们的模型会提示 |
你的 checkpoint 是如何保存的? 我上面说,你要和官方的完全兼容。 我建议你看下官方提供的 bin 里面,state_dict 包含什么 |
Hi there! |
please see sherpa-onnx/scripts/whisper/export-onnx.py Line 315 in 83a10a5
you need to find out how |
This model can be safely loaded by |
Here is the data contained in the
Please make sure your saved model has a structure like the above dict. |
We are trying to support whisper models in sherpa-onnx for non-streaming speech recognition.
In the first step, we have managed to convert the model to onnx format and have successfully tested the exported onnx model in Python using greedy search.
TODOs