oneapi-src / oneapi-src/oneAPI-samples
How to Perform Static Quantization Directly on an ONNX Model Using Intel® Neural Compressor?
まだ誰も着手していません。
- 主要言語
- C++
- スター
- 1.2k
- フォーク
- 745
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
Hello,
I'm using Intel® Neural Compressor (INC) to perform static quantization on my custom PyTorch model. I followed this script which demonstrates how to apply static quantization using INC on a PyTorch model.
My goal is to obtain the final quantized model in ONNX format. However, after quantization, saving the q_model results in a .pt file (PyTorch format). I also found that exporting quantized PyTorch models to ONNX is problematic due to limited support and compatibility issues, especially with static quantization.
My Question:
Is there a way to perform static quantization directly on an ONNX model using Intel® Neural Compressor to produce a quantized ONNX model as the output?
Alternatively, is there a specific method to export the statically quantized PyTorch model to ONNX format while addressing the compatibility issues?
Any guidance or examples on how to achieve this would be greatly appreciated.
Thank you!
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
リンクされている quantize_with_inc.ipynb のサンプルから始め、量子化された PyTorch モデルをどのように保存しているかを確認してください。要求されている ONNX の入力/出力パスがサポートされているか、このサンプルにエクスポート例を含めるべきかを検証してください。直接的な ONNX 量子化と代替のエクスポートパスをカバーする、明確で再現可能な回答または例が得られれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- python, pytorch
- 領域
- documentation, machine-learning
- issue の種類
- ドキュメント
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 20/100