Every KoboldCpp flag, with defaults and history
Run KoboldCpp with --help to list its flags; this page lists all of them for the current version in one searchable table, with each flag's default, accepted values, the launcher field that sets it, and the version that added it. The most used are --model, --contextsize, --gpulayers, --usecuda or --usevulkan, --port and --config. Old names like --usecublas and --blasbatchsize still work as aliases; --useclblast was removed.
Checked against KoboldCpp 1.124.2 · updated 13 Nov 2026
- lab-lnx: Linux test VM · 4 vCPU · 15 GB · no GPU
- gha-w25: Windows Server 2025 test machine · 4 vCPU · 16 GB · no GPU
- gha-w22: Windows Server 2022 test machine · 4 vCPU · 16 GB · no GPU
- gha-u24: Ubuntu 24.04 test machine · 4 vCPU · 16 GB · no GPU
- gha-mac15: macOS 15 test VM (Apple Silicon) · 3 vCPU · 7 GB · paravirtual Metal
On this page
Checked against KoboldCpp 1.124.2: the table below lists 183 entries, including 2 positional arguments. It is generated from the program’s own argument parser, and the summaries are our own words.
model_param | Positional | — | current | Bare model path given without a flag (e.g. `koboldcpp model.gguf`). Kept for backward compatibility; a .kcpps/.kcppt path here is treated as a config. | |||||
port_param | Positional | 5001 | current | Bare port number given as the second positional argument. Same effect as --port. | |||||
--usecuda | --usecublas --usehipblas | Core options | — | 0 | 1 | 2 | 3 | all | mmq | nommq | normal | lowvram | rowsplit | Quick Launch › Backend | v1.33 | deprecated | Selects the NVIDIA CUDA backend (or hipBLAS/ROCm in ROCm builds). Optionally give a GPU index or 'all'; legacy sub-options (mmq/nommq/lowvram/rowsplit) are still parsed and translated into the newer flags. | F17 |
--usevulkan | Core options | — | [Device IDs] | Quick Launch › Backend | v1.56 | current | Selects the Vulkan backend, which works on NVIDIA, AMD and Intel GPUs. Optionally list device indices; leave empty to auto-detect. | F17 | |
--usecpu | Core options | off | Quick Launch › Backend | v1.75 | current | Forces CPU-only inference with no GPU backend. Replaces the old --noblas. | F17 | ||
--model | -m | Core options | — | [filenames] | Quick Launch › GGUF Text Model + "HF Search" button | v1.8 | current | Path(s) or URL(s) of the GGUF/GGML text model. Several values are only accepted when they are URLs (split model parts); URLs are downloaded first. | |
--config | Core options | — | [filename] | v1.41 | current | Loads a .kcpps settings file (or .kcppt template, also from a URL). Anything you also pass on the command line wins over the file. | F08 | ||
--contextsize | --ctx-size -c | Core options | 16384 | [256 to 524288] | Quick Launch › Context Size | v1.20 | current | Maximum context window in tokens to allocate (256-524288). Bigger values need more RAM/VRAM; default 16384 in 1.124. | F05 F06 F22 |
--gpulayers | --gpu-layers --n-gpu-layers -ngl | Core options | -1 | [GPU layers] | Quick Launch › GPU Layers | v1.23beta | current | How many model layers to offload to the GPU. -1 (default) turns on autofit; 0 keeps everything on the CPU. | F05 F41 |
--host | Core options | — | [ipaddr] | Network › Host / Port | v1.0.8beta | current | IP address to bind the HTTP server to. Empty (default) listens on all interfaces; use 127.0.0.1 for local-only. | ||
--launch | Core options | off | Quick Launch › Launch Browser | v1.10 | current | Opens your web browser on the UI once the model has loaded. | |||
--tensor_split | --tensorsplit --tensor-split -ts | Core options | — | [Ratios] | v1.37 | current | For CUDA/Vulkan multi-GPU: space-separated proportions for how much of the model each GPU gets, e.g. `7 3`. | ||
--threads | -t | Core options | auto | [threads] | Hardware › Threads | v1.0.8beta | current | CPU threads used for generation. Default is computed from your physical core count (the value shown in --help is machine-specific). | F07 |
--port | Core options | 5001 | [portnumber] | Network › Host / Port | v1.0.8beta | current | TCP port for the web UI and all APIs. Default 5001. | F05 | |
--version | Core options | off | v1.82 | current | Prints the KoboldCpp version and exits. | ||||
--noblas | Core options | off | v1.0.8beta | deprecated | Hidden legacy flag: old way to disable BLAS; now mapped to --usecpu. | ||||
--agent | Advanced | off | Agent › Launch KoboldCpp Agent | v1.122 | current | Starts the bundled KoboldCpp Agent (tool-using assistant for code and tasks) in a new terminal window, or in the current one when combined with --cli. Forces Jinja and raises context/gen defaults. | |||
--agentload | Advanced | — | [filename] | Agent › Load Agent Session | v1.123 | current | Resumes a saved KoboldCpp Agent session from its JSON save file when the agent starts. | ||
--analyze | Advanced | — | [filename] | v1.82 | current | Prints metadata, tensor names and weight types of a GGUF or safetensors file, then exits. | |||
--autofit | --fit -fit | Advanced | off | Quick Launch › Force AutoFit | v1.104 | current | Forces automatic fitting of the model across GPU(s)/CPU (layers, MoE overrides, splits), overriding manual layer settings. | ||
--autofitpadding | Advanced | 1024 | [padding in MB] | Hardware › Autofit Padding | v1.108 | current | Spare VRAM in MB that autofit leaves free as a safety margin (default 1024). | ||
--batchsize | --blasbatchsize --batch-size -b | Advanced | 512 | -1 | 16 | 32 | 64 | 128 | 256 | 512 | 1024 | 2048 | 4096 | Hardware › Batch Size | v1.8 | deprecated | Logical batch size for prompt processing (default 512). Larger is faster but uses more memory; -1 turns batching off. Formerly --blasbatchsize. | |
--ubatchsize | --ubatch-size -ub | Advanced | -1 | -1 | 16 | 32 | 64 | 128 | 256 | 512 | 1024 | 2048 | 4096 | Hardware › Physical Batch Size | v1.122 | current | Physical micro-batch size inside each batch. -1 (default) means same as --batchsize; lower it to save memory. | |
--benchmark | Advanced | — | [filename] | Hardware › Run Benchmark | v1.57 | current | Runs a benchmark instead of starting the server; optionally appends results to a CSV file. | F16 | |
--blasthreads | --batchthreads --threadsbatch --threads-batch | Advanced | 0 | [threads] | Hardware › Batch Threads | v1.19 | current | Thread count used during batched prompt processing; defaults to the --threads value. | |
--chatcompletionsadapter | Advanced | AutoGuess | [filename] | Loaded Files › Chat Adapter + "Pick Premade" | v1.62 | current | Instruct-template adapter (JSON file or bundled name such as ChatML, Llama-3) used to format /v1/chat/completions prompts. Default AutoGuess detects it from the model. | ||
--cli | Advanced | off | Hardware › CLI Terminal Only | v1.87 | current | Runs an interactive chat in the terminal with no HTTP server. With --agent, runs the agent in the same terminal. | |||
--debugmode | Advanced | 0 | Hardware › Debug Mode | v1.15 | current | Extra diagnostic output: -1 quiet (used for Horde), 0 normal, 1 verbose, higher for more detail. | |||
--defaultgenamt | Advanced | 2048 | Context › Default Gen Amt | v1.86.1 | current | Tokens to generate when a request does not specify a length (default 2048). Most frontends send their own value. | |||
--device | -dev | Advanced | — | <dev1,dev2,..> | Hardware › Device Override | v1.106.1 | current | llama.cpp-style comma-separated device list (e.g. Vulkan0,Vulkan1) that overrides the normal GPU selection. | |
--downloaddir | Advanced | — | [directory] | Loaded Files › Download Dir | v1.107.2 | current | Folder where models given as URLs are downloaded to and looked up in (default: working directory). | ||
--draftamount | --draft-max --draft-n --spec-draft-n-max | Advanced | 4 | [tokens] | Loaded Files › Draft Amount / Splits / Layers | v1.79 | current | Number of tokens the draft model proposes per step in speculative decoding (default 4). | |
--draftgpulayers | --gpu-layers-draft --n-gpu-layers-draft -ngld | Advanced | 999 | [layers] | Loaded Files › Draft Amount / Splits / Layers | v1.80 | current | GPU layers for the draft model (default 999 = fully offloaded). | |
--draftgpusplit | Advanced | — | [Ratios] | Loaded Files › Draft Amount / Splits / Layers | v1.80 | current | Multi-GPU split ratios for the draft model; only applies when the main model is split with --tensor_split. | ||
--draftmodel | --model-draft -md | Advanced | — | [filename] | Loaded Files › Draft Model | v1.79 | current | Small model with the same vocabulary as the main model, used for speculative decoding to speed up generation. | |
--enableguidance | Advanced | off | Context › Enable Guidance | v1.91 | current | Turns on classifier-free guidance so negative prompts work for text; costs speed and memory. | |||
--exportconfig | Advanced | — | [filename] | v1.85.1 | current | Writes the current arguments to a .kcpps file (then exits) for reuse with --config. | F08 | ||
--exporttemplate | Advanced | — | [filename] | v1.85.1 | current | Writes the current arguments as a shareable .kcppt template with machine-specific settings stripped. | |||
--failsafe | Advanced | off | Quick Launch › Backend | v1.80 | current | Maximum-compatibility mode for very old CPUs (no AVX); implies --noavx2. Very slow. | F15 | ||
--foreground | Advanced | off | Hardware › Keep Foreground | v1.45 | current | Windows only: brings the console window to the front on each new generation to avoid idle slowdowns. | |||
--gendefaults | Advanced | — | {"parameter":"value",...} | Context › Default Params | v1.105 | current | JSON object of default generation fields added to API requests that don't set them, e.g. {"temperature":0.7}. | ||
--gendefaultsoverwrite | Advanced | off | Context › Default Params | v1.105 | current | Makes --gendefaults values override what clients send instead of only filling gaps. | |||
--genlimit | --promptlimit | Advanced | 0 | [token limit] | Context › Prompt Limit | v1.73 | deprecated | Hard cap on generated tokens for every request (0 = no cap). Formerly --promptlimit. | |
--highpriority | Advanced | off | Hardware › High Priority | v1.18 | current | Raises the process CPU priority. Experimental; can cause system lag. | |||
--ignoremissing | Advanced | off | v1.61.2 | current | Skips optional files (LoRA, mmproj, etc.) that cannot be found instead of aborting. | ||||
--jinja | --jinja_tools --jinja-tools --jinjatools | Advanced | off | Quick Launch › Use Jinja | v1.102 | deprecated | Uses the model's embedded Jinja chat template (including tool calls) for chat completions, falling back to KoboldCpp's universal formatting if it fails. Since 1.123 also covers the former --jinjatools. | ||
--jinja_kwargs | --jinja-kwargs --jinjakwargs --chat-template-kwargs | Advanced | — | {"parameter":"value",...} | v1.111 | current | Extra JSON variables passed into the Jinja template renderer (llama.cpp's --chat-template-kwargs). | ||
--jinjatemplate | --chat-template-file | Advanced | — | [filename] | Loaded Files › Jinja Template | v1.112 | current | Path to a custom .jinja chat template that replaces the model's own. | |
--jinjathink | Advanced | default | default | true | false | Context › Jinja Thinking | v1.114 | current | Quick switch for thinking/reasoning in Jinja templates: default, true or false. Setting it enables Jinja. | ||
--lora | Advanced | — | [lora_filename] | Loaded Files › Text Lora + Multiplier | v1.11 | current | Applies a text LoRA (GGUF) on top of the base model. | ||
--loramult | Advanced | 1 | [amount] | Loaded Files › Text Lora + Multiplier | v1.93 | current | Strength multiplier for the text LoRA (default 1.0). | ||
--lowvram | -nkvo --no-kv-offload | Advanced | off | Hardware › No KV offload | v1.100 | current | Keeps the KV cache in system RAM instead of VRAM (llama.cpp -nkvo). Fits more layers but is slow. | F42 | |
--maingpu | --main-gpu -mg | Advanced | -1 | [Device ID] | Hardware › Main GPU | v1.94 | current | In multi-GPU setups, index of the GPU used as the main device (-1 = default). | |
--maxrequestsize | Advanced | 32 | [size in MB] | Network › Max Req. Size | v1.88 | current | Largest HTTP request body accepted, in MB (default 32); bigger requests are dropped. | ||
--mcpfile | Advanced | — | [mcp json file] | Loaded Files › MCP JSON | v1.106 | current | Path to a Claude-Desktop-format mcp.json listing MCP tool servers (HTTP or stdio) to expose to the UI and agent. | ||
--mmproj | Advanced | — | [filename] | Loaded Files › Mmproj File | v1.61 | current | Multimodal projector GGUF that adds image (and for some models audio) understanding to a compatible text model. | ||
--mmprojcpu | --no-mmproj-offload | Advanced | off | Loaded Files › V.Force CPU | v1.90 | current | Keeps the vision/audio projector on the CPU even when the main model is on GPU. | ||
--lazy-mode | --lazymode | Advanced | auto | auto | on | off | Context › Lazy Tensors | v1.124 | current | Controls on-demand reading of large architecture-specific tensors (e.g. per-layer embeddings): auto (>4 GiB), on, or off. | |
--moe-cache-mib | --moecache | Advanced | 0 | MiB | Context › MoE Cache MiB | v1.124 | current | Experimental VRAM cache (MiB) for MoE experts that otherwise live on the CPU; use with --moecpu or --autofit. | |
--moecpu | --n-cpu-moe -ncmoe | Advanced | 0 | [layers affected] | Context › MoE CPU Layers | v1.97 | current | Keeps the MoE expert weights of the first N layers (all if no number) in system RAM, freeing VRAM for big MoE models. | |
--ffncpu | --n-cpu-ffn -ncffn | Advanced | 0 | [layers affected] | Context › FFN CPU Layers | v1.121 | current | Like --moecpu but for dense FFN weights of the first N layers. | |
--moeexperts | Advanced | -1 | [num of experts] | Context › MoE Experts | v1.80 | current | Overrides how many experts are active per token in MoE models (-1 = model default). | ||
--multiplayer | Advanced | off | Network › Shared Multiplayer | v1.79 | current | Hosts a shared Kobold Lite session that several users can join and edit together. | |||
--nocertify | Advanced | off | Network › NoCertify Mode | v1.59 | current | Disables SSL certificate verification for outgoing connections (e.g. the Horde worker). Insecure. | |||
--nofastforward | Advanced | off | Context › Use FastForwarding | v1.78 | current | Disables fast-forwarding, so every prompt is fully reprocessed; also disables context shift. | |||
--noflashattention | --no-flash-attn -nofa | Advanced | off | Quick Launch › Use FlashAttention | v1.107 | current | Turns off flash attention, which is on by default since 1.107. | F09 | |
--noavx2 | Advanced | off | Quick Launch › Backend | v1.5 | current | Uses the slower non-AVX2 library for older CPUs (with Vulkan if requested). | F15 | ||
--nobostoken | Advanced | off | Context › No BOS Token | v1.86.1 | current | Stops the BOS token being prepended to prompts. Rarely needed. | |||
--nommq | Advanced | off | Quick Launch › Use MMQ | v1.113 | current | CUDA only: disables quantized matrix-multiplication (MMQ) kernels. | |||
--nomodel | Advanced | off | Loaded Files › Allow Launch Without Models | v1.74 | current | Starts the server/UI without loading any model (e.g. to use the UI with Horde or a remote API). | |||
--noshift | --no-context-shift | Advanced | off | Quick Launch › Use ContextShift | v1.48 | current | Disables ContextShift (KV-cache shifting when the context is full). | ||
--noswa | --swa-full | Advanced | off | Context › Allow SWA | v1.114 | current | Uses a full-size KV cache instead of sliding-window attention on models that support SWA. Needed if you want context shifting on such models. | ||
--onready | Advanced | — | [shell command] | v1.44 | current | Shell command to run once the model has loaded (e.g. start a tunnel). Ignored when it comes from a config file unless --allow-config-onready is set. | |||
--allow-config-onready | Advanced | off | v1.116 | current | Lets configs loaded after launch (admin swaps) set --onready. Only for trusted configs. | ||||
--overridekv | --override-kv | Advanced | — | [name=type:value] | Context › Override KV | v1.89 | current | Overrides GGUF metadata keys, format name=type:value, comma-separated (llama.cpp --override-kv). | |
--overridenativecontext | Advanced | 0 | [trained context] | Context › Custom RoPE Config / Manual Rope Scale, RoPE Scale, Base, Override Native Context | v1.98 | current | Pretends the model was trained on this context length when computing RoPE scaling. | ||
--overridetensors | --override-tensor -ot | Advanced | — | [tensor name pattern=buffer type] | Context › Override Tensors | v1.89 | current | Places tensors matching a regex on a chosen backend buffer (llama.cpp -ot), e.g. to push experts to CPU. | |
--parallelrequests | --continuous-batching --contbatch | Advanced | 1 | [slots] | Network › Parallel Requests / Parallel Total Context | v1.113 | current | Number of generation slots that can run at once (experimental continuous batching). Default 1. | F26 |
--paralleltotalcontext | --parallel-total-context | Advanced | 0 | [tokens] | Network › Parallel Requests / Parallel Total Context | v1.124 | current | Total KV budget in tokens shared by all parallel slots; defaults to --contextsize. | |
--password | Advanced | — | [API key] | Network › Password | v1.61 | current | API key that clients must send to use text endpoints (image endpoints are not protected). Also settable via KCPP_PASSWORD. | F25 | |
--preloadstory | Advanced | — | [savefile] | Loaded Files › Preload Story | v1.49 | current | Serves a saved story JSON at /api/extra/preloadstory so Kobold Lite opens with it. | ||
--prompt | -p | Advanced | — | [prompt] | v1.73 | current | Runs a single prompt, prints the reply to stdout and exits (can be combined with --benchmark). | ||
--quantkv | Advanced | f16 | f16 | bf16 | q8_0 | q5_1 | q4_0 | 0 | 1 | 2 | 3 | Context › Quantize KV Cache | v1.67 | deprecated | KV-cache data type: f16 (default), bf16, q8_0, q5_1 or q4_0. Quantizing saves memory; without flash attention only K is quantized. Old numeric values 0-3 still accepted. | F10 | |
--queuelimit | Advanced | 10 | limit | Network › Queue Limit | v1.123 | current | Maximum number of requests allowed to wait in the queue (default 10). | ||
--quiet | Advanced | off | Quick Launch › Quiet Mode | v1.51 | current | Hides prompts and generated text from the console (auto-on for Horde workers). | |||
--ratelimit | Advanced | 0 | [seconds] | Network › IP Rate Limiter | v1.99 | current | Per-IP rate limit: each IP may start a new generation only every N seconds (0 = off). | ||
--reasoningeffort | Advanced | default | default | none | low | medium | high | xhigh | Context › Think Effort | v1.115 | current | Default reasoning effort for thinking models (none/low/medium/high/xhigh); API requests can override it. | ||
--remotetunnel | Advanced | off | Quick Launch › Remote Tunnel | v1.48 | current | Downloads cloudflared and opens a trycloudflare.com tunnel so the instance is reachable from the internet without port forwarding. | |||
--ropeconfig | Advanced | 0 10000 | [rope-freq-scale],[rope-freq-base] | v1.36 | current | Manual RoPE scaling: frequency scale then frequency base (e.g. 0.25 10000). Without it, scaling is set automatically. | |||
--savedatafile | Advanced | — | [savefile] | Loaded Files › SaveData File + "Enable Server Side SaveData File" | v1.85.1 | current | Server-side save database (.jsondb) so users can save/load stories to the server. | ||
--singleinstance | Advanced | off | Admin › SingleInstance Mode | v1.93 | current | Lets a newly started instance on the same port shut this one down, avoiding port clashes. | |||
--smartcache | Advanced | 0 | limit | v1.104 | current | Keeps KV-cache snapshots in RAM (optionally N slots) so switching between chats avoids full reprocessing. Requires fast-forwarding. | |||
--smartcontext | Advanced | off | Context › Use SmartContext | v1.7 | deprecated | Legacy context-reuse trick that reserves part of the context; superseded by ContextShift and not recommended. | |||
--splitmode | -sm --split-mode | Advanced | layer | layer | row | tensor | Hardware › SplitMode | v1.113 | deprecated | How the model is split across GPUs: layer (default) or tensor (experimental). 'row' is still accepted but, since row split was removed in v1.118, it prints a warning and is treated as tensor split (splitmode_choices_to_int @ v1.124.2). | |
--ssl | Advanced | — | [cert_pem],[key_pem] | v1.53 | current | Serves HTTPS using an unencrypted certificate and key PEM file. | |||
--swapadding | Advanced | 0 | Context › SWA Padding Tokens | v1.112 | current | Extra tokens of padding for the SWA KV cache, which controls how far you can rewind before forced reprocessing. | |||
--unpack | Advanced | — | destination | v1.70 | current | Extracts the bundled files of the single-file binary into a folder (for running from source/unpacked). | |||
--usemtp | Advanced | off | Loaded Files › Use MTP | v1.115 | current | Uses a model's built-in multi-token-prediction layers as the draft for speculative decoding, if present. | |||
--usemlock | --mlock | Advanced | off | Hardware › Use mlock | v1.18 | current | Locks the model in RAM so the OS cannot swap it out. | ||
--usemmap | Advanced | off | Quick Launch › Use MMAP | v1.3 | current | Memory-maps the model file instead of reading it fully. Off by default since 1.82. | F12 | ||
--usedirectio | --directio --direct-io -dio | Advanced | off | Hardware › Direct I/O | v1.120 | current | Loads GGUF files with direct I/O, which can speed up cold loads on some disks. | ||
--visionmaxres | Advanced | 1024 | [max px] | Loaded Files › Vision MaxRes | v1.83 | current | Maximum image resolution fed to the vision projector (512-2048, default 1024). | ||
--visionmaxtokens | --image-max-tokens | Advanced | -1 | [tokens] | Loaded Files › V.Min/Max Tok | v1.112 | current | Overrides the maximum number of embedding tokens per image (-1 = model default). | |
--visionmintokens | --image-min-tokens | Advanced | -1 | [tokens] | Loaded Files › V.Min/Max Tok | v1.112 | current | Overrides the minimum number of embedding tokens per image (-1 = model default). | |
--websearch | Advanced | off | Network › Enable WebSearch | v1.81 | current | Enables the built-in web search proxy (DuckDuckGo) used by Kobold Lite and the agent. | |||
--showgui | Advanced | off | v1.75 | current | Shows the GUI launcher even when a config was passed, pre-filled with those settings. | ||||
--skiplauncher | Advanced | off | v1.15 | current | Never shows the GUI launcher (headless start); overrides --showgui. | ||||
--nommap | --no-mmap | Advanced | off | v1.4 | deprecated | Hidden legacy flag from when mmap was the default. | |||
--hordemodelname | Horde worker | — | [name] | Horde Worker › Horde Model Name | v1.65 | current | Model name your AI Horde worker advertises. | ||
--hordeworkername | Horde worker | — | [name] | Horde Worker › Horde Worker Name | v1.65 | current | Name of your AI Horde worker. | ||
--hordekey | Horde worker | — | [apikey] | Horde Worker › API Key | v1.65 | current | Your AI Horde API key; setting it (with names) starts the embedded Horde worker. | ||
--hordemaxctx | Horde worker | 0 | [amount] | Horde Worker › Max Context | v1.65 | current | Largest context your Horde worker accepts (0 = same as --contextsize). | ||
--hordegenlen | Horde worker | 0 | [amount] | Horde Worker › Gen. Length | v1.65 | current | Most tokens your Horde worker will generate per job. | ||
--sdaudiovae | Image generation | — | [filename] | Image Gen › Audio VAE | v1.114 | current | Audio VAE used by LTX 2.3 video generation (video with sound). | ||
--sdclamped | Image generation | 0 | [maxres] | Image Gen › Clamp Resolution | v1.65 | current | Shared-server safety: caps image steps and size (optional max side length, min 512). | ||
--sdclampedsoft | Image generation | 0 | [maxres] | Image Gen › Clamp Resolution | v1.94 | current | Caps total image area (e.g. 640 allows 640x640 or 512x768) to limit memory use. | ||
--sdclip1 | --sdclipl | Image generation | — | [filename] | Image Gen › Clip-1 File / Clip-2 File | v1.78 | deprecated | First CLIP text encoder file (e.g. CLIP-L) if not baked into the image model. Formerly --sdclipl. | |
--sdclip2 | --sdclipg | Image generation | — | [filename] | Image Gen › Clip-1 File / Clip-2 File | v1.78 | deprecated | Second CLIP encoder (e.g. CLIP-G) or tokenizer file. Formerly --sdclipg. | |
--sdclipdevice | Image generation | — | [Device ID] | Image Gen › VAE dev / CLIP dev | v1.114 | current | Where image text encoders/LLM run: GPU index, main, or CPU (default CPU). | ||
--sdconvdirect | Image generation | off | off | vaeonly | full | Image Gen › Conv2D Direct | v1.98 | current | Conv2D direct mode for image generation: off (default), vaeonly or full. May save memory or crash on some backends. | ||
--sdflashattention | Image generation | off | Image Gen › SD Flash Attention | v1.98 | current | Uses flash attention in image/video generation. | |||
--sdlora | Image generation | — | [filename] | Image Gen › Runtime LoRAs toggle; Image LoRAs + Multiplier, or LoRA Dir | v1.66 | current | Image LoRA files (or a folder for runtime LoRAs) to apply. | ||
--sdloramult | Image generation | 1 | [amounts] | Image Gen › Runtime LoRAs toggle; Image LoRAs + Multiplier, or LoRA Dir | v1.66 | current | Strength multiplier(s) for the image LoRAs. | ||
--sdmaingpu | Image generation | — | [Device ID] | Image Gen › ImgGPU | v1.111 | current | GPU (index, main or CPU) that holds the image-generation weights. | ||
--sdmodel | Image generation | — | [filename] | Image Gen › Image Model | v1.65 | current | Image/video model (safetensors or GGUF) to enable image generation: SD1.5, SDXL, SD3, Flux, Qwen Image, WAN, etc. | ||
--sdoffloadcpu | Image generation | off | Image Gen › Model Offload | v1.100 | current | Keeps image weights in RAM and moves them to VRAM only when needed. | |||
--sdphotomaker | Image generation | — | [filename] | Image Gen › PhotoMaker | v1.94 | current | PhotoMaker model for face cloning with SDXL models. | ||
--sdquant | Image generation | 0 | 0 | 1 | 2 | Image Gen › Compress Weights | v1.65 | current | Quantize the image model on load to save memory: 0 off, 1 q8, 2 q4. | ||
--sdllm | Image generation | — | [filename] | Image Gen › Image LLM | v1.122 | current | Text encoder or LLM used by newer image models (T5-XXL, Qwen, etc.). Replaces --sdt5xxl. | ||
--sdthreads | Image generation | 0 | [threads] | Image Gen › ImgThreads | v1.65 | current | CPU threads for image generation (default: same as --threads). | ||
--sdtiledvae | Image generation | 512 | [maxres] | Image Gen › VAE Tiling Threshold | v1.94 | current | Image size above which VAE decoding is tiled to save memory (default 512; 0 disables). | ||
--sdupscaler | Image generation | — | [filename] | Image Gen › Upscaler | v1.107 | current | ESRGAN upscaler model for enlarging generated images. | ||
--sdvae | Image generation | — | [filename] | Image Gen › Image VAE | v1.66 | current | Custom VAE that replaces the one inside the image model. | ||
--sdvaeauto | Image generation | off | Image Gen › Automatic VAE | v1.66 | current | Uses the bundled tiny TAESD VAE: very fast, also fixes broken VAEs. | |||
--sdvaedevice | Image generation | — | [Device ID] | Image Gen › VAE dev / CLIP dev | v1.114 | current | Where the image VAE runs: GPU index, main (default) or CPU. | ||
--sdvramlimit | Image generation | 0 | [limit MB] | Image Gen › VRAM Limiter | v1.115 | current | Caps VRAM use of image generation to this many MB. | ||
--whispermodel | Whisper | — | [filename] | Audio › Audio Transcription | v1.67 | current | Whisper .bin model for speech-to-text, or a SheetSage2 GGUF for music-to-ABC transcription. | ||
--ttsmodel | TTS | — | [filename] | Audio › TTS Model | v1.82 | current | Text-to-speech GGUF model (Kokoro, OuteTTS, Qwen3-TTS, Parler, Dia, etc.). | ||
--ttswavtokenizer | TTS | — | [filename] | Audio › WavTokenizer Model | v1.82 | current | WavTokenizer/codec GGUF required by some TTS models (OuteTTS, Qwen3-TTS). | ||
--ttsgpu | TTS | off | Audio › TTS Use GPU | v1.82 | current | Runs the TTS model on the GPU. | |||
--ttsmaxlen | TTS | 4096 | Audio › TTS Threads / TTS Max Tokens | v1.83 | current | Maximum audio tokens generated per TTS request (default 4096). | |||
--ttsthreads | TTS | 0 | [threads] | Audio › TTS Threads / TTS Max Tokens | v1.82 | current | CPU threads for TTS (default: same as --threads). | ||
--ttsdir | TTS | — | [directory] | Audio › TTS Voices Dir | v1.109 | current | Folder of reference voice samples for TTS voice cloning. | ||
--musicllm | Music | — | [filename] | Audio › MusicLLM / MusicEmbeds / MusicDiffuser / MusicVAE | v1.109 | current | Music language model (ACE-Step LM or YuE2) for music generation. | ||
--musicembeddings | Music | — | [filename] | Audio › MusicLLM / MusicEmbeds / MusicDiffuser / MusicVAE | v1.109 | current | Text embedding model used by music generation (e.g. Qwen3-Embedding-0.6B). | ||
--musicdiffusion | Music | — | [filename] | Audio › MusicLLM / MusicEmbeds / MusicDiffuser / MusicVAE | v1.109 | current | Music diffusion (DiT) model, e.g. ACE-Step v1.5 turbo. | ||
--musicvae | Music | — | [filename] | Audio › MusicLLM / MusicEmbeds / MusicDiffuser / MusicVAE | v1.109 | current | Music VAE / audio decoder model. | ||
--musiclowvram | Music | off | Audio › Music Low VRAM | v1.109 | current | Unloads music models when not generating to save VRAM. | |||
--embeddingsmodel | Embeddings | — | [filename] | Loaded Files › Embeds Model + ECtx + GPU | v1.87 | current | GGUF embedding model to serve /v1/embeddings and /api/extra/embeddings. | ||
--embeddingsmaxctx | Embeddings | 4096 | [amount] | Loaded Files › Embeds Model + ECtx + GPU | v1.93.2 | current | Overrides the maximum context of the embeddings model. | ||
--embeddingsgpu | Embeddings | off | Loaded Files › Embeds Model + ECtx + GPU | v1.94 | current | Offloads the embeddings model to the GPU. | |||
--rpcmode | RPC | disabled | disabled | connect | host | Network › RPC Mode | v1.114 | current | RPC GPU sharing over the network: disabled, connect (use remote GPUs) or host (share yours). | ||
--rpcport | RPC | 5551 | [portnumber] | Network › RPC Host IP / Port / Devices / Cache | v1.114 | current | Port the RPC server listens on in host mode (default 5551). | ||
--rpchost | RPC | 0.0.0.0 | [IP address] | Network › RPC Host IP / Port / Devices / Cache | v1.114 | current | IP the RPC server binds to in host mode (default 0.0.0.0). | ||
--rpcdevice | RPC | — | <dev1,dev2,..> | Network › RPC Host IP / Port / Devices / Cache | v1.114 | current | Comma-separated devices exposed by the RPC host. | ||
--rpccache | RPC | — | <directory> | Network › RPC Host IP / Port / Devices / Cache | v1.124 | current | Host mode: folder where tensors sent by clients are cached so reloading the same model is faster. Never cleaned; trust all clients. | ||
--rpctargets | RPC | — | [remotehost1:port1,remotehost2:port2] | Network › RPC Endpoints | v1.114 | current | Connect mode: comma-separated host:port list of remote RPC servers. | ||
--admin | Administration | off | Admin › Enable Model Administration | v1.83 | current | Enables admin mode: models/configs can be unloaded and swapped at runtime from the UI or admin API. | |||
--adminpassword | Administration | — | [password] | Admin › Admin Password | v1.83 | current | Password protecting admin functions (strongly advised on public instances). Also via KCPP_ADMINPASSWORD. | ||
--admindir | Administration | — | [directory] | Admin › Config Directory | v1.83 | current | Folder of .kcpps/.kcppt/.gguf files that admin mode may switch between. | ||
--adminunloadtimeout | Administration | 0 | Admin › Auto Unload Timeout | v1.110 | current | Seconds of idleness after which the current model is unloaded automatically (0 = never). | |||
--routermode | Administration | off | Admin › Router Mode | v1.110 | current | Reverse-proxy router that swaps to the model named in each OpenAI-API request, then answers it. Requires --admin. | |||
--reqtimeout | Administration | 600 | [seconds] | Network › Request Timeout | v1.113 | current | HTTP request timeout in seconds (default 600; 0 = library default). | ||
--autoswapmode | Administration | off | Admin › Autoswap Mode | v1.111 | current | On top of router mode, automatically switches between the model types defined in one config (text, image, audio...) as requests arrive. | |||
--autoswapthreshold | Administration | 256 | Admin › Autoswap Threshold | v1.122 | current | In autoswap mode, model families up to this size (MB, default 256) stay loaded; only one larger family is resident at a time. | |||
--baseconfig | Administration | — | Admin › Base config .kcpps | v1.112 | current | Base .kcpps applied during admin model swaps when no other base is chosen. | |||
--hordeconfig | Deprecated | — | v1.28 | deprecated | Deprecated (1.65): old combined Horde settings; translated to the --horde* flags. | ||||
--sdconfig | Deprecated | — | v1.60 | deprecated | Deprecated (1.65): old combined image settings; translated to --sdmodel etc. | ||||
--nopipelineparallel | Deprecated | off | v1.107 | deprecated | Deprecated (1.122): pipeline parallelism is now decided automatically. | ||||
--pipelineparallel | Deprecated | off | v1.104 | deprecated | Deprecated (1.107): replaced by --nopipelineparallel, itself later deprecated. | ||||
--sdnotile | Deprecated | off | v1.82 | deprecated | Deprecated (1.94): use --sdtiledvae 0. | ||||
--sdt5xxl | Deprecated | — | [filename] | v1.78 | deprecated | Deprecated (1.122): converted to --sdllm. | |||
--sdvaecpu | Deprecated | off | v1.100 | deprecated | Deprecated (1.114): use --sdvaedevice CPU. | ||||
--sdclipgpu | Deprecated | off | v1.100 | deprecated | Deprecated (1.114): use --sdclipdevice. | ||||
--forceversion | Deprecated | off | v1.19 | deprecated | Deprecated (1.104): forced a legacy GGML file version; no longer used. | ||||
--sdgendefaults | Deprecated | off | v1.100 | deprecated | Deprecated (1.105): use --gendefaults. | ||||
--flashattention | --flash-attn -fa | Deprecated | off | v1.64 | deprecated | Deprecated (1.107): flash attention is on by default; use --noflashattention to disable. | F09 | ||
--useswa | Deprecated | off | v1.92 | deprecated | Deprecated (1.114): SWA is automatic; use --noswa to disable. | ||||
--multiuser | Deprecated | — | limit | v1.44 | deprecated | Deprecated (1.123): multi-user queueing is always on; use --queuelimit / --parallelrequests. | |||
--testmemory | Internal | off | v1.102 | hidden | Internal debug flag (memory test). | ||||
--run-bundled-agent | --run-agent | Internal | off | v1.122 | hidden | Internal: used by the binary to start the bundled agent process. | |||
--agent-base-url | Internal | — | v1.122 | hidden | Internal: API base URL passed to the agent process. | ||||
--agent-api-key | Internal | — | v1.122 | hidden | Internal: API key passed to the agent process. | ||||
--stream | Removed | — | v1.0.8beta | removed | Removed or replaced. Version history: v1.0.8beta..v1.59.1 (deprecated earlier, removed after 1.59). | ||||
--psutil_set_threads | Removed | — | v1.1 | removed | Removed or replaced. Version history: v1.1..v1.59.1. | ||||
--useclblast | Removed | — | v1.5 | removed | Removed or replaced. Version history: v1.5..v1.106.2 (CLBlast backend removed in v1.107). | ||||
--unbantokens | Removed | — | v1.13 | removed | Removed or replaced. Version history: v1.13..v1.59.1. | ||||
--usemirostat | Removed | — | v1.19 | removed | Removed or replaced. Version history: v1.19..v1.59.1. | ||||
--renamemodel | Removed | — | v1.27 | removed | Removed or replaced. Version history: v1.27 only (replaced by --hordeconfig). | ||||
--bantokens | Removed | — | v1.34.2 | removed | Removed or replaced. Version history: v1.34.2..v1.63 (removed in 1.64). | ||||
--linearrope | Removed | — | v1.35 | removed | Removed or replaced. Version history: v1.35 only (replaced by --ropeconfig). |
Open a row’s link to share it, or copy the table as Markdown or CSV. Searching an old name such as cublas finds --usecuda through its alias.
KoboldCpp flags: how to pass them
To build a command for your shell, or to check an old one, use the command builder.
Write the program name, then the flags. A flag with a value takes a space and then the value. A flag that is a switch is just the flag. Quote paths that contain spaces. Several values are separated by spaces, for example --tensor_split 3 1.
koboldcpp.exe --model "D:\My Models\model.gguf" --contextsize 8192.\koboldcpp.exe --model "D:\My Models\model.gguf" --contextsize 8192./koboldcpp-linux-x64 --model "/home/me/My Models/model.gguf" --contextsize 8192./koboldcpp-mac-arm64 --model "/Users/me/My Models/model.gguf" --contextsize 8192A value outside the allowed range is rejected at start. In our test, a context size of the wrong range stopped KoboldCpp with this message F22:
koboldcpp-linux-x64-nocuda: error: argument --contextsize/--ctx-size/-c: must be within [256, 524288]1- koboldcpp-linux-x64-nocuda: error: argument --contextsize/--ctx-size/-: The flag, its aliases and the allowed range.
The config builder builds a command for you.
The flags most people need
--model | The model file. Without it (or a config) the launcher opens. | F59 |
--contextsize | Default 16384; KoboldCpp adds 256; allowed range 256 to 524288. | F05 F06 F22 |
--gpulayers | Default -1 means automatic. How many to use. | F05 |
--usecuda --usevulkan --usecpu | A GPU flag without that GPU silently runs on the CPU. | F17 |
--threads | Automatic used half of four virtual CPUs; four threads were faster. | F07 |
--port | Default 5001. | F05 |
--host | Empty (the default) listens on all interfaces; 127.0.0.1 keeps it local. See the warning below. | upstream |
--password | Protects generation, not discovery. | F25 |
--launch | Opens the browser when ready. | F30 |
--config --exportconfig | Load or write a .kcpps file; it round-trips exactly. | F08 |
--quantkv | Saves memory at long context; see the warnings. | F10 |
--noflashattention | Flash attention is already on by default. | F09 |
--usemmap | Off by default; lowers the reported working set on Windows. | F12 |
--skiplauncher | Never show the launcher. | upstream |
--remotetunnel | Opens a public link. See the warning below. | upstream |
--benchmark | Fills the context and writes one CSV row. | F16 |
--parallelrequests | Two at once; no extra throughput on CPU. | F26 |
--failsafe --noavx2 | For CPUs without AVX2; they cost speed. | F15 |
Renamed, deprecated and removed flags
Old guides from 2023 and 2024 use names that have changed. Aliases work today but may be removed.
| --usecublas | --usecuda (alias kept) | 1.96 |
| --blasbatchsize | --batchsize (alias kept) | 1.101 |
| --promptlimit | --genlimit (alias kept) | 1.99 |
| --sdclipl, --sdclipg | --sdclip1, --sdclip2 | 1.100 |
| --usecuda lowvram | --lowvram (also -nkvo) | 1.100 |
| --usecuda rowsplit | --splitmode (row split removed later) | 1.113, 1.118 |
| --noblas | hidden; maps to --usecpu | 1.75 |
| --hordeconfig, --sdconfig | hidden; translated to new flags | deprecated 1.65 |
| --smartcontext | still present but discouraged | |
| --flashattention (-fa) | hidden; flash attention is on by default | 1.107 |
| --pipelineparallel | --nopipelineparallel; both hidden | 1.107, 1.122 |
| --sdnotile | --sdtiledvae 0 | 1.94 |
| --sdt5xxl | --sdllm | 1.122 |
| --sdvaecpu, --sdclipgpu | --sdvaedevice, --sdclipdevice | 1.114 |
| --sdgendefaults | --gendefaults | 1.105 |
| --useswa | automatic SWA; --noswa turns it off | 1.114 |
| --multiuser | hidden; always on | 1.123 |
| --jinjatools | alias of --jinja | 1.123 |
| --forceversion | no effect | 1.104 |
| --useclblast | removed: the CLBlast backend is gone | 1.107 |
| --bantokens | removed: bans are per request | 1.64 |
| --stream, --psutil_set_threads, --unbantokens, --usemirostat | removed | after 1.59.1 |
| --linearrope | replaced by --ropeconfig | 1.36 |
| --renamemodel | replaced by --hordeconfig | 1.28 |
| --lora base model argument | dropped | 1.93 |
| --onready from configs | ignored unless --allow-config-onready | 1.90, 1.116 |
Since 1.99 KoboldCpp also accepts llama.cpp-style aliases (-m, -c, -ngl, -ts, -b, -fa, -ot, --n-cpu-moe). Row anchors for old names such as #flag-usecublas and #flag-blasbatchsize open the current flag’s row. Why 2023 guides fail: they use removed or renamed flags.
Flags whose launcher box says the opposite
Five checkboxes in the launcher are inverted: unticking “Use ContextShift”, “Use FastForwarding”, “Use FlashAttention”, “Allow SWA” or “Use MMQ” writes --noshift, --nofastforward, --noflashattention, --noswa or --nommq.
Command line vs launcher vs .kcpps: which wins
A .kcpps loaded with --config is applied, except for options that were also given on the command line: those win, and the console says so. In our test the console printed these lines F08:
Overriding Config Value: port1Overriding Config Value: skiplauncher- Overriding Config Value: port: The command line gave --port too, so the file's value was not used.
Keys in a .kcpps are the flag names with underscores: see .kcpps files.
Environment variables
KCPP_PASSWORD and KCPP_ADMINPASSWORD set the defaults of --password and --adminpassword. The KCPP_MODEL and KCPP_ARGS variables belong to the Docker image, not to KoboldCpp itself: Docker.
Things that are not flags
A system prompt is set in Kobold Lite or in your client, not by a flag. --gendefaults sets default generation parameters for requests and --gendefaultsoverwrite forces them. The interface language and sampler presets are in Lite: Lite guide and samplers.
Utility modes
Some flags do something and exit or change the mode: Prints the KoboldCpp version and exits.Default falseSince v1.82All details, Prints metadata, tensor names and weight types of a GGUF or safetensors file, then exits.Default Since v1.82All details, Writes the current arguments to a .kcpps file (then exits) for reuse with --config.Default Since v1.85.1All details, Writes the current arguments as a shareable .kcppt template with machine-specific settings stripped.Default Since v1.85.1All details, Extracts the bundled files of the single-file binary into a folder (for running from source/unpacked).Default Since v1.70All details, Runs a benchmark instead of starting the server; optionally appends results to a CSV file.Default noneLauncher Hardware tab: Run Benchmark (button)Since v1.57All details, Runs a single prompt, prints the reply to stdout and exits (can be combined with --benchmark).Default Since v1.73All details (one reply) and Runs an interactive chat in the terminal with no HTTP server. With --agent, runs the agent in the same terminal.Default falseLauncher Hardware tab: CLI Terminal OnlySince v1.87All details (terminal chat).
How this table is kept current
On every release we dump the flags from the program’s own parser and compare them with the previous list. The “Added in” column comes from the release history, which we could verify only back to the releases that have their own page, so treat it as a best estimate. See how we test and releases.
Frequently asked questions
Where can I see all KoboldCpp command-line options?
Run KoboldCpp with --help, or use the table on this page, which lists all 183 entries of version 1.124.2 with defaults, aliases and the version each was added.
What replaced --usecublas?
--usecuda, since 1.96. The old name still works as an alias, and --usehipblas is also an alias of --usecuda.
Is the API key required?
No. A key is only needed if you start KoboldCpp with --password. In our test, with a password set, generation endpoints answered 401 without the key and 200 with it.
What is the default context size?
16384 in 1.124.2. KoboldCpp adds 256 to the value you give it, so the log shows 16640 by default.
How do I start KoboldCpp without the launcher?
Give it a model with --model or a saved config with --config. --skiplauncher makes sure the launcher never opens.
Can I use llama.cpp flags like -ngl and -c?
Yes. Since 1.99 KoboldCpp accepts llama.cpp-style aliases such as -m, -c, -ngl, -ts, -b, -fa and -ot. The table lists each flag's aliases.