microsoft / onnxruntime

ONNX Runtime: cross-platform, high performance ML inferencing and training accelerator
https://onnxruntime.ai
MIT License
13.93k stars 2.81k forks source link

[Crash] Crash while loading AlibabaNLP/gte-base ONNX model #21322

Open vivekg-ai opened 1 month ago

vivekg-ai commented 1 month ago

Describe the issue

We are seeing a crash report while loading certain models (e.g. AlibabaNLP/gte-base - : https://huggingface.co/Alibaba-NLP/gte-base-en-v1.5)

The crash is seen on macOS, and here is the crash location -

image

To reproduce

Try loading the given model from the URL - https://huggingface.co/Alibaba-NLP/gte-base-en-v1.5

See the crash while inferencing.

Urgency

No response

Platform

Mac

OS Version

14.5

ONNX Runtime Installation

Released Package

ONNX Runtime Version or Commit ID

https://github.com/thebrowsercompany/onnxruntime-swift-package-manager

ONNX Runtime API

Obj-C

Architecture

ARM64

Execution Provider

Default CPU

Execution Provider Library Version

No response

yufenglee commented 1 month ago

@vivekg-ai, could you please share a call stack and how is the model converted to ONNX?

vivekg-ai commented 1 month ago

We are using the ONNX model directly available here - https://huggingface.co/Alibaba-NLP/gte-base-en-v1.5/tree/main/onnx

Unfortunately, the call stack doesn't have much since we are using the release build of the official SPM package of the ONNX Runtime from here - https://github.com/thebrowsercompany/onnxruntime-swift-package-manager

tianleiwu commented 1 month ago

image That only indicates that the model is failed to create session.

@vivekg-ai, There are multiple models in https://huggingface.co/Alibaba-NLP/gte-base-en-v1.5/tree/main/onnx. Which one did you use?

vivekg-ai commented 1 month ago

We tried - CleanShot 2024-07-12 at 00 10 36

tianleiwu commented 1 month ago

I tried it in my windows machine. It is good to create session from python API

import onnxruntime
ort_session = onnxruntime.InferenceSession("model.onnx", providers=['CPUExecutionProvider'])

Could be related to Mac. @skottmckay, @edgchen1 to take a look at onnxruntime-swift-package-manager.

github-actions[bot] commented 1 week ago

This issue has been automatically marked as stale due to inactivity and will be closed in 30 days if no further activity occurs. If further support is needed, please provide an update and/or more details.