Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error Instantiating EmbeddingModel with ONNX Model intfloat/multilingual-e5-large #21388

Closed
zelhaddioui opened this issue Jul 17, 2024 · 1 comment
Labels
model:transformer issues related to a transformer model: BERT, GPT2, Hugging Face, Longformer, T5, etc.

Comments

@zelhaddioui
Copy link

Describe the issue

I am encountering an error while trying to instantiate the EmbeddingModel using the ONNX model intfloat/multilingual-e5-large. The error message is as follows:

Failed to instantiate [org.springframework.ai.embedding.EmbeddingModel]: Factory method 'embeddingClient' threw exception with message: data did not match any variant of untagged enum PreTokenizerWrapper at line 69 column 3

I am unsure why this error is occurring. Below are the relevant details and configuration:
Configuration

  • Model: intfloat/multilingual-e5-large
  • Format: ONNX
  • Spring Configuration: Using TransformersEmbeddingModel from Spring AI

To reproduce

  1. Export the intfloat/multilingual-e5-large model to ONNX format.
  2. Configure Spring AI to use the exported ONNX model and tokenizer.
  3. Attempt to instantiate the EmbeddingModel.

Urgency

High

Could someone provide guidance on resolving this issue or point out what might be wrong with the configuration?

Platform

Linux

OS Version

Ubuntu 20.04

ONNX Runtime Installation

Built from Source

ONNX Runtime Version or Commit ID

pip install onnxruntime

ONNX Runtime API

Python

Architecture

X86

Execution Provider

Default CPU

Execution Provider Library Version

N/A

@Craigacp
Copy link
Contributor

Please report this to Spring AI. When you do, you should put the full stack trace in as it's hard to tell where the error is without it.

@sophies927 sophies927 added the model:transformer issues related to a transformer model: BERT, GPT2, Hugging Face, Longformer, T5, etc. label Jul 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
model:transformer issues related to a transformer model: BERT, GPT2, Hugging Face, Longformer, T5, etc.
Projects
None yet
Development

No branches or pull requests

3 participants