Make colab functional for llama.cpp
- Download only Q4_K_M for GGUF repositories by default - Use maximum n-gpu-layers by default
This commit is contained in:
parent
994502d41b
commit
613feca23b
2 changed files with 6 additions and 1 deletions
|
@ -115,7 +115,7 @@
|
||||||
" output_folder = \"\"\n",
|
" output_folder = \"\"\n",
|
||||||
"\n",
|
"\n",
|
||||||
"# Start the web UI\n",
|
"# Start the web UI\n",
|
||||||
"cmd = f\"python server.py --share\"\n",
|
"cmd = f\"python server.py --share --n-gpu-layers 128\"\n",
|
||||||
"if output_folder != \"\":\n",
|
"if output_folder != \"\":\n",
|
||||||
" cmd += f\" --model {output_folder}\"\n",
|
" cmd += f\" --model {output_folder}\"\n",
|
||||||
"cmd += f\" {command_line_flags}\"\n",
|
"cmd += f\" {command_line_flags}\"\n",
|
||||||
|
|
|
@ -128,6 +128,11 @@ class ModelDownloader:
|
||||||
if classifications[i] in ['pytorch', 'pt']:
|
if classifications[i] in ['pytorch', 'pt']:
|
||||||
links.pop(i)
|
links.pop(i)
|
||||||
|
|
||||||
|
if has_gguf and specific_file is None:
|
||||||
|
for i in range(len(classifications) - 1, -1, -1):
|
||||||
|
if 'q4_k_m' not in links[i].lower():
|
||||||
|
links.pop(i)
|
||||||
|
|
||||||
is_llamacpp = has_gguf and specific_file is not None
|
is_llamacpp = has_gguf and specific_file is not None
|
||||||
return links, sha256, is_lora, is_llamacpp
|
return links, sha256, is_lora, is_llamacpp
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue