Skip to content

chore(deps): update ollama to 0.40.12 - #2397

Merged
dan-petty merged 4 commits into
mainfrom
chore/2395-ollama-0-40-12
Oct 28, 2026
Merged

dan-petty merged 4 commits into
mainfrom
chore/2395-ollama-0-40-12

Conversation

@dan-petty

Copy link
Copy Markdown
Owner

Every Ollama tier and its own-model-directory init container run ollama/ollama:0.40.12 in place of 0.34.4. Ollama 0.40.4 is the first release that runs a multimodal embedding model, such as embeddinggemma-2, through llama-server, the runner on Linux. 0.34.4 cannot run that model.

  • k8s/llm/profiles/ollama-profiles.yaml: the 18 image pins move to 0.40.12.
  • The new capability ollama-release-pin and the invariant test test_every_ollama_tier_runs_one_release_that_serves_multimodal_embedding_models require one image for every tier and init container, from ollama/ollama, at 0.40.4 or later. Every tier keeps its models in the node's /var/lib/ollama, so one release reads each store.
  • The Ollama knowledge base applies to 0.40. Its keep-alive rule cites the 0.40.12 scheduler, which has the same rule as 0.34.4.

0.40.12 reads the existing models where they are and copies none. It writes the manifest of a model pulled later to manifests-v2, which 0.34.4 does not read. With the same KV cache type, its qwen3-embedding:0.6b vectors match those of 0.34.4 (cosine 0.9995 or more), so the Qdrant collections stay valid. The proposal in openspec/changes/archive/2026-10-28-2395-ollama-0-40-12/ records the checks.

Closes #2395

…bedding models

Plan the change 2395-ollama-0-40-12. The new invariant test fails on
ollama/ollama:0.34.4, which is below 0.40.4, the first release that runs
a multimodal embedding model through llama-server on Linux.

Refs #2395
Set the image of each ollama container and each own-model-directory
init container to 0.40.12, which runs multimodal embedding models such
as embeddinggemma-2 through llama-server on Linux.

Refs #2395
The keep-alive rule in useLoadedRunner and load is the same in the
0.40.12 scheduler, so the source line names that release.

Refs #2395
@dan-petty

Copy link
Copy Markdown
Owner Author

How it was verified

Local, on this branch:

  • uv run devops ci test tests/invariants/test_k8s_manifests.py failed on the first commit (assert Version('0.34.4') >= Version('0.40.4')) and passes after the bump.
  • uv run devops ci test tests/invariants/test_k8s_manifests.py tests/test_k8s.py tests/test_k8s_gpu_matrix.py: 107 passed.
  • uv run devops ci test tests/test_kb.py tests/test_kb_manuals_metadata.py: 19 passed.
  • uv run devops k8s lint k8s/llm/profiles gives the same findings as on main.
  • uv run devops docs generate --sync-readme changes no file, and uv run devops docs check passes.

On the cluster, on 2026-10-28, with temporary pods of ollama/ollama:0.40.12. The pods used the security context of the tiers, and they mounted the node's model directory read-only with OLLAMA_NOPRUNE=1, or kept models in an emptyDir only. All of them are deleted.

Check Quadro P6000 (compute 6.1) Tesla PG500-216 (compute 7.0)
GPU found yes, through cuda_v12 (cuda_v13 skips 6.1) yes, through cuda_v12
/api/tags equal to the live 0.34.4 tier yes (18 models) yes (9 models)
qwen3-embedding:0.6b, cosine against live 0.34.4, q8_0 KV cache 0.99962 to 0.99972 0.99949 to 0.99968
embeddinggemma-2:270m, GPU against CPU 0.99989 to 0.99994, no NaN 0.99986 to 0.99994, no NaN
Chat generation (smollm:135m) yes not run
  • embeddinggemma-2:740m and :270m give the same text vectors (cosine 1.0). The 740m tag loads only the 271M text part for text input (487 MB of VRAM).
  • /api/show of embeddinggemma-2 reports embedding_length 512, but its vectors have 768 dimensions. devops-cli embeds a probe text first and reads /api/show only when that probe fails. A change that moves RAG to that model must keep this in mind.
  • A first run used OLLAMA_KV_CACHE_TYPE=q4_0 by mistake, and the cosine against the live q8_0 tier was only 0.76 to 0.93. The live 0.34.4 tiers show the same difference between ollama-16gib (q4_0) and the q8_0 tiers, so it does not come from this upgrade. fix(k8s): the q4_0 ollama-16gib tier makes different embedding vectors, so a fallback rag batch puts drifted vectors in the index #2396 holds that defect.

Rollout after the merge: each tier stops its pod before the new pod starts, so each tier is down while its node pulls the image. Argo CD syncs all nine DaemonSets together.

@dan-petty
dan-petty marked this pull request as ready for review October 28, 2026 04:33
@dan-petty
dan-petty merged commit bb46660 into main Oct 28, 2026
16 checks passed
@dan-petty
dan-petty deleted the chore/2395-ollama-0-40-12 branch October 28, 2026 04:33
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.

chore(deps): update ollama to 0.40.12

1 participant