commit 562364f07dda265368089f0f5fb78a49eb589449 parent 30537df2e4412a23276683d339fbb794123b4362 Author: ling0x <ling0x@users.noreply.github.com> Date: Tue, 9 Jun 2026 16:40:45 +0100 refactor: llama-cpp Diffstat:
| A | commands/llama-cpp.md | | | 27 | +++++++++++++++++++++++++++ |
1 file changed, 27 insertions(+), 0 deletions(-)
diff --git a/commands/llama-cpp.md b/commands/llama-cpp.md @@ -0,0 +1,27 @@ +# llama.cpp + +Install: + +```bash +curl -fsSL https://llama.app/install.sh | sh +``` + +Serve on a custom port (terminal 1): + +```bash +llama serve -hf google/gemma-4-31B-it-qat-q4_0-gguf:Q4_0 --port 9090 +``` + +`--port 9090` binds to 9090 instead of the default 8080. + +Use with pi (terminal 2): + +```bash +pi install git:github.com/huggingface/pi-llama # once + +LLAMA_BASE_URL="http://localhost:9090/v1" \ + pi --provider llama-cpp \ + --model google/gemma-4-31B-it-qat-q4_0-gguf:Q4_0 +``` + +`LLAMA_BASE_URL` must match the server port (`/v1` is the OpenAI-compatible API path).