Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Configuration

Directory Layout

llm-manager uses XDG directories for config and data:

~/.config/llm-manager/          # Config directory
├── config.yaml                 # Global settings
├── models/                     # Per-model YAML configs
│   └── qwen2.5-7b.yaml
├── profiles/                   # Per-profile YAML configs
│   └── my-profile.yaml
├── presets/                    # Per-preset YAML configs
│   └── custom-preset.yaml
├── unused/                     # Deleted model configs
├── unused_profiles/            # Deleted profiles
└── unused_presets/             # Deleted presets

~/.local/share/llm-manager/     # Data directory
├── models/                     # GGUF model files
│   └── qwen2.5-7b.Q4_K_M.gguf
└── bin/                        # llama-server binaries
    └── llama-server-cpu-...

Per-model configs are named <model_name>.yaml where model_name is the GGUF filename without the .gguf extension. Deleted configs are moved to unused/ subdirectories (recoverable).

Config File

The main config file is ~/.config/llm-manager/config.yaml. It is created automatically on first run with sensible defaults.

models_dirs:
  - ~/.local/share/llm-manager/models
llama_server: llama-server
default:
  context_length: 131072
  threads: <physical cores>
  threads_batch: 8
  batch_size: 512
  temperature: 0.8
  # ... more settings

You can specify a custom config path with --config:

cargo run -- --config /path/to/config.yaml

Default Parameters

ParameterDefaultDescription
context_length131072Context window size in tokens
threads(physical cores)CPU threads for generation
threads_batch8CPU threads for batch processing
batch_size512Logical maximum batch size
ubatch_size512Physical maximum batch size
keep0Keep N tokens from initial prompt
mlockfalseLock model weights in RAM
mmaptrueMemory-map the model
kv_cache_offloadtrueOffload KV cache to RAM
flash_attntrueEnable Flash Attention
temperature0.8Sampling temperature
top_k40Top-k sampling
top_p0.95Top-p sampling
min_p0.0Min-p sampling
typical_p1.0Typical-p sampling
repeat_penalty1.1Repetition penalty
repeat_last_n64Repetition penalty last N tokens
presence_penaltynullPresence penalty
frequency_penaltynullFrequency penalty
max_tokensnullMaximum generation tokens (unlimited if null)
seed-1Random seed (-1 = random)
backendauto-detectedDefault backend (auto-detected: Cuda for NVIDIA, Rocm for AMD, Vulkan for Intel; falls back to cpu). Options: cpu, vulkan, rocm, rocm-lemonade, cuda, cpu_arm64, win_cpu, win_vulkan, win_cuda_12_4, win_cuda_13_1, win_hip, macos_arm64, macos_x64

Advanced Parameters

ParameterDefaultDescription
swa_fullfalseFull-size SWA cache
numanoneNUMA optimization mode
uniform_cachetrueUnified KV cache across sequences
parallel1Max concurrent predictions
max_concurrent_predictionsnullMax requests in flight
gpu_layers-1GPU layers (-1 = all)
gpu_layers_modeAutoGPU layers distribution mode
split_modelayerSplit mode for multi-GPU
tensor_split(empty)Tensor split across GPUs
main_gpu0Main GPU ID
fittrueFit GPU layers automatically
embeddingfalseEnable embedding mode
jinjatrueUse Jinja chat template
chat_templatenullCustom chat template string
expert_count-1Expert count for MoE models
mirostatoffMirostat mode (off, 1, 2)
mirostat_lr0.1Mirostat learning rate
mirostat_ent5.0Mirostat entropy
ignore_eosfalseIgnore EOS token
samplerspenalties;dry;top_n_sigma;top_k;typ_p;top_p;min_p;xtc;temperatureSampler chain
dry_multiplier0.0DRY sampling multiplier
dry_base1.75DRY sampling base
dry_allowed_length2DRY allowed repetition length
dry_penalty_last_n-1DRY last N tokens
rope_scalingnoneRoPE scaling type (none, linear, yarn)
rope_scale1.0RoPE scale factor
rope_freq_base0.0RoPE frequency base (0 = auto)
rope_freq_scale1.0RoPE frequency scale
rope_yarn_enabledfalseEnable RoPE Yarn
cache_prompttrueCache prompt tokens
cache_reuse0Cache reuse length in tokens
cache_typef16KV cache quantization type
cache_type_knullKV cache quantization type (K)
cache_type_vnullKV cache quantization type (V)
spec_type(empty)Speculative decoding type (e.g. “draft-mtp”, “ngram-simple”)
draft_tokens0Number of draft tokens for MTP
host127.0.0.1Server bind address
port8080Server port
timeout600Server timeout in seconds
webuifalseEnable web UI
ws_server_enabledfalseEnable WebSocket server
ws_server_port49223WebSocket server port
ws_server_auth_keynullWebSocket server auth key
server_tls_enabledtrueWebSocket server TLS
server_tls_certnullWebSocket server TLS cert path
server_tls_keynullWebSocket server TLS key path
router_max_models4Max models in router mode
server_modeNormalServer mode (Normal, Router, Bench, BenchTune)
api_endpoint_enabledfalseEnable built-in API endpoint
api_endpoint_port49222Built-in API endpoint port
api_endpoint_keynullBearer token for API endpoint authentication
web_search_enabledfalseEnable web search
web_search_enginesearxngSearch engine (searxng)
web_search_engine_url(empty)URL of SearXNG instance (required for web search to work)
web_search_api_keynullBearer token for SearXNG authentication
platformnullPlatform override (linux, windows, macos)
tags(empty)Model tags for filtering

