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

"ValueError: Trying to export a codesage model" while trying to export codesage/codesage-large #2080

Open
1 of 4 tasks
TurboEncabulator9000 opened this issue Oct 25, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@TurboEncabulator9000
Copy link

System Info

optimum 1.23.2
MacOS 14.7
Python 3.9

Who can help?

@michaelbenayoun

Information

  • The official example scripts
  • My own modified scripts

Tasks

  • An officially supported task in the examples folder (such as GLUE/SQuAD, ...)
  • My own task or dataset (give details below)

Reproduction (minimal, reproducible, runnable)

This is a PyTorch embedding model released by AWS, as described here: https://www.linkedin.com/posts/changsha-ma-9ba7a485_yes-code-needs-its-own-embedding-models-activity-7163196644258226176-bFSW

Hoping I can use it with RAG under ollama for code understanding.

huggingface-cli download codesage/codesage-large
optimum-cli export onnx --model codesage/codesage-large codesage-large-onnx --task default --trust-remote-code

The error: "ValueError: Trying to export a codesage model, that is a custom or unsupported architecture, but no custom onnx configuration was passed as custom_onnx_configs. Please refer to https://huggingface.co/docs/optimum/main/en/exporters/onnx/usage_guides/export_a_model#custom-export-of-transformers-models for an example on how to export custom models. Please open an issue at https://github.com/huggingface/optimum/issues if you would like the model type codesage to be supported natively in the ONNX export."

I am grateful for any help you can provide!

Expected behavior

An exported ONNX file.

@TurboEncabulator9000 TurboEncabulator9000 added the bug Something isn't working label Oct 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant