scripts: Use local gguf package when running from repo (#2927)

* scripts: Use local gguf when running from repo
This commit is contained in:
Kerfuffle
2023-08-31 16:49:24 -06:00
committed by GitHub
parent e8422de39e
commit aeefac4ff7
5 changed files with 22 additions and 5 deletions

View File

@ -7,9 +7,13 @@ import struct
import sys
from pathlib import Path
import gguf
import numpy as np
import os
if 'NO_LOCAL_GGUF' not in os.environ:
sys.path.insert(1, str(Path(__file__).parent / 'gguf-py' / 'gguf'))
import gguf
# Note: Does not support GGML_QKK_64
QK_K = 256
# Items here are (block size, type size)