Open hbwx24 opened 10 months ago
@hbwx24 Thanks for trying out QAT. QAT with ONNX Runtime is in experimental stage at this time.
Looking through my own TODOs in the repository, it seems like per channel QAT is not supported yet.
I don't know if I can commit to having this feature completed soon, but I will try to address this feature before the next ONNX Runtime release (1.18).
@hbwx24 Thanks for trying out QAT. QAT with ONNX Runtime is in experimental stage at this time.
Looking through my own TODOs in the repository, it seems like per channel QAT is not supported yet.
I don't know if I can commit to having this feature completed soon, but I will try to address this feature before the next ONNX Runtime release (1.18).
Thank you very much
I have also encountered this problem, and I am anxious to use it. If I develop it myself, can you tell me how to fix it? @baijumeswani
This issue has been automatically marked as stale due to inactivity and will be closed in 30 days if no further activity occurs. If further support is needed, please provide an update and/or more details.
Describe the issue
The model weight is quantified per channel:
onnxruntime/orttraining/orttraining/training_api/module.cc:538 onnxruntime::common::Status onnxruntime::training::api::Module::TrainStep(const std::vector&, std::vector&) [ONNXRuntimeError] : 6 : RUNTIME_EXCEPTION : Non-zero status code returned while running FakeQuant node. Name:'FakeQuant_token_260' Status Message: /home/xin.wei/workdir/quant/onnx2torch/onnxruntime-source/orttraining/orttraining/training_ops/cpu/quantization/fake_quant.cc:68 onnxruntime::common::Status onnxruntime::contrib::FakeQuant::Compute(onnxruntime::OpKernelContext*) const [with T = float] IsScalarOr1ElementVector(scale) was false. Quantization scale must be a scalar or 1D tensor of size 1.
onnxruntime 1.16.3 onnxruntime-extensions 0.9.0 onnxruntime-gpu 1.16.3 onnxruntime-training 1.16.3
orttraining/orttraining/training_api/module.cc:538 onnxruntime::common::Status onnxruntime::training::api::Module::TrainStep(const std::vector&, std::vector&) [ONNXRuntimeError] : 6 : RUNTIME_EXCEPTION : Non-zero status code returned while running FakeQuant node. Name:'FakeQuant_token_260' Status Message: /home/xin.wei/workdir/quant/onnx2torch/onnxruntime-source/orttraining/orttraining/training_ops/cpu/quantization/fake_quant.cc:68 onnxruntime::common::Status onnxruntime::contrib::FakeQuant::Compute(onnxruntime::OpKernelContext*) const [with T = float] IsScalarOr1ElementVector(scale) was false. Quantization scale must be a scalar or 1D tensor of size 1.