Context, KV cache and prefix caching

Context length, KV cache layout, prefix cache and pool, spill tier, lane reservation.

28 options, alphabetical, diagnostics last. All themes and the A–Z index.

--dsv41-prefix-grid-snaps

Value<N>
Default4
--help-advanced sectionDsv4 / Dspark

DeepSeek-V4.1 prefix cache: besides the prompt end and the generation end of each request, keep state snapshots on the 128-token grid for this many blocks before the end of the prompt, so a follow-up that shares only part of the prompt resumes at the nearest snapshot at or before the shared part

--dsv41-prefix-near-end

Value<off|on>
Defaultoff
--help-advanced sectionDsv4 / Dspark

DeepSeek-V4.1 prefix cache under TP (CED prefill): also keep a FULL state on the 128-token grid just before the end of every prompt (leg CE2's grid state). off (default) = the cold prompt is snapshotted only where its prefill calls end anyway (encoder-only states, free) plus at its end, and the prompt-end state carries its last rows, so the same prompt again, a prompt whose last few (<= 6) tokens changed, and any follow-up resume from it; on = an edit of the last ~134-261 tokens also resumes close to the end, at the price of one more prefill call (~0.9 s) on EVERY cold prompt

--kv-mirror-budget

Value<N>
Default32768
--help-advanced sectionKv / Prefix Cache

packed-KV mirror budget (positions)

--kv-pool

Value<off|full|lazy>
Defaultoff
--help-advanced sectionKv / Prefix Cache

EXL3 server, one box: back the per-lane position planes (KV, indexer keys, pooled keys, MTP head KV) with CUDA virtual memory so every lane draws physical pages from ONE pool shared by all lanes. off = today's fixed per-lane allocation, byte-for-byte; full = every page mapped at boot (same memory as off; proves the plumbing); lazy = pages mapped on demand from a pool of --kv-pool-gb, an idle lane is evicted (its prompt kept by the prefix pool / spill tier) when the pool is full, and a running lane the pool cannot grow ends with finish=length. Kernels and copy paths are unchanged (virtual addresses never move, CUDA graphs stay valid). On a TP rank (--tp / --head / --node) and on models whose KV is not in the EXL3 position planes it falls back to the standard allocation with one notice line (velogb10_kv_vmm_fallback). Contributed by @AbsolomBane (veloGB10 #43), docs/KV_POOL.md

--kv-pool-gb

Value<N>
Defaultunset
--help-advanced sectionKv / Prefix Cache

--kv-pool lazy: size of the shared physical page pool in GB (decimal GB, as the boot fit line; a whole number). Default unset = large enough for every lane's full window (no saving); e.g. 30 holds ~1.6M positions of a Flash-Next 3.05 model shared by 8 lanes of 1M

--kv-spill day-to-day

Value<PATH>
Defaultoff
--help-advanced sectionServing

SSD spill tier: when a new conversation takes over a lane that holds another one, save the old conversation's prompt state to disk and restore it when it returns (only when the disk read beats re-reading the prompt; text and image prompts). Default off (owner decision 2026-10-23). A snapshot carries only the rows the conversation uses plus the recurrent state (about 80 MB per machine for a 4K-token conversation at TP=4). auto = on, in /tmp/gb10_kv_spill; a directory = on, there; off = no tier. Under TP every machine writes its own share and the machines agree on every save and restore

--kv-spill-gb

Value<N>
Default64
--help-advanced sectionServing

the spill store's size cap in GiB; the least recently spilled snapshot is shifted out (its file deleted) when the cap would be exceeded; 0 = the spill tier is off. Default 64 (~128 snapshots of a 38K-token prefix)

--lane-reserve

Value<N>
Default0
--help-advanced sectionServing

keep a lane reserved for its conversation this many seconds after a NORMAL finish (stop / length / a stop string / a tool call), so its prefix cache survives while conversations outnumber the lanes: a waiting request whose prompt-end snapshot sits in a free lane is admitted first, into that lane; a lane whose request finished normally less than N seconds ago is not handed to a different conversation before --lane-reserve-patience has passed, and such forced takes happen at most once per --lane-reserve-swap seconds; a lane that must change owner picks an empty lane, else the deepest WP16 checkpoint among the allowed lanes, else the least recently released lane (never slot 0 by default). Default 0 = off (unscoped admission still uses least-recently-released fallback, issue #46). Recommended for agent loads (qwen-code: several conversations of one project over one shared prefix): --lane-reserve 20. Active on single-box and TP (head-authoritative scoping, LANERES3)

--lane-reserve-patience

Value<N>
Default150
--help-advanced sectionServing

a waiting request may take a lane that is reserved for another conversation after waiting this many seconds (the queue must never be starved by an idle reservation); needs --lane-reserve > 0

--lane-reserve-swap

Value<N>
Default60
--help-advanced sectionServing

at most one forced take (a queue head older than --lane-reserve-patience taking a reserved lane) per this many seconds, so conversations swap lanes in runs of hot calls instead of every call cold; 0 = no rate limit; needs --lane-reserve > 0

--max-seq-len day-to-day

Value<N>
Defaultper mode
--help-advanced sectionServing

max context / KV depth (the DSV4 TP paths honour it as the override)

--next-turn-chunk

Value<N>
Default512
--help-advanced sectionKv / Prefix Cache

--next-turn-prefill: rows per background prefill chunk - the longest a request that arrives during a background pass waits (about 0.2-0.3 s at 512 on Flash-Next at TP=1)

--next-turn-delay-ms

Value<N>
Default150
--help-advanced sectionKv / Prefix Cache

--next-turn-prefill: a background pass starts only this long after the reply went out with the box idle all along, so an agent that sends its next request at once (a fast tool) never waits behind a pass (its request then reads the reply itself, as without the flag)

--next-turn-prefill

Value<on|off|inline>
Defaultoff
--help-advanced sectionKv / Prefix Cache

EXL3 server: after a reply has gone out, render the conversation the way the next request will send it and, while every lane is idle, prefill that rendered reply onto the lane's pre-turn state in --next-turn-chunk row chunks, so the next request only reads its new turn. A request that arrives meanwhile waits for at most the chunk in flight (the pass keeps what it read and goes on when the box is idle again); nothing runs while any lane decodes; a wrong guess costs only the idle time (the pre-turn snapshot is never touched). inline = diagnostic: the same pass runs at the next admission instead (identical bytes to on: the gate that a resumed state equals one computed in line). Turns on --turn-resume. Default off

--prefix-cache day-to-day mode flag

Value<on|off>
Defaultoff
--help-advanced sectionMode / Bench / Probe Flags

Reuse a conversation's cached prefix instead of re-prefilling it — ~3x faster follow-up turns on multi-turn/agent traffic. NOT bit-exact: reuse re-chunks the prefill and cuBLAS picks a kernel per shape, so a cached turn can word an answer differently than a cold one. Greedy MTP stays lossless.

--prefix-ckpt-mem-gb day-to-day mode flag

Value<G>
Default4
--help-advanced sectionMode / Bench / Probe Flags

EXL3: GiB cap (LRU) of the intermediate prefill checkpoints (WP16): a new question on the same document or a new chat on a shared system prompt resumes from the deepest aligned checkpoint instead of re-prefilling — bit-identical to a fresh prefill. 0 = off (--wp16-off=1 likewise).

--prefix-grid-reuse

Value<on|off>
Defaulton
--help-advanced sectionKv / Prefix Cache

prefix-cache grid reuse

--prefix-pool-floor-gb

Value<N>
Default20
--help-advanced sectionKv / Prefix Cache

the free memory (MemAvailable, GiB) the prefix pool always leaves on every machine: a copy that would go below it first shifts the older half of the pool out, and is not kept if that is still not enough. Default 20 (the lab's TP=4 headroom rule)

--prefix-pool-gb day-to-day

Value<N>
Default32
--help-advanced sectionKv / Prefix Cache

prefix pool (EXL3 server): when a new conversation takes over a lane, copy the old conversation's prompt state (the rows its prompt uses plus the recurrent state) into a pool in GPU memory shared by all lanes; a later prompt that starts with a kept prompt (the same prompt again, the next turn of that conversation, a longer prompt built on it) is restored from it with one memory copy instead of being read again. Up to N GiB per machine, cost-weighted eviction (ascending depth; shallower entrants never displace deeper ones); a copy never takes the machine below --prefix-pool-floor-gb of free memory (it shifts older entries out first, else it is not kept). Text and image prompts; prompts under 256 tokens are not kept. Default 32; 0 = off (each lane keeps only its own last prompt, as before). Needs --prefix-cache on. Under TP every machine keeps its own share and the machines agree on every copy

--prefix-tail-ckpt

Value<0|1|2>
Default1
--help-advanced sectionKv / Prefix Cache

tail (message-boundary) prefix checkpoints (tunable prefix.tail_ckpt override; owner default 1)

--rope-yarn-factor

Value<X>
Default1.0
--help-advanced sectionServing

trunk YaRN rope factor: >1 rescales the trunk rope tables to factor x native window with the vLLM per-dim ramp + mscale (EXL3 and NVFP4 trunks; the drafts keep native rope and GDN layers take no rope). Wins over the pack config's rope_scaling block; rides TpConfig so every TP rank builds identical tables

--turn-resume

Value<on|off>
Defaultoff
--help-advanced sectionKv / Prefix Cache

EXL3 server: keep a second recurrent state per lane next to the prompt-end snapshot - the lane's state with the last reply already read in the form the next request sends it back (the answer without its reasoning, its tool calls, the closing tokens; filled by --next-turn-prefill) - and resume a follow-up from whichever kept state its prompt starts with deepest. A prompt that leaves the kept state early (an edited reply, a branch, another conversation) resumes exactly as without this flag. OUTPUT-CHANGING like every prefix-cache resume (a different chunk grid). Costs one recurrent state per lane of device memory (one boot line says how much); no room = off with one line, never a refusal. Needs --prefix-cache on; TP=1 only in this build (under TP it stays off with one line). Default off

--wp16-b-ids mode flag

Value<value>
Default—
--help-advanced sectionMode / Bench / Probe Flags

The release's help lists this flag without a description.

--wp16-off

Valueswitch
Defaultoff
--help-advanced sectionKv / Prefix Cache

WP16 prefix-cache checkpoint escape

--wp16-split mode flag

Value<value>
Default—
--help-advanced sectionMode / Bench / Probe Flags

The release's help lists this flag without a description.

--wp16-probe-tail diagnostic

Value<N>
Defaultunset
--help-advanced sectionDiagnostics / Test Drills

WP16 probe tail

--wp16-xcheck diagnostic

Valueswitch
Defaultoff
--help-advanced sectionDiagnostics / Test Drills

WP16 eager cross-check

--zero-kv day-to-day diagnostic

Valueswitch
Defaultoff
--help-advanced sectionDiagnostics / Test Drills

zero the KV cache at alloc

Generated from the --help and --help-advanced output of the v0.8.1 release binary (velogb10-v0.8.1-gb10-sm121.tar.gz, sha256 109a53c41e0d79e0…, from the GitHub release). Every option it lists is here.