Unverified Commit 87778d5f authored by Heng Guo's avatar Heng Guo Committed by GitHub
Browse files

[Feature][Quantization] auto_round support for mixed bits quantization (#23812)


Signed-off-by: default avatarn1ck-guo <heng.guo@intel.com>
Signed-off-by: default avatarHeng Guo <heng.guo@intel.com>
Co-authored-by: default avatargemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
parent f9e7ad54
......@@ -436,6 +436,12 @@ class AutoRoundConfig(QuantizationConfig):
return None
def get_quant_method(self, layer: torch.nn.Module, prefix: str):
if prefix and self.extra_config:
for layer_name in self.extra_config:
if (
layer_name == prefix or layer_name == f"model.{prefix}"
) and self.extra_config[layer_name].get("bits", 16) >= 16:
return UnquantizedLinearMethod()
if (
current_platform.is_cpu()
or current_platform.is_xpu()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment