diff options
| author | Mitja Felicijan <mitja.felicijan@gmail.com> | 2026-02-12 20:57:17 +0100 |
|---|---|---|
| committer | Mitja Felicijan <mitja.felicijan@gmail.com> | 2026-02-12 20:57:17 +0100 |
| commit | b333b06772c89d96aacb5490d6a219fba7c09cc6 (patch) | |
| tree | 211df60083a5946baa2ed61d33d8121b7e251b06 /llama.cpp/gguf-py/gguf/gguf.py | |
| download | llmnpc-b333b06772c89d96aacb5490d6a219fba7c09cc6.tar.gz | |
Engage!
Diffstat (limited to 'llama.cpp/gguf-py/gguf/gguf.py')
| -rw-r--r-- | llama.cpp/gguf-py/gguf/gguf.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/llama.cpp/gguf-py/gguf/gguf.py b/llama.cpp/gguf-py/gguf/gguf.py new file mode 100644 index 0000000..651a81e --- /dev/null +++ b/llama.cpp/gguf-py/gguf/gguf.py | |||
| @@ -0,0 +1,15 @@ | |||
| 1 | # This file left for compatibility. If you want to use the GGUF API from Python | ||
| 2 | # then don't import gguf/gguf.py directly. If you're looking for examples, see the | ||
| 3 | # examples/ directory for gguf-py | ||
| 4 | |||
| 5 | import importlib | ||
| 6 | import sys | ||
| 7 | from pathlib import Path | ||
| 8 | |||
| 9 | sys.path.insert(0, str(Path(__file__).parent.parent)) | ||
| 10 | |||
| 11 | # Compatibility for people trying to import gguf/gguf.py directly instead of as a package. | ||
| 12 | importlib.invalidate_caches() | ||
| 13 | import gguf # noqa: E402 | ||
| 14 | |||
| 15 | importlib.reload(gguf) | ||
