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

Add quantized PyTorch models in model builder #600

Merged
merged 12 commits into from
Jun 18, 2024

Conversation

kunal-vaishnavi
Copy link
Contributor

Description

This PR adds support for building the final ONNX models that are optimized and quantized from already-quantized PyTorch models.

Motivation and Context

Quantization methods supported for already-quantized PyTorch models are GPTQ and AWQ. Currently, only INT4 precision is supported.

src/python/py/models/quantized_model.py Dismissed Show dismissed Hide dismissed
src/python/py/models/quantized_model.py Fixed Show fixed Hide fixed
@kunal-vaishnavi kunal-vaishnavi merged commit c622cc1 into main Jun 18, 2024
12 checks passed
@kunal-vaishnavi kunal-vaishnavi deleted the kvaishnavi/quant-models branch June 18, 2024 22:36
kunal-vaishnavi added a commit that referenced this pull request Jun 28, 2024
### Description

This PR adds an end-to-end example for quantizing a PyTorch model with
[AutoAWQ](https://github.com/casper-hansen/AutoAWQ), creating the
corresponding optimized and quantized ONNX model, and running the ONNX
model with ONNX Runtime GenAI.

### Motivation and Context

This PR shows an end-to-end example for [the quantized PyTorch support
in the model
builder](#600).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants