Error in decoder_model_merged_fp16 model version

#4
by istupakov - opened

Hi @Xenova

I tried to use the decoder_model_merged_fp16.onnx model and got the following error

[ONNXRuntimeError] : 1 : FAIL : Load model from /root/.cache/huggingface/hub/models--onnx-community--whisper-base/snapshots/9f8df79a37b5d66783d879be66ed2e211ebca020/onnx/decoder_model_merged_fp16.onnx failed:/onnxruntime_src/onnxruntime/core/graph/graph.cc:1489 void onnxruntime::Graph::InitializeStateFromModelFileGraphProto() This is an invalid model. Subgraph output (logits) is an outer scope value being returned directly. Please update the model to add an Identity node between the outer scope value and the subgraph output.

I see the same error in onnx-community/whisper-tiny and onnx-community/whisper-small models, but the later created onnx-community/whisper-large-v3-turbo model works fine. Could you please update the old whisper-base, whisper-tiny and whisper-small models?

ONNX Community org

Hi @istupakov thanks for letting me know! I fixed this bug recently in my quantization script, but clearly missed a couple of models to upload fixes for.
In addition to the ones you mention above, are there any others you've found this for?

Hi @xenova , thanks for your continued great work and responsiveness!
I (and I think several other community members that I've seen) would be interested in having you add the exact command you ran to generate the onnx version of a model in the readme. It would just require a copy/paste from you, and would allow us to easily reproduce your results and start uploading more of our own onnx conversions :)

Hi @Xenova
I think whisper-tiny.en, whisper-base.en and whisper-small.en models also have this problem, but I haven't check it yet.

ONNX Community org

cc @whitphx Maybe you can prioritize these models in your conversions :) Thanks!

ONNX Community org

Thanks to @whitphx , this has been fixed by https://huggingface.co/onnx-community/whisper-base/discussions/5 πŸ™Œ

For example, loading the decoder in fp16 works as expected

const transcriber = await pipeline('automatic-speech-recognition', 'onnx-community/whisper-base', {
    dtype: {
        encoder_model: "fp32",
        decoder_model_merged: "fp16",
    }
});
Xenova changed discussion status to closed

Sign up or log in to comment