GPTQ improvements

This commit is contained in:
Henk
2023-08-19 14:45:45 +02:00
parent 13b68c67d1
commit d93631c889
3 changed files with 27 additions and 19 deletions

View File

@@ -47,7 +47,7 @@ class HFInferenceModel(InferenceModel):
requested_parameters = []
if not self.hf_torch:
return []
if model_name == 'customhuggingface':
if model_name in ('customhuggingface', 'customgptq'):
requested_parameters.append({
"uitype": "text",
"unit": "text",
@@ -61,7 +61,7 @@ class HFInferenceModel(InferenceModel):
"extra_classes": ""
})
if model_name != 'customhuggingface' or "custom_model_name" in parameters:
if model_name not in ('customhuggingface', 'customgptq') or "custom_model_name" in parameters:
model_name = parameters["custom_model_name"] if "custom_model_name" in parameters and parameters["custom_model_name"] != "" else model_name
if model_path is not None and os.path.exists(model_path):
self.model_config = AutoConfig.from_pretrained(model_path)