These can be configured via the LLM Settings panel, per-model config files, or directly in config.yaml.

Profiles

Profiles are named presets of settings. The built-in profiles are:

ProfileDescriptionKey Settings
QwenOptimized for Qwen models (dense)temp: 0.7, top-k: 20, presence-penalty: 0.0
Qwen-MoEOptimized for Qwen MoE models (35B-A3B)temp: 0.8, top-k: 20, presence-penalty: 1.5
Qwen-CodingOptimized for Qwen models in coding modetemp: 0.6, top-k: 20, presence-penalty: 0.0
GemmaOptimized for Gemma 2/4 modelstemp: 1.0, min-p: 0.1, top-k: 65
LlamaOptimized for Llama 3.1/3.3 modelstemp: 0.7, top-p: 0.9, repeat-penalty: 1.1
MistralOptimized for Mistral 7B/NeMo modelstemp: 0.7, top-k: 50, top-p: 0.9
PhiOptimized for Phi 3.5 Mini modelstemp: 0.7, top-k: 50, top-p: 0.9, repeat-penalty: 1.1

All profiles also set context_length: 131072, top_p: 0.95, max_tokens: 4096, and uniform_cache: true. Qwen, Qwen-MoE, Qwen-Coding, Gemma, Llama, and Mistral also set jinja: true (Phi does not).

User-defined profiles are stored as individual YAML files in ~/.config/llm-manager/profiles/<name>.yaml. Built-in profiles are auto-merged on load.

System Prompt Presets

System prompt presets define the initial system prompt. Built-in presets:

PresetDescription
General“You are a helpful assistant.”
CoderExpert software developer
ThinkerAnalytical and thoughtful
MathematicianExpert in mathematics

The default preset is Coder. User-defined presets are stored as individual YAML files in ~/.config/llm-manager/presets/<name>.yaml. Built-in presets are auto-merged on load.

Backend Binaries

llama-server binaries are stored in ~/.local/share/llm-manager/bin/ with versioned directories:

~/.local/share/llm-manager/bin/
├── llama-server-cpu-{version}/llama-server
├── llama-server-vulkan-{version}/llama-server
├── llama-server-rocm-{version}/llama-server
├── llama-server-rocm-lemonade-{version}/llama-server
└── llama-server-cuda-{version}/llama-server

Binaries are downloaded from specialized repositories on first use:

Switching versions is instant — no re-download.

Per-backend Version Config

llama_cpp_version_cpu: null
llama_cpp_version_vulkan: null
llama_cpp_version_rocm: null
llama_cpp_version_rocm_lemonade: null
llama_cpp_version_cuda: null

Platform-specific backend variants (e.g. CpuArm64, CpuWindows, CpuMacosArm64) are handled through the Backend enum and platform field, not through separate version config keys. Each backend has its own independently configurable version.

Setting to null uses the latest release. Specific versions can be set via the version picker in LLM Settings. These selections are automatically persisted to your configuration and remembered across restarts.

