PTQ-Level Efficiency, QAT-Level Accuracy | 训练后量化的效率,量化感知训练的精度
Deprecate awq infer ut (#1171)
Weiwei2800c3e4476b
diff --git a/test/test_cpu/test_export.py b/test/test_cpu/test_export.pyindex 57b30354b..47b18f314 100644--- a/test/test_cpu/test_export.py+++ b/test/test_cpu/test_export.py@@ -358,14 +358,6 @@ class TestAutoRound(unittest.TestCase):from auto_round.export.export_to_awq.utils import WQLinear_GEMMassert isinstance(lm_head, WQLinear_GEMM), "Illegal AWQ quantization for lm_head layer"- quantization_config = AutoRoundConfig()- model = AutoModelForCausalLM.from_pretrained(- quantized_model_path, device_map="cpu", quantization_config=quantization_config- )- tokenizer = AutoTokenizer.from_pretrained(quantized_model_path)- text = "There is a girl who likes adventure,"- inputs = tokenizer(text, return_tensors="pt").to(model.device)- print(tokenizer.decode(model.generate(**inputs, max_new_tokens=50)[0]))shutil.rmtree(quantized_model_path, ignore_errors=True)def test_gptq_lmhead_export(self):diff --git a/test/test_cuda/test_export.py b/test/test_cuda/test_export.pyindex 6bb2612e8..297b20193 100644--- a/test/test_cuda/test_export.py+++ b/test/test_cuda/test_export.py@@ -343,15 +343,7 @@ class TestAutoRound(unittest.TestCase):lm_head = compressed_model.lm_headfrom auto_round.export.export_to_awq.utils import WQLinear_GEMM- assert isinstance(lm_head, WQLinear_GEMM), "Illegal GPTQ quantization for lm_head layer"- quantization_config = AutoRoundConfig()- model = AutoModelForCausalLM.from_pretrained(- quantized_model_path, device_map="auto", quantization_config=quantization_config- )- tokenizer = AutoTokenizer.from_pretrained(quantized_model_path)- text = "There is a girl who likes adventure,"- inputs = tokenizer(text, return_tensors="pt").to(model.device)- print(tokenizer.decode(model.generate(**inputs, max_new_tokens=50)[0]))+ assert isinstance(lm_head, WQLinear_GEMM), "Illegal AWQ quantization for lm_head layer"shutil.rmtree(quantized_model_path, ignore_errors=True)def test_gptq_lmhead_export(self):