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

SentenceTransformer to tflite export failure #1982

Open
2 of 4 tasks
TalonBvV opened this issue Aug 5, 2024 · 2 comments
Open
2 of 4 tasks

SentenceTransformer to tflite export failure #1982

TalonBvV opened this issue Aug 5, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@TalonBvV
Copy link

TalonBvV commented Aug 5, 2024

System Info

Please see below the two commands I tried to use.

1) optimum-cli export tflite --model BAAI/bge-m3  --quantize int8-dynamic --sequence_length 2048 --batch_size 10 bge-m3-tflite/

2) python -m optimum.exporters.tflite --model BAAI/bge-m3 --quantize int8-dynamic --sequence_length 2048 --batch_size 10 bge-m3-tflite/

Here is the error I get:

Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "C:\Python\Lib\site-packages\optimum\exporters\tflite\__main__.py", line 148, in <module>
    main()
  File "C:\Python\Lib\site-packages\optimum\exporters\tflite\__main__.py", line 61, in main
    model = TasksManager.get_model_from_task(
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Python\Lib\site-packages\optimum\exporters\tasks.py", line 1945, in get_model_from_task
    model_class = TasksManager.get_model_class_for_task(
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Python\Lib\site-packages\optimum\exporters\tasks.py", line 1345, in get_model_class_for_task
    tasks_to_model_loader = TasksManager._LIBRARY_TO_TF_TASKS_TO_MODEL_LOADER_MAP[library]

Who can help?

No response

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)

  1. optimum-cli export tflite --model BAAI/bge-m3 --quantize int8-dynamic --sequence_length 2048 --batch_size 10 bge-m3-tflite/

  2. python -m optimum.exporters.tflite --model BAAI/bge-m3 --quantize int8-dynamic --sequence_length 2048 --batch_size 10 bge-m3-tflite/

Expected behavior

I expect it to export the tflite model.

@TalonBvV TalonBvV added the bug Something isn't working label Aug 5, 2024
@TalonBvV TalonBvV closed this as not planned Won't fix, can't repro, duplicate, stale Aug 5, 2024
@TalonBvV TalonBvV reopened this Aug 5, 2024
@TalonBvV
Copy link
Author

TalonBvV commented Aug 5, 2024

Here are my dependency versions:

  1. optimum version: 1.21.2
  2. python version: 3.12
  3. tensorflow version: 2.17.0

@TalonBvV
Copy link
Author

TalonBvV commented Aug 5, 2024

I have repeated my export process in colab and the result is the same.

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