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

Awesome project #797

Closed
inisis opened this issue Jun 8, 2024 · 3 comments
Closed

Awesome project #797

inisis opened this issue Jun 8, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@inisis
Copy link
Contributor

inisis commented Jun 8, 2024

Feature request

Thank you for your awesome project, can onnxslim be in your pipeline, there are still some space for onnx optimization after Optimum export.

Motivation

I believe there are still some performance increase after onnxslim

Your contribution

I can submit a pr with onnxslim

@inisis inisis added the enhancement New feature or request label Jun 8, 2024
@xenova
Copy link
Collaborator

xenova commented Jun 8, 2024

I would love that! 🔥 If you'd like, you can integrate it into the v3 conversion script: https://github.com/xenova/transformers.js/blob/v3/scripts/convert.py. There are many improvements to make there, and a huge refactor is certainly needed. Let me know if that's something you'd be interested in!

@inisis
Copy link
Contributor Author

inisis commented Jun 13, 2024

@xenova I started from following README,

python -m scripts.convert --quantize --model_id bert-base-uncased

and I find that after optimum export, we can use onnxslim to further optimize it, here are the slimmed result.
image

and the quanzation works fine, so I wonder if you have benchmark test on CI or how can I test the slimmed performance.

@inisis
Copy link
Contributor Author

inisis commented Jun 15, 2024

Hi @xenova

I found your repo on huggingface and I have tested some models manually,

like esm2_t30_150M_UR50D

image

and Phi-3-mini-4k-instruct-onnx-web
image

the results are promising.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants