onnxruntime: [Web] 1.20.0 breaks SkipSimplifiedLayerNormalization backwards compatibility. Missing Input: model.layers.0.input_layernorm.weight
Describe the issue
After upgrading to onnxruntime-node 1.20.0, I obtain the following error when trying to run models which were previously exported (and working) with earlier versions of onnx/onnxruntime:
Non-zero status code returned while running SkipSimplifiedLayerNormalization node. Name:'/model/layers.0/post_attention_layernorm/SkipLayerNorm' Status Message: /onnxruntime_src/include/onnxruntime/core/framework/op_kernel_context.h:42 const T* onnxruntime::OpKernelContext::Input(int) const [with T = onnxruntime::Tensor] Missing Input: model.layers.0.input_layernorm.weight
To reproduce
Attempt to run one of the following models:
- (BREAKS) https://huggingface.co/onnx-community/tiny-random-LlamaForCausalLM-ONNX/resolve/main/onnx/model_fp16.onnx
- (BREAKS) https://huggingface.co/onnx-community/tiny-random-LlamaForCausalLM-ONNX/resolve/main/onnx/model_q4f16.onnx
- (WORKS) https://huggingface.co/onnx-community/tiny-random-LlamaForCausalLM-ONNX/resolve/main/onnx/model.onnx
Urgency
Blocks upgrading transformers.js to use onnxruntime-node v1.20.0
ONNX Runtime Installation
Released Package
ONNX Runtime Version or Commit ID
1.20.0
Execution Provider
‘wasm’/‘cpu’ (WebAssembly CPU)
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 1
- Comments: 16 (14 by maintainers)
Here is the new error message I get now:
I am not sure if the problem that you saw is exactly caused by this. If it is, the fix should help.
Will investigate this issue. It looks like the problem is in CPU EP and
Currently the pipeline does not support this but I can do a manual publish if necessary.
@xenova Thank you for the issue report! I did some investigation and identified the issue is in the CPU implementation of f16
[Skip][Simplified]LayerNormalizaion.This issue is not web specific. All language binding may run into this issue if using CPU/f16 on any of the 4 operators.
We will do the fix ASAP and will publish a dev build of onnxruntime-web once it’s done. Will also work on a patch release to include the fix.