Skip to content

Commit 3fa9de4

Browse files
authored
Merge branch 'ggerganov:master' into fix-gptneox
2 parents 2c17e69 + bce1fef commit 3fa9de4

7 files changed

+23
-547
lines changed

convert-falcon-hf-to-gguf.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,14 @@
1111
from pathlib import Path
1212
from typing import Any
1313

14-
import gguf
1514
import numpy as np
1615
import torch
1716
from transformers import AutoTokenizer # type: ignore[import]
1817

18+
if 'NO_LOCAL_GGUF' not in os.environ:
19+
sys.path.insert(1, str(Path(__file__).parent / 'gguf-py' / 'gguf'))
20+
import gguf
21+
1922

2023
def bytes_to_unicode():
2124
# ref: https://github.com/openai/gpt-2/blob/master/src/encoder.py

convert-gptneox-hf-to-gguf.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,14 @@
1111
from pathlib import Path
1212
from typing import Any
1313

14-
import gguf
1514
import numpy as np
1615
import torch
1716
from transformers import AutoTokenizer # type: ignore[import]
1817

18+
if 'NO_LOCAL_GGUF' not in os.environ:
19+
sys.path.insert(1, str(Path(__file__).parent / 'gguf-py' / 'gguf'))
20+
import gguf
21+
1922
# ref: https://github.com/openai/gpt-2/blob/master/src/encoder.py
2023

2124

convert-llama-7b-pth-to-gguf.py

Lines changed: 0 additions & 261 deletions
This file was deleted.

convert-llama-ggmlv3-to-gguf.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,13 @@
77
import sys
88
from pathlib import Path
99

10-
import gguf
1110
import numpy as np
1211

12+
import os
13+
if 'NO_LOCAL_GGUF' not in os.environ:
14+
sys.path.insert(1, str(Path(__file__).parent / 'gguf-py' / 'gguf'))
15+
import gguf
16+
1317
# Note: Does not support GGML_QKK_64
1418
QK_K = 256
1519
# Items here are (block size, type size)

0 commit comments

Comments
 (0)