]> us-delaporte.pagekite.me Git - dotfiles.git/commitdiff
Lama.cpp WIP
authorEdward Delaporte <edward@delaporte.us>
Sun, 2 Aug 2026 23:14:06 +0000 (18:14 -0500)
committerEdward Delaporte <edward@delaporte.us>
Sun, 2 Aug 2026 23:14:36 +0000 (18:14 -0500)
bin/llama-cli.sh [new file with mode: 0755]
files/llama-cpp.ini

diff --git a/bin/llama-cli.sh b/bin/llama-cli.sh
new file mode 100755 (executable)
index 0000000..747a9f5
--- /dev/null
@@ -0,0 +1,6 @@
+# MODEL=https://huggingface.co/TheBloke/Llama-2-7B-GGUF/resolve/main/llama-2-7b.Q4_K_M.gguf
+# MODEL=TheBloke/Llama-2-7B-GGUF/resolve/main/llama-2-7b.Q4_K_M.gguf
+MODEL=TheBloke/Llama-2-7B-GGUF
+
+echo $MODEL
+llama cli --ctx-size 8200 --hf-repo "$MODEL" -p $1
index 3c5657ad4d828a0223c7b4f3fae086d207ac09b2..f260af23f83ea55f2e60fe5e99680651bec603ae 100644 (file)
@@ -3,6 +3,17 @@ version = 1
 ; (Optional) This section provides global settings shared across all presets.
 ; If the same key is defined in a specific preset, it will override the value in this global section.
 [*]
 ; (Optional) This section provides global settings shared across all presets.
 ; If the same key is defined in a specific preset, it will override the value in this global section.
 [*]
-c = 8192
-n-gpu-layers = 8
+c = 8192  # works good
+; c = 16400  # works less well
+# c = 2048  # works terrible
+
+
+; When you ask for too many layers, llama.cpp fails at load time with a CUDA out of memory error. It will not silently fall back. It stops.
+
+; The fix is to drop ngl by a few and reload. Step down until it loads. If you are right at the edge, shave 2 or 3 layers and try again.
+
+; Watch your VRAM with nvidia-smi while the model loads. You want a buffer left over, not a card pinned at 100 percent. Other apps, your desktop, and the KV cache all want a slice.
+
+; 8 was fine, 16 was fine
+n-gpu-layers = 16