Fix Quark quantization config (#37578)

fix
This commit is contained in:
Mohamed Mekkouri 2025-04-18 07:23:39 +02:00 committed by GitHub
parent 4acf692ace
commit bb2a44ad4b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 1 deletions

View File

@ -1821,7 +1821,10 @@ class QuarkConfig(QuantizationConfigMixin):
from quark.torch.export.config.config import JsonExporterConfig
from quark.torch.export.main_export.quant_config_parser import QuantConfigParser
from quark.torch.quantization.config.config import Config
else:
raise ImportError(
"Quark is not installed. Please refer to https://quark.docs.amd.com/latest/install.html."
)
# This might be e.g. `"fp8"` or `"awq"`.
self.custom_mode = kwargs["quant_method"]
self.legacy = "export" not in kwargs

View File

@ -33,6 +33,7 @@ if is_quark_available():
from quark.torch.export.nn.modules.qparamslinear import QParamsLinear
@require_quark
class QuarkConfigTest(unittest.TestCase):
def test_commmon_args(self):
config = AutoConfig.from_pretrained("amd/Llama-3.1-8B-Instruct-w-int8-a-int8-sym-test")