mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-28 20:11:22 +00:00
[Quant] Fix accuracy_level config option for MatMul 4bits quantizer (#20146)
### Description Fixes code that extracts the accuracy level when creating a MatMulNBits node in the `DefaultWeightOnlyQuantizer` class. ### Motivation and Context Error from line 443: `AttributeError: 'DefaultWeightOnlyQuantizer' object has no attribute 'accuracy_level'`. The solution is to access `self.config.accuracy_level` instead of `self.accuracy_level`. Relevant commit: https://github.com/microsoft/onnxruntime/pull/19106
This commit is contained in:
parent
17919717b5
commit
b1a5eb255e
1 changed files with 1 additions and 1 deletions
|
|
@ -440,7 +440,7 @@ class DefaultWeightOnlyQuantizer:
|
|||
kwargs["bits"] = 4
|
||||
kwargs["block_size"] = self.config.block_size
|
||||
if self.config.accuracy_level is not None:
|
||||
kwargs["accuracy_level"] = self.accuracy_level
|
||||
kwargs["accuracy_level"] = self.config.accuracy_level
|
||||
|
||||
matmul_q4_node = onnx.helper.make_node(
|
||||
"MatMulNBits",
|
||||
|
|
|
|||
Loading…
Reference in a new issue