From c256cd136b412631ce14417e371422ed091d46e6 Mon Sep 17 00:00:00 2001 From: Zhao Changmin Date: Mon, 19 Jun 2023 17:02:56 +0800 Subject: [PATCH] LLM: Fix ggml return value (#8358) * ggml return original value --- python/llm/src/bigdl/llm/convert_model.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/python/llm/src/bigdl/llm/convert_model.py b/python/llm/src/bigdl/llm/convert_model.py index fe038d91..d8605619 100644 --- a/python/llm/src/bigdl/llm/convert_model.py +++ b/python/llm/src/bigdl/llm/convert_model.py @@ -41,13 +41,12 @@ def llm_convert(model, check, _used_args = _special_kwarg_check(kwargs=kwargs, check_args=["tmp_path"]) invalidInputError(check, f"Invaid input kwargs found: {_used_args}") - ggml_convert_model(input_path=model, - output_path=outfile, - model_family=model_family, - dtype=outtype, - **_used_args, - ) - return outfile + return ggml_convert_model(input_path=model, + output_path=outfile, + model_family=model_family, + dtype=outtype, + **_used_args, + ) elif model_format == "gptq": invalidInputError(model.endswith(".pt"), "only support pytorch's .pt format now.") invalidInputError(model_family == "llama" and outtype == 'int4', @@ -68,6 +67,7 @@ def llm_convert(model, else: invalidInputError(False, f"Unsupported input model_type: {model_format}") + return None def main(): parser = argparse.ArgumentParser(description='Model Convert Parameters')