Configuration and helpers for running LLaMA.cpp models locally (Continue or any OpenAI-compatible client).
-
Build llama.cpp and put
llama-server,llama-cli, andllama-benchon yourPATH. -
From the repo root, build the CLI:
go build -o llm . -
Multi-model API server (loads every
[section]fromsrv.inivia--models-preset):./llm srv ./llm srv turbo.ini
-
Single-model run (reads one section from
srv.ini):./llm run qwen30b ./llm run turbo.ini qwen30b ./llm run qwen30b -c # llama-cli ./llm run qwen30b -b # llama-bench ./llm run qwen30b -q 6 # override GGUF quant (see below)
| Command | Purpose |
|---|---|
llm srv [ini] |
llama-server --models-preset <srv.ini> |
llm run [ini] <model> [options] [--] [args...] |
llama-server, llama-cli, or llama-bench for one model |
Global flag:
--config <path>— path tosrv.ini. If omitted:llm_INIenv var, then./srv.ini, thenbin/srv.ini, then paths next to the executable.- Both
srvandrunalso accept an optional positional.inipath, which overrides--config.
-c— interactive CLI (llama-cli).-b— benchmark (llama-bench).-q <N>— override the quant suffix inhf-repofor models that define presets in code: qwen7b4,8; qwen30b2,4,6; qwen80b2,3,3s,4,4s. Other sections rely onhf-repoinsrv.inionly.
In llm run, the model name default selects the qwen80b section (there is no [default] block in srv.ini).
INI sections define each model. Only keys that are present are turned into flags; missing keys use the llama binary defaults. Typical keys:
| Key | Used for |
|---|---|
hf-repo |
Hugging Face repo id and default quant, repo:QUANT (required) |
ctx-size |
Context length (server/cli when set) |
flash-attn |
Passed to llama-bench when set |
ngl, cache-type-k, cache-type-v, n-cpu-moe |
GPU/cache/MoE-related flags when set |
mmap |
If disabled / off / false / 0 / no, adds --no-mmap |
Sections in this repo:
- qwen30b —
unsloth/Qwen3-Coder-30B-A3B-Instruct-GGUF(default quant in ini:UD-Q6_K_XL). - qwen80b —
unsloth/Qwen3-Coder-Next-GGUF(IQ4_NLin ini). - qwen7b —
Qwen/Qwen2.5-Coder-7B-Instruct-GGUF(Q8_0in ini). - nomic-embed — embeddings model (
F32in ini). - qwen-rerank — reranker GGUF.
- fast-apply — small apply model.
Point the Continue extension (or any client) at your local OpenAI-compatible base URL (for example http://localhost:8080 or whatever host/port llama-server uses). Model IDs and routing depend on how you start the server (preset vs single run) and your client config.
- Go 1.22+ (to build
llm). - LLaMA.cpp binaries on
PATH: at leastllama-server; alsollama-cliandllama-benchif you usellm run -c/-b.