From 440cc2f46f061b11dbf27f2cf07dee16ee10c25f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tr=E1=BA=A7n=20=C4=90=E1=BB=A9c=20Nam?= Date: Fri, 22 Dec 2023 15:39:24 +0700 Subject: [PATCH] update: change folder architecture --- {awqpy => awq-py}/README.md | 0 {awqpy => awq-py/awq}/apply_awq.py | 0 {awqpy => awq-py}/requirements.txt | 0 convert-hf-to-gguf.py | 3 ++- convert.py | 3 ++- 5 files changed, 4 insertions(+), 2 deletions(-) rename {awqpy => awq-py}/README.md (100%) rename {awqpy => awq-py/awq}/apply_awq.py (100%) rename {awqpy => awq-py}/requirements.txt (100%) diff --git a/awqpy/README.md b/awq-py/README.md similarity index 100% rename from awqpy/README.md rename to awq-py/README.md diff --git a/awqpy/apply_awq.py b/awq-py/awq/apply_awq.py similarity index 100% rename from awqpy/apply_awq.py rename to awq-py/awq/apply_awq.py diff --git a/awqpy/requirements.txt b/awq-py/requirements.txt similarity index 100% rename from awqpy/requirements.txt rename to awq-py/requirements.txt diff --git a/convert-hf-to-gguf.py b/convert-hf-to-gguf.py index 83b0f7ef2..78add8fae 100755 --- a/convert-hf-to-gguf.py +++ b/convert-hf-to-gguf.py @@ -1040,7 +1040,8 @@ args = parse_args() dir_model = args.model if args.awq_path: - from awqpy.apply_awq import add_scale_weights + sys.path.insert(1, str(Path(__file__).parent / 'awq-py')) + from awq.apply_awq import add_scale_weights tmp_model_path = args.model / "weighted_model" dir_model = tmp_model_path if tmp_model_path.is_dir(): diff --git a/convert.py b/convert.py index d774953e5..24fa449eb 100755 --- a/convert.py +++ b/convert.py @@ -1200,7 +1200,8 @@ def main(args_in: list[str] | None = None) -> None: args = parser.parse_args(args_in) if args.awq_path: - from awqpy.apply_awq import add_scale_weights + sys.path.insert(1, str(Path(__file__).parent / 'awq-py')) + from awq.apply_awq import add_scale_weights tmp_model_path = args.model / "weighted_model" if tmp_model_path.is_dir(): print(f"{tmp_model_path} exists as a weighted model.")