Asset Names

Assets are selected based on the detected platform. Linux examples:

  • CPU (x64): llama-{tag}-bin-ubuntu-x64.tar.gz
  • CPU (ARM64): llama-{tag}-bin-ubuntu-arm64.tar.gz
  • Vulkan: llama-{tag}-bin-ubuntu-vulkan-x64.tar.gz
  • ROCm: llama-{tag}-bin-ubuntu-rocm-7.2-x64.tar.gz
  • ROCm Lemonade: llama-{tag}-ubuntu-rocm-{gfx}-x64.zip (auto-detects GPU architecture)
  • CUDA: llama.cpp-{tag}-cuda-12.8-amd64.tar.gz

Windows assets use *.zip (e.g. llama-{tag}-bin-win-cpu-x64.zip). macOS assets use llama-{tag}-bin-macos-arm64.tar.gz or llama-{tag}-bin-macos-x64.tar.gz.

Serve Mode

You can start a model directly from the command line without the TUI:

./build.sh serve --model /path/to/model.gguf

Options

OptionDescription
--modelPath to the GGUF model file
--profileApply a settings profile (e.g., qwen, llama)
--configPath to config file
--api-portStart API proxy on given port
--api-keyAPI key for Bearer token authentication (API proxy)
--ws-enableEnable WebSocket dashboard server
--ws-portPort for WebSocket dashboard server
--hostBind address for the server (e.g., 0.0.0.0)
--backend-binaryPath to a custom llama-server binary
--log-fileLog file path (default: stdout)
--tls-enableEnable TLS for WebSocket dashboard
--tls-certPath to TLS certificate file
--tls-keyPath to TLS private key file

Note: --threads, --context, and --gpu-layers are not CLI flags. They are configured via config.yaml (default section) or per-model override files.

API Proxy

The API proxy forwards requests to the llama.cpp server and provides OpenAI-compatible and Anthropic-compatible endpoints. It supports SSE (Server-Sent Events) streaming for chat completions and other streaming endpoints. CORS is enabled with dynamic origin validation — only requests from localhost, 127.0.0.1, or the configured bind host are allowed. External websites are blocked. When --api-key is set, all requests require Authorization: Bearer <key>.

API Endpoints

The API proxy explicitly handles the following endpoints, while all other paths are automatically proxied to the llama-server instance:

EndpointMethodDescription
/healthGETHealth check
/metricsGETPrometheus metrics
/v1/chat/completionsPOSTChat completions (OpenAI)
/v1/completionsPOSTCompletions (OpenAI)
/v1/embeddingsPOSTEmbeddings
/v1/modelsGETList models
/api/statusGETServer status (pid, uptime, loaded models)

The following endpoints are forwarded to llama-server (llama-server built-in endpoints, not explicitly handled by llm-manager):

EndpointMethodDescription
/v1/responsesPOSTResponses (Anthropic)
/v1/messagesPOSTMessages (Anthropic)
/v1/messages/count_tokensPOSTCount tokens (Anthropic)
/completionPOSTLegacy completion
/infillPOSTCode completion (FIM)
/rerankingPOSTRe-ranking
/tokenizePOSTTokenize text
/detokenizePOSTDetokenize tokens
/apply-templatePOSTApply chat template
/v1/healthGETHealth check (alias)
/propsGET/POSTGet/set server properties
/slotsGETSlot monitoring
/lora-adaptersGET/POSTList/load LoRA adapters
/models/loadPOSTLoad a model (router mode, Work In Progress)
/models/unloadPOSTUnload a model (router mode, Work In Progress)

Model Overrides

Settings can be saved per-model. Overrides are stored as individual YAML files in ~/.config/llm-manager/models/<name>.yaml (where name is the GGUF filename without .gguf). When a model is loaded, its override settings are merged into the defaults. Deleted configs are moved to ~/.config/llm-manager/unused/ for recovery.

RPC Workers

You can manage a list of remote llama-rpc-server nodes for distributed inference. These are stored in the rpc_workers list in the config:

rpc_workers:
  - selected: true
    name: "Worker 1"
    ip: "192.168.1.10"
    port: 50052

Workers can be managed via the RPC Workers window in the Server Settings panel. Selected workers are combined into the --rpc flag when starting the server.