FireRedASR icon indicating copy to clipboard operation
FireRedASR copied to clipboard

欢迎试用 onnx 导出脚本

Open coolhuhu opened this issue 2 months ago • 4 comments

非常感谢小红书团队开源的 FireRedASR-AED 模型。我们内部对该模型进行了适配,使用 wenet 进行微调后,具有不错的效果。

欢迎大家试用onnx导出脚本:FireRedASR-AED-ONNX

coolhuhu avatar Oct 10 '25 15:10 coolhuhu

请问该脚本导出的onnx模型支持在sherpa-onnx上运行吗

Aquish-Lee avatar Nov 03 '25 12:11 Aquish-Lee

请问该脚本导出的onnx模型支持在sherpa-onnx上运行吗

不支持。若需要使用 sherpa-onnx 运行,可以直接在下载他们转好的模型。

导出的 encoder 在接口上是一致的。为了支持 beam search,导出的 decoder 在接口上相比 sherpa-onnx 多了 self_attn_mask 和 cross_attn_mask 这两个参数。你可以尝试修改,使得转出的模型适配 sherpa-onnx。

coolhuhu avatar Nov 03 '25 14:11 coolhuhu

https://github.com/coolhuhu/FireRedASR-AED-ONNX/issues/1 该脚本导出的非量化的onnx模型,使用test_onnx_model.py测试时报错,模型不正常:onnxruntime.capi.onnxruntime_pybind11_state.InvalidProtobuf: [ONNXRuntimeError] : 7 : INVALID_PROTOBUF : Load model from onnx_encoder/encoder.onnx failed:Protobuf parsing failed. [ERROR] 2025-11-17-12:29:29 (PID:6585, Device:-1, RankID:-1) ERR99999 UNKNOWN applicaiton exception

但是int8量化的模型测试时成功。

chenm-123 avatar Nov 18 '25 06:11 chenm-123

已解决

chenm-123 avatar Nov 24 '25 07:11 chenm-123