Skip to content

docs(openspec): plan #2396 set ollama-16gib KV cache to q8_0 - #2988

Merged
dan-petty merged 1 commit into
mainfrom
fix/2396-the-q4-0-ollama-16gib-tier
Nov 1, 2026
Merged

dan-petty merged 1 commit into
mainfrom
fix/2396-the-q4-0-ollama-16gib-tier

Conversation

@devops-cli-service

Copy link
Copy Markdown
Contributor

Plans #2396

The ollama-16gib tier sets OLLAMA_KV_CACHE_TYPE to q4_0 while the other eight tiers set q8_0. Ollama passes this value to llama-server for every model, including the embedding model. The 4-bit KV cache changes the vectors of qwen3-embedding:0.6b, so a vector from the 16gib tier has a cosine of 0.78 to 0.92 against a vector from a q8_0 tier. When the gateway routes a RAG embedding batch to the 16gib tier as an order-2 fallback, the drifted vectors enter the shared Qdrant collection and degrade retrieval. This change sets OLLAMA_KV_CACHE_TYPE to q8_0 on the 16gib tier, aligning it with all other tiers.

Change: openspec/changes/2396-the-q4-0-ollama-16gib-tier/

@devops-cli-service
devops-cli-service Bot marked this pull request as ready for review November 1, 2026 07:21
@dan-petty
dan-petty merged commit 4e5ccd0 into main Nov 1, 2026
18 checks passed
@dan-petty
dan-petty deleted the fix/2396-the-q4-0-ollama-16gib-tier branch November 1, 2026 10:21
dan-petty added a commit that referenced this pull request Nov 1, 2026
This pull request corrects the plan for #2396 (the `q4_0` KV cache type
of the Ollama 16 GiB tier). The evaluation of the staged plan (pull
request #2988) found defects. This change fixes the plan in place. It
changes no code and no test.

The corrected plan:
- Checks the premise against `main`. The manifest sets `q4_0` on this
tier and `q8_0` on the other eight tiers.
- Checks that `q8_0` fits `gpt-oss:20b` at the 131072 context. The bound
is for the chat model alone: 13660 MiB peak plus up to 1536 MiB, which
is 15196 MiB of 16303 MiB.
- Notes that the embedder is not counted. Ollama unloads the idle model
when both do not fit.
- Uses a command check in place of a new test.

Plans #2396
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant