File tree 2 files changed +2
-10
lines changed
2 files changed +2
-10
lines changed Original file line number Diff line number Diff line change @@ -65,18 +65,10 @@ def __init__(
65
65
if match := re .match (r"(.*?)-(\d+)-of-(\d+)\.gguf" , filename ):
66
66
log .info ("Sharded GGUF file given - ensuring that all GGUF shards are downloaded" )
67
67
additional_files = []
68
- # there is a bug in llama-cpp-python that makes the additional_files inherit the subfolder of the parent
69
- * subfolders , basename = match [1 ].split ("/" )
70
- if subfolders :
71
- log .warning (
72
- "llama-cpp-python can fail to find additional model files in subfolders. If you see a 404 error,"
73
- ' try manually supplying `model_load_kwargs={"additional_files": [...]}` or use huggingface-cli to'
74
- " download model files."
75
- )
76
68
for n in range (1 , int (match [3 ]) + 1 ):
77
69
if n == int (match [2 ]):
78
70
continue
79
- additional_files .append (f"{ basename } -*{ n } -of-{ match [3 ]} .gguf" )
71
+ additional_files .append (f"{ match [ 1 ] } -*{ n } -of-{ match [3 ]} .gguf" )
80
72
log .info (f"additional_files={ additional_files } " )
81
73
model_load_kwargs .setdefault ("additional_files" , additional_files )
82
74
Original file line number Diff line number Diff line change 26
26
repo_id = "unsloth/DeepSeek-R1-GGUF" ,
27
27
filename = "DeepSeek-R1-Q2_K_XS/DeepSeek-R1-Q2_K_XS-00001-of-00005.gguf" ,
28
28
prompt_pipeline = pipeline ,
29
- model_load_kwargs = {"n_gpu_layers" : - 1 },
29
+ model_load_kwargs = {"n_gpu_layers" : - 1 , "additional_files" : [] },
30
30
)
31
31
32
32
You can’t perform that action at this time.
0 commit comments