Skip to content

Commit

Permalink
Fix gptq exllamav2 check (#157)
Browse files Browse the repository at this point in the history
  • Loading branch information
IlyasMoutawwakil authored Mar 13, 2024
1 parent 5bf349d commit 6e83384
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions optimum_benchmark/backends/pytorch/backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -278,13 +278,13 @@ def is_awq_quantized(self) -> bool:
def is_exllamav2(self) -> bool:
return (self.is_gptq_quantized or self.is_awq_quantized) and (
(
getattr(self.pretrained_config, "quantization_config", None) is not None
and getattr(self.pretrained_config.quantization_config, "exllama_config", None) is not None
hasattr(self.pretrained_config, "quantization_config")
and hasattr(self.pretrained_config.quantization_config, "exllama_config")
and self.pretrained_config.quantization_config.exllama_config.get("exllama_version", None) == 2
)
or (
self.config.quantization_config.get("exllama_config", None) is not None
and self.config.quantization_config.exllama_config.get("exllama_version", None) == 2
"exllama_config" in self.config.quantization_config
and self.config.quantization_config["exllama_config"].get("exllama_version", None) == 2
)
)

Expand Down

0 comments on commit 6e83384

Please sign in to comment.