RapidASR icon indicating copy to clipboard operation
RapidASR copied to clipboard

模型加载是不是太慢了

Open MagiciSource opened this issue 1 year ago • 3 comments

相比于FastAsr,模型加载时间长10多倍,有什么方法可以加速么

MagiciSource avatar May 11 '23 04:05 MagiciSource

这个可以参考这里:ONNX runtime takes much time and memory to load model #3802 加载慢,还是比较能接受的

SWHL avatar May 11 '23 05:05 SWHL

这个可以参考这里:ONNX runtime takes much time and memory to load model #3802 加载慢,还是比较能接受的

我尝试了下,加载优化过的模型可以减少一点加载时间,还有设置ORT_PARALLEL可以减少差不多一半的加载时间,但是好像会让推理时间长一点点。另外有没有什么方式可以减小模型的大小?

MagiciSource avatar May 12 '23 01:05 MagiciSource

模型大小,可以尝试用onnxruntime中自带的量化方法 参考经验:之前测过,量化之后,推理速度变慢了

SWHL avatar May 12 '23 02:05 SWHL