Repository navigation
Closed
Labels
priority/p1-highPriority P1: high-impact work for the next planned milestonescope/k8sKubernetes commands, Helm charts, pods, services, and policiestype/bugType bug: the code does not do what it must
Milestone
Description
Problem
Every Ollama tier reserves KV cache for OLLAMA_CONTEXT_LENGTH × OLLAMA_NUM_PARALLEL tokens. It also keeps up to OLLAMA_MAX_LOADED_MODELS models resident (k8s/llm/profiles/ollama-profiles.yaml). With NUM_PARALLEL at 4 and contexts of 48k–256k, a dense ~30B model either doesn't fit or runs mostly from CPU.
What happened in review session 20261003-051015 (gemma4:31b, 2026-10-03), from read-only Ollama logs:
- ollama-48gib-slow (2× Quadro P6000): allocated
n_ctx = 512000(4 × 128000). That put only 44 of 61 layers on the GPU, and the load then failed withfailed to create MTP context. Each request got a 500 after 3–4 minutes of load attempts, in a loop. - ollama-48gib (48gib-fast): the same load failure once its node came back.
- ollama-64gib: served gemma4 with 4 slots of 160000 tokens each, at 18–25 minutes per call (
POST /api/chat200 after 18m25s to 23m21s). That exceeds the client's 1200 s read timeout, and one call hit the gateway's 1500 s timeout. - No model call completed on the client side in 25 minutes.
The review asks for at most 28,672 tokens (ai.tasks.analysis.context_window), so most of the reserved cache serves nothing.
Acceptance criteria
- Every Ollama DaemonSet in
k8s/llm/profiles/ollama-profiles.yamlsetsOLLAMA_MAX_LOADED_MODELSto"1"andOLLAMA_NUM_PARALLELto"1". These are 16gib, 24gib, 32gib, 48gib, 48gib-slow, 64gib, 72gib, 96gib and 128gib. - An offline test reads the manifest and fails if any Ollama DaemonSet sets either to anything else, or leaves either unset.
uv run devops cipasses.- Pending a person: after applying, each tier's Ollama log shows the loaded model's
n_ctxequal to itsOLLAMA_CONTEXT_LENGTH(one sequence). gemma4:31b loads on ollama-48gib-slow withoutfailed to create MTP context.
Key questions
- Does serving one request at a time cost throughput? For mixture-of-experts models such as qwen3-coder:30b, batching four sequences gave more aggregate tokens per second. Proposed: accept it. It's the owner's call, and the VRAM goes to one model at one context. Requests to a busy tier now queue in Ollama, and queue time counts toward the client's 1200 s and the gateway's 1500 s timeouts.
- What happens on a tier that serves both an embedding model and a chat model? With one model resident, each switch evicts the other. That's ollama-48gib-slow (bge-m3, embeddinggemma and the chat groups), and 16gib when its embedding deployments return. Proposed: accept it here. Embedding placement and per-deployment concurrency belong to the gateway's health-check routing item.
- Is the context length changed? No. Each tier keeps its
OLLAMA_CONTEXT_LENGTH; only the multiplier goes away.
Metadata
Metadata
Assignees
Labels
priority/p1-highPriority P1: high-impact work for the next planned milestonescope/k8sKubernetes commands, Helm charts, pods, services, and policiestype/bugType bug: the code does not do what it must
Type
Projects
- StatusShow more project fieldsDone
Activity
fix(k8s): every ollama tier keeps one model loaded and serves one req…
dan-petty commentedon Oct 3, 2026
Closed by #1062, merged into
release/v0.2.25.GitHub only acts on closing keywords when a pull request merges into the default branch, so this was closed by
devops gh issues close-merged.feat(release): v0.2.25 (#1089)
fix(k8s): the gateway sends embeddings to every serving ollama tier, …
feat(ai): the LLM stack dashboard shows latency per output token, and…