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

[FR]: save model from pass OnnxStaticQuantization quant_preprocess = true #1632

Open
7 tasks
xieofxie opened this issue Feb 21, 2025 · 2 comments
Open
7 tasks
Labels
enhancement New feature or request

Comments

@xieofxie
Copy link
Contributor

Proposal Summary

do we have a way to this? Sometimes I need to quantize from the model here and preprocess is not needed to be reruned multiple times.

We could do

  • Add a new pass to run this only
  • Add a parameter to OnnxStaticQuantization so only save the mode from this and no quantize

What component(s) does this request affect?

  • OliveModels
  • OliveSystems
  • OliveEvaluator
  • Metrics
  • Engine
  • Passes
  • Other
@xieofxie xieofxie added the enhancement New feature or request label Feb 21, 2025
@jambayk
Copy link
Contributor

jambayk commented Feb 21, 2025

This is a good idea. Having to rerun this multiple times was a concern for us so we tried to do some caching with

preprocessed_temp_model_path = (
but that only persists during the lifetime of the pass and was meant for use with search.

I think for a general use case, we could create a new pass to do quant preprocess. Providing a directory to save the preprocessed model is a possibility too but I am not sure if we want the user to have to manage that.

@xieofxie
Copy link
Contributor Author

Yes, a new pass is very useful. Because many parameters of OnnxStaticQuantization are based on the preprocessed model not the input model of the pass

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