Repository navigation
docs(openspec): plan #2396 set ollama-16gib KV cache to q8_0 - #2988
Merged
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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/