summaryrefslogtreecommitdiff
path: root/convert.py
diff options
context:
space:
mode:
authorcebtenzzre <cebtenzzre@gmail.com>2023-10-02 14:58:46 -0400
committerGitHub <noreply@github.com>2023-10-02 14:58:46 -0400
commit0fe321031a5c670ab5fb5f49d69c4c91d783c93f (patch)
tree4894e8f94e88165d37bf5c278fae4540a8a06cd0 /convert.py
parent9476b012260a2fb6c67976582d64484ce7406ed9 (diff)
gguf : general usability improvements (#3409)
Diffstat (limited to 'convert.py')
-rwxr-xr-xconvert.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/convert.py b/convert.py
index 8bb6c7e4..e14b9ef8 100755
--- a/convert.py
+++ b/convert.py
@@ -41,8 +41,7 @@ if hasattr(faulthandler, 'register') and hasattr(signal, 'SIGUSR1'):
NDArray: TypeAlias = 'np.ndarray[Any, Any]'
-ARCH=gguf.MODEL_ARCH.LLAMA
-NAMES=gguf.MODEL_TENSOR_NAMES[ARCH]
+ARCH = gguf.MODEL_ARCH.LLAMA
DEFAULT_CONCURRENCY = 8
#
@@ -953,7 +952,7 @@ class OutputFile:
of.close()
def pick_output_type(model: LazyModel, output_type_str: str | None) -> GGMLFileType:
- wq_type = model[NAMES[gguf.MODEL_TENSOR.ATTN_Q].format(bid=0)+".weight"].data_type
+ wq_type = model[gguf.TENSOR_NAMES[gguf.MODEL_TENSOR.ATTN_Q].format(bid=0)+".weight"].data_type
if output_type_str == "f32" or (output_type_str is None and wq_type == DT_F32):
return GGMLFileType.AllF32