Skip to content

Commit

Permalink
fix test_serialization_big_model_inference failed
Browse files Browse the repository at this point in the history
  • Loading branch information
ZX-ModelCloud committed Dec 21, 2024
1 parent 99b5f14 commit 9746143
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion tests/quantization/gptq/test_gptq.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,16 @@ def test_serialization_big_model_inference(self):
"""
with tempfile.TemporaryDirectory() as tmpdirname:
self.quantized_model.save_pretrained(tmpdirname)
quantized_model_from_saved = AutoModelForCausalLM.from_pretrained(tmpdirname, device_map=self.device_map)

quantization_config = GPTQConfig(
bits=self.bits,
group_size=self.group_size,
desc_act=self.desc_act,
sym=self.sym,
use_exllama=self.use_exllama,
)
quantized_model_from_saved = AutoModelForCausalLM.from_pretrained(tmpdirname, device_map=self.device_map,
quantization_config=quantization_config)
self.check_inference_correctness(quantized_model_from_saved)


Expand Down

0 comments on commit 9746143

Please sign in to comment.