Skip to content

Commit cefb68b

Browse files
authored
Added support for llama and mistral GPTQ models (#1164)
1 parent c2d69ad commit cefb68b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

pgml-extension/src/bindings/transformers/transformers.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,13 +294,16 @@ def create_pipeline(task):
294294
ensure_device(task)
295295
convert_dtype(task)
296296
model_name = task.get("model", None)
297+
model_type = None
298+
if "model_type" in task:
299+
model_type = task["model_type"]
297300
if model_name:
298301
lower = model_name.lower()
299302
else:
300303
lower = None
301304
if lower and ("-ggml" in lower or "-gguf" in lower):
302305
pipe = GGMLPipeline(model_name, **task)
303-
elif lower and "-gptq" in lower:
306+
elif lower and "-gptq" in lower and not (model_type == "mistral" or model_type == "llama"):
304307
pipe = GPTQPipeline(model_name, **task)
305308
else:
306309
try:

0 commit comments

Comments
 (0)