Skip to content

Commit

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

Expand Down

0 comments on commit bd5c00b

Please sign in to comment.