Skip to content

Commit 8e1aab1

Browse files
committed
Try importing gptqmodel first when exporting a GPTQ model to openvino
1 parent 95f1345 commit 8e1aab1

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

optimum/exporters/openvino/__main__.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,10 @@ def main_export(
339339
orig_post_init_model = GPTQQuantizer.post_init_model
340340

341341
def post_init_model(self, model):
342-
from auto_gptq import exllama_set_max_input_length
342+
try:
343+
from gptqmodel import exllama_set_max_input_length
344+
except ImportError:
345+
from auto_gptq import exllama_set_max_input_length
343346

344347
class StoreAttr(object):
345348
pass

0 commit comments

Comments
 (0)