llama.cpp geht auch rein per CPU, nutze ich auch so, grob bin ich so vorgegangen:
Git-Repository clonen
git clone https://github.com/ggml-org/llama.cpp.git
Ich verwende Openblas, hab das meine ich so installiert damals:
sudo apt install ibopenblas-dev libopenblas64-dev
Wechsel in das geclonte Verzeichnis:
cd llama.cpp
cmake Konfiguration, CC un CXX kann man weglassen, ich verwende 14er Versionen, obwohl 13 Standard ist in Ubuntu 24.04
CC=/usr/bin/gcc-14 CXX=/usr/bin/g++-14 cmake -B build -DGGML_BLAS=ON -DGGML_BLAS_VENDOR=OpenBLAS
Eigentlicher Bau der Software
cmake --build build --config Release
Hilfe zu den Programmoptionen
./build/bin/llama-cli --help
Kürzlich hat sich was geändert, hab diese Optionen bisher nie verwendet:
--reasoning-format
-sys, --system-prompt PROMPT
Müsste mich da auch erstmal einlesen, hab bisher meistens alles direkt bei -p angegeben. -sys ist neu.
Habs bisher so aufgerufen:
./build/bin/llama-cli --model ~/Downloads/models/deepseek-r1/DeepSeek-R1-Distill-Llama-70B-Q5_K_M-00001-of-00002.gguf --threads 6 --temp 0.6 --repeat_penalty 1.1 -no-cnv -s 429 -c 8192 --prompt '<|begin▁of▁sentence|>Eine deutschsprachige Konversation zwischen Benutzer und Assistent. Der Assistent denkt erst im Geist über den Argumentations-Prozess nach und gibt dem Benutzer dann die Antwort. Der Argumentations-Prozess und die Antwort sind umgebeben von <think> </think> und <answer> </answer> Tags, jeweils, zum Beispiel, <think> Hier der Argumentations-Prozess. </think> <answer> Hier die Antwort. </answer>. In den answer-Tags sollen alle Aspekte des Thinkingblocks berücksichtigt werden, um eine möglichst hochwertige Antwort zu erhalten.<|User|>Ein Apfel liegt im Raum A auf einem Teller, ich bringe den Teller in den Raum B. Wo ist der Apfel?<|Assistant|>'
Beispielausgabe:
<think>
Okay, so I've got this question here: "An apple is lying on a plate in room A. I take the plate into room B. Where's the apple?" Hmm, let me try to figure this out step by step.
First off, there's an apple on a plate in Raum A. So, Raum A has both the apple and the plate. Now, the person takes the plate from Raum A to Raum B. The question is asking where the apple ends up—does it stay in Raum A or does it move to Raum B?
I think about how objects move. If you pick something up, like a plate with an apple on it, when you move the plate, the apple should go with it because they're connected. So if I carry the plate from one room to another, the apple, being on top of the plate, would naturally come along.
Wait, but maybe there's a catch here? Like, sometimes in riddles or physics problems, things can be tricky. Could the apple stay behind if the plate is moved? But that doesn't make much sense because the apple is on the plate. Unless the apple was somehow stuck to Raum A, but that's not mentioned.
Another angle: Maybe it's about reference points. If the plate is in Raum B, and the apple is on the plate, then wherever the plate goes, the apple follows. So logically, the apple should be in Raum B now.
I don't think gravity or other forces would cause the apple to stay back unless specified. So yeah, I'm pretty sure the apple moves with the plate into Raum B.
</think>
Der Apfel befindet sich nun im Raum B, da er auf dem Teller liegt, der dorthin gebracht wurde.
<answer> Der Apfel ist in Raum B, weil er auf dem Teller liegt, den Sie in den Raum B getragen haben. </answer> [end of text]
Mit -sys und --reasoning-format erhalte ich nicht wie gewohnt den think-Block, da müsstest du selbst testen.
Für eine Web-UI:
./build/bin/llama-server --help
Konversationsmodus (Beibehaltung des Kontexts) lässt sich auch für llama-cli einschalten, siehe Optionen. Es ist bestimmt sinnvoller, den Default englischen Systemprompt zu verwenden.s setzt den Seed, kann man weglassen.