From c6ae1d679943994301021f05f0110823ff746440 Mon Sep 17 00:00:00 2001 From: Christian Zhou-Zheng Date: Fri, 7 Jun 2024 21:09:03 -0400 Subject: [PATCH] reinstate original gguf package import and fix type annotation --- convert-hf-to-gguf.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/convert-hf-to-gguf.py b/convert-hf-to-gguf.py index b4ea11a15..20bf67d80 100755 --- a/convert-hf-to-gguf.py +++ b/convert-hf-to-gguf.py @@ -23,9 +23,7 @@ if TYPE_CHECKING: if 'NO_LOCAL_GGUF' not in os.environ: sys.path.insert(1, str(Path(__file__).parent / 'gguf-py')) -import importlib -gguf = importlib.import_module("gguf-py.gguf") -# import gguf +import gguf logger = logging.getLogger("hf-to-gguf") @@ -60,7 +58,7 @@ class Model: tensor_map: gguf.TensorNameMap tensor_names: set[str] | None fname_out: Path - gguf_writer: gguf.GGUFWriter + gguf_writer: gguf.GGUFWriterSplit # subclasses should define this! model_arch: gguf.MODEL_ARCH