Repository navigation
Description
What happened
Tier ollama-48gib (node condor, 2 RTX 3090, 48 GiB) serves its models at OLLAMA_CONTEXT_LENGTH=128000. The models on it (qwen3-coder:30b, qwen3.8:27b, gemma4:31b) have a native context of 262144. The owner wants a longer context where the hardware allows it.
Measured on 2026-10-31 on condor, with a temporary model made from qwen3-coder:30b with num_ctx 262144 (removed after the test):
- At 128000 (the current setting),
ollama psshows 30 GB, and the two GPUs hold 15.3 and 14.5 GiB. - At 262144,
ollama psshows 37 GB, 100% GPU. The two GPUs hold 18.9 and 17.9 GiB of 24 GiB each. About 6 GiB per GPU stays free. - A prompt of 142214 tokens was read in 84 s (1690 tokens/s). The model followed the instruction at the end of the prompt and answered. GPU memory did not grow during the prompt.
- The peak GPU memory of the node over 7 days was 32.8 of 48 GiB. The host has 64 GB of memory with 29% in use.
Other tiers (same measurement or arithmetic from the model metadata):
- hawk (
ollama-16gib, RTX 5070 Ti, 16 GiB):gpt-oss:20bwithnum_ctx 131072andq4_0KV loads in 13 GB, with 2.6 GiB free on the GPU. The tier runs 48000 now. - gemini (
ollama-64gib, 2 V100): the 70B models fill the GPUs at 160000, and that is already above their native 131072. The tier stays. - hog (
ollama-48gib-slow): fits, but Pascal prefill is slow. The tier stays.
What should happen
OLLAMA_CONTEXT_LENGTHofollama-48gibgoes from 128000 to 262144.OLLAMA_CONTEXT_LENGTHofollama-16gibgoes from 48000 to 131072.gpt-oss:20bis the only chat model of this tier that the gateway routes to (devops-reviewfallback andgpt-oss:20b).- The gateway
max_input_tokensof the routes to these tiers follow the profiles, rendered with the existing gateway render. Documents that state the numbers are updated.
Evidence
ollama psandnvidia-smiin podsollama-48gib-dpl5nandollama-16gib-rctvson 2026-10-31.- Prometheus
max_over_time(DCGM_FI_DEV_FB_USED[7d])per GPU. ollama show -vfor the layer counts and KV heads of each model.
Acceptance criteria
- The two pods run with the new values after the sync, and
ollama psshows the new context for a loaded model. -
max_input_tokensof the gateway routes matches the tiers (the render test passes). - A prompt of more than 140000 tokens through the gateway route
devops-codergets an answer. -
uv run devops cipasses.
Proposed design
Problem statement
The condor and hawk Ollama tiers serve models at context lengths below what their GPUs hold. The ollama-48gib tier runs at 128000 tokens while its models support 262144. The ollama-16gib tier runs at 48000 while its model supports 131072. This change raises both values to the maximum the hardware holds and updates the gateway and documentation to match.
Acceptance criteria
Requirement: Condor tier context length
The ollama-48gib profile SHALL set OLLAMA_CONTEXT_LENGTH to 262144.
Scenario: Profile value check
- WHEN The ollama-48gib DaemonSet manifest is read
- THEN OLLAMA_CONTEXT_LENGTH equals 262144
Requirement: Hawk tier context length
The ollama-16gib profile SHALL set OLLAMA_CONTEXT_LENGTH to 131072.
Scenario: Profile value check
- WHEN The ollama-16gib DaemonSet manifest is read
- THEN OLLAMA_CONTEXT_LENGTH equals 131072
Requirement: Gateway max_input_tokens alignment
The gateway max_input_tokens for routes to ollama-48gib and ollama-16gib SHALL match the tier context lengths.
Scenario: Render test
- WHEN devops ai gateway render is run against the updated profiles
- THEN The rendered config shows max_input_tokens of 262144 for the 48gib route and 131072 for the 16gib route
Requirement: Long prompt through gateway
A prompt of more than 140000 tokens through the devops-coder gateway route SHALL receive a model answer.
Scenario: Long prompt acceptance
- WHEN A prompt of 142214 tokens is sent to the devops-coder route
- THEN The gateway returns a non-empty model response
Requirement: CI passes
uv run devops ci SHALL pass after the change.
Scenario: CI gate
- WHEN uv run devops ci is run on the branch
- THEN All checks complete with a passing status
Existing Tool Considered
No check has run. This change edits the project's own Kubernetes DaemonSet manifests and gateway config. The existing devops ai gateway render command renders the gateway config from the profiles and aligns max_input_tokens with tier context lengths. No external tool or library is needed. The written cost is the tokens to edit two values in k8s/llm/profiles/ollama-profiles.yaml, re-render the gateway config, and update the documentation lines that state the old numbers.
Key questions
- Which files hold the context length values that must change?: k8s/llm/profiles/ollama-profiles.yaml holds OLLAMA_CONTEXT_LENGTH for each tier. k8s/llm/gateway/config.yaml holds max_input_tokens for the gateway routes. k8s/README.md documents the gateway setup and states the numbers. [sources: k8s/llm/profiles/ollama-profiles.yaml:112, k8s/llm/profiles/ollama-profiles.yaml:257, k8s/llm/profiles/ollama-profiles.yaml:397, k8s/llm/gateway/config.yaml:10, k8s/README.md:120]
- How is the gateway config rendered from the profiles?: The command
devops ai gateway renderrenders and applies LLM gateway configuration derived from Ollama profiles and service aliases. It aligns max_input_tokens with tier context lengths. The rendered output is a unified diff. [sources: CHANGELOG.md:1222] - Should the ollama-48gib-slow tier (hog) also be raised?: No. The body records that Pascal prefill is slow on that tier, so it stays at its current value. (proposed)
- Rejected: Raise ollama-48gib-slow to 262144. Rejected. Pascal prefill is slow, so the longer context would make calls exceed the client timeout.
- Chosen: Keep ollama-48gib-slow at its current value. Chosen. The body records that the tier stays because Pascal prefill is slow.
- Should the ollama-64gib tier (gemini) be changed?: No. The 70B models fill the GPUs at 160000, which is already above their native 131072. The tier stays. (proposed)
- Rejected: Raise ollama-64gib. Rejected. The 70B models already fill the GPUs at 160000, above their native 131072.
- Chosen: Keep ollama-64gib at its current value. Chosen. The body records that the tier stays.
- Does this change fit one pull request?: Yes. The change edits two values in one YAML file, re-renders the gateway config, and updates documentation lines. All of this is a small, cohesive configuration change. (best practice) [sources: k8s/llm/profiles/ollama-profiles.yaml, k8s/llm/gateway/config.yaml, k8s/README.md]
- Chosen: One PR for both tiers and the gateway render. Chosen. Two value edits, one render, and doc updates form a single cohesive change.
- Rejected: Split into one PR per tier. Rejected. The change is small and the gateway render depends on both values being set.
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Activity
dan-petty commentedon Oct 31, 2026
Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.
featprefix of the title gives the type.(k8s)scope of the title gives the scope.It raises usable context but does not block work or fix a defect.Users on condor and hawk gain 2x to 5x more context tokens per request.The change is a config value update on two tiers plus a gateway render and doc edits; measurements are already done.Both touch gateway max_input_tokens and per-tier Ollama entries, but #478 builds the render mechanism while this candidate changes the actual context values.chore(main): release 0.24.0 (#2819)
dan-petty commentedon Oct 31, 2026
Check after the sync (2026-10-31):
ollama-48gib262144 andollama-16gib131072 (OLLAMA_CONTEXT_LENGTHin the pod spec).ollama-48gib-slowstays at 128000 andollama-64gibat 160000.devops ai gateway tune --model devops-coder --prompt-tokens 150000 --concurrency 1 --rounds 1 --max-tokens 8sent one prompt of 150000 tokens toqwen3-coder:30bonollama-48gib-fast: 0 errors, 116 s wall time for the whole request (it includes the model load after the restart), and the four capability probes passed, 4/4 (deep_recalltoo). Run20261031T053956Z-c22070.The last acceptance criterion of this issue is met.