Also: context · 4K · 32K · 128K · 256K · 262K · -c
How many tokens of prompt plus conversation the model can keep in the KV cache. House daily driver on one R9700 is 262144 (262K). Tables on this site also show 4K, 32K, 128K, and 256K because speed and RAM change with length.
On a home Radeon box.
Longer context grows KV and usually slows decode. Official UD-Q5_K_XL on the local desktop: 102.39 tok/s at 4K and 44.4 tok/s at 256K — same file, one GPU, f16 KV. Size the window on the calculator before you set -c.
Go deeper
House -c 262144 is the 262K daily-driver window. Tables also publish 4K, 32K, 128K, and 256K because KV and decode move. Official UD-Q5_K_XL 1-GPU: 102.39 / 90.52 / 66.43 / 44.4 tok/s at those four lengths.
See also:
Context ceiling
·
KV cache
·
Prefill vs decode
·
Quant
Also: max context · ctx-ceiling · biggest context · ab-ctx-ceiling
The largest llama.cpp -c that still loads and serves on a given box. Native max is the model-card window. The ceiling is what VRAM and RAM actually hold.
On a home Radeon box.
Shoppers search max context Radeon and 262K VRAM. Stack Lab ctx-ceiling/1 (amdai-bench ab-ctx-ceiling) climbs a lean ladder on one GPU and on all GPUs. AMDai has not ingested a winner on the local desktop — not yet measured.
Go deeper
House overnight llama-bench ran 262144 on UD-Q5, one R9700, f16 KV. That is not a ctx-ceiling winner. Minimum system RAM needed is the lean step rounded to a kit. RAM needed at full context is the winner peak first. The shopper page is /context-ceiling.
See also:
Context length
·
KV cache
·
VRAM vs system RAM
Also: grammar sampling · JSON schema decode · structured JSON
llama.cpp grammar sampling so every next token still matches a GBNF grammar or a JSON Schema converted to GBNF. Used for tool args, calculator output, and recipe export.
On a home Radeon box.
Hermes and coding tools need JSON that parses. Official flags are --grammar / --json-schema and response_format. Grammar decode versus free-form is not measured on the local desktop — run Stack Lab grammar-ab/1. The schema is not injected into the prompt except during tool calling.
Go deeper
llama.cpp server README (checked 2026-10-14): --grammar, --grammar-file, -j / --json-schema, -jf / --json-schema-file, plus grammar / json_schema body fields. grammars/README.md: JSON Schemas → GBNF; performance gotchas on issue #4218. Shopper how-to: /constrained-decoding.
See also:
GBNF
·
llama.cpp
·
Official instruct
Also: Docker · Podman · container image
An isolated process that runs an official llama.cpp image instead of a host build. On AMDai that is ggml-org’s GHCR server-vulkan first, server-rocm second. The host still owns /dev/dri and, for HIP, /dev/kfd.
On a home Radeon box.
People search “rocm docker llama.cpp.” The cited path is /setup/docker. It is not a measured local desktop card. We do not invent a container tok/s or a speed delta versus bare metal. Bind the published port to 127.0.0.1.
Go deeper
docker.md names ghcr.io/ggml-org/llama.cpp:server-vulkan and :server-rocm and says GPU images are not currently tested by CI beyond being built. AMD’s ROCm 10.1 container page documents --device /dev/kfd --device /dev/dri and optional seccomp=unconfined. Rootless Podman needs --group-add keep-groups; Fedora SELinux needs container_use_devices plus :z / :Z on the model volume.
See also:
llama.cpp
·
Device passthrough
·
NVMe staging
Also: Comfy · image gen UI
A node-graph UI for local diffusion checkpoints on HIP/ROCm PyTorch. On AMDai it is the first image-gen path. It does not speak llama-server /v1.
On a home Radeon box.
People search “ComfyUI ROCm Radeon.” First-run install is /setup/comfyui. Fit tables stay on /image-gen. Speeds are not yet measured by AMDai. llama.cpp stays first for LLMs. Q3 stays a labeled estimate on any LLM that shares the box.
Go deeper
AMD documents git clone, pip install -r ComfyUI/requirements.txt, then python ComfyUI/main.py → http://127.0.0.1:8188. Checkpoints go in models/checkpoints. The official Windows AMD portable is ComfyUI_windows_portable_amd.7z; the Nvidia zip is not a Radeon path. Instinct Docker tags are not R9700 pins.
See also:
HIP
·
ROCm
·
NVMe staging
Also: --jinja · --chat-template · --chat-template-file · chat_template_tool_use
The Jinja string llama-server uses to wrap messages, tools, and reasoning. It usually ships in the GGUF metadata. --jinja turns the engine on; --chat-template and --chat-template-file override the file.
On a home Radeon box.
OpenAI-style tool calls need a tools-aware template. Inspect GET /props for chat_template and chat_template_tool_use. A mismatch is the usual “tools ignored” or “markup in content” cause. House pin still passes --jinja.
Go deeper
llama.cpp function-calling.md: native handlers exist for several families (Llama 3.1 / 3.3, GPT-OSS Harmony, Hermes 2/3, …). Unrecognized templates log Chat format: Generic. --chat-template chatml is the documented YMMV fallback. --skip-chat-parsing dumps markup into content.
See also:
Jinja
·
Special tokens
·
Tool calling
·
Official instruct
·
llama.cpp
·
GBNF
Also: --cache-reuse · n_cache_reuse · KV-shift reuse · LLAMA_ARG_CACHE_REUSE
Official llama-server min chunk size for reuse via KV shifting. --cache-reuse N (default 0 = disabled; env LLAMA_ARG_CACHE_REUSE). Requires prompt caching to be on. n_cache_reuse on the API matches that flag.
On a home Radeon box.
Default 0 means KV-shift reuse is off even when --cache-prompt is on. House recipes do not record a --cache-reuse pin. Do not invent 256. Measure prompt-cache-ab/1 before you keep a new value.
Go deeper
llama.cpp server README is the cite. --cache-ram (default 8192 MiB; PR #16391) is the system-RAM ceiling for cached prefixes, not VRAM. Extra cache RAM on top of the measured 37.32 / 42.9 GB peaks is a labeled estimate.
See also:
Prompt cache
·
Prefix cache
·
KV cache
·
TTFT
Also: Aider · Cline · Continue · local coding agent
An editor or CLI agent that talks to a local OpenAI-compatible /v1. On AMDai that server is llama.cpp llama-server on 127.0.0.1:8080. Aider, Cline, and Continue are the cited first three.
On a home Radeon box.
People search “aider llama.cpp radeon” and “cline local model.” The cited walk is /setup/coding-assistant. Decode numbers on this site are Ubuntu llama.cpp llama-bench, not Aider tok/s. Vulkan llama-server first; LM Studio :1234 is secondary.
Go deeper
Aider prefixes the model with openai/ and requires a non-empty API key. Cline uses the OpenAI Compatible provider — do not append /chat/completions. Continue openai provider wants apiBase including /v1. House file is still Qwen3.6-35B-A3B UD-Q5_K_XL. Hermes is the house agent on the local desktop against the same :8080.
See also:
llama.cpp
·
LM Studio
·
Context length