Skip to content

feat: upgrade llama.cpp to b10988 - #438

Merged
bernardladenthin merged 5 commits into
mainfrom
claude/serene-goodall-cq2rgc
Sep 15, 2026
Merged

bernardladenthin merged 5 commits into
mainfrom
claude/serene-goodall-cq2rgc

Conversation

@bernardladenthin

Copy link
Copy Markdown
Owner

Summary

  • Upgrades llama.cpp b10976b10988, walked in three chunks. The range is 323 KiB, over the runbook's 100 KiB threshold, so the chunking decision is recorded rather than quietly bent: the middle step (b10980 → b10981, 191 KiB) is a single upstream commit (#28638, OpenVINO) with no intermediate tag inside it, so no smaller step exists to take. 91% of the whole range (293 KiB) is ggml/src backends.
  • Zero files on the API-compatibility review surface — nothing under common/, include/, tools/server/ or tools/mtmd/ moved at all, so every row of the priority table is vacuously satisfied and the three mechanical tools/server contract greps have no input. Zero patch targets touched, so all nine patches are untouched and all three standing drop-checks report still required.
  • Fixes a defect this bump surfaced in .github/verify-patches-applied.sh (shipped to main in feat: upgrade llama.cpp to b10976, guard the JNI exception boundary, smoke the aarch64 fat jars #437): it counted the stamp's patch lines as "total lines minus one", which went stale when the applier's content oracle added a second metadata line in the next commit of that same session. The guard has been failing on every correct tree since, and would have redded C++ Tests on the next pipeline run.
The three chunks
Step Size Contents
b10976 → b10980 54 KiB, 4 commits #28599 Metal FA kernels (HSK=96/HSV=64, MiniCPM3), #28881 generic OpenCL ssm_scan, 2 upstream-CI commits
b10980 → b10981 191 KiB, 1 commit #28638 OpenVINO stateful decode + GPU MoE — irreducible; 35 of 37 files are ggml/src/ggml-openvino/**, the other two are ci/run.sh and docs/backend/OPENVINO.md
b10981 → b10988 78 KiB, 7 commits #28105 Vulkan sparse FA, #26308 CUDA row-contiguous SUM_ROWS, #28789 RPC weight-only hash caching, #27637 OpenCL MoE matmul selection, #28934 code motion, 2 CI/docs

The blast radius of the 191 KiB step is narrow: llama/CMakeLists.txt routes GGML_OPENVINO to the resources_{linux,windows}_openvino classifier trees only — not the default JAR — and both openvino-* jobs are build-only on GPU-less runners, so "must still compile" is the whole of it.

The one non-backend change is #28934, pure code motion: build_arch_graph() moves below the graph() template specializations in src/models/{dflash,eagle3,t5}.cpp. No signature moves.

One "safe to skip" header does move and was checked rather than waved past: ggml/include/ggml-rpc.h bumps RPC_PROTO_MAJOR_VERSION 6 → 7. Inert here — GGML_RPC appears nowhere in llama/CMakeLists.txt, publish.yml, build.sh or build.bat, so ggml-rpc is never built and the protocol it versions is never spoken.

Test plan

  • Affected unit / integration tests pass locally
  • CI is green on this branch — see the note below; the full matrix cannot run automatically here
  • Docs / CHANGELOG updated where applicable — two rows appended to docs/history/llama-cpp-breaking-changes.md

Verified at the target tag from a fresh configure (rm -rf build, real FetchContent path):

Check Result
Configure clean; stamp head 9f31776c3773cf03f98535c19b7e6d394af374b4 (= b10988) with nine SHA-256 lines
Wire-name extraction 138 CLI / 57 request / 15 trainer — unchanged
Release build clean, 0 errors, 0 warnings
ctest 551/551
nm -D 40 Java_* exports, 0 C++-mangled
NativeLibraryLoadSmokeTest 4/4, 0 skipped after a clean — cross-validates LLAMA_CPP_VERSION against the linked build-info
mvn test 1763 tests, 0 failures
SpotBugs / spotless / javadoc:jar 0 bugs, clean, clean

Standing drop-checks, run against the pristine tag (the fail-loud applier detects "does not apply" but never "upstream already fixed this") — all three still required:

  • 0001common_params_parse_main 0 occurrences in b10988:common/arg.h; WIN32 override still at common/arg.cpp:1282
  • 0010{"vocab_type", meta.model_vocab_type} still uncast at b10988:tools/server/server-context.cpp:4554
  • 0012 — bare splits[i] /= split_sum; still at b10988:src/llama-model.cpp:1493, no zero-sum guard

The verify-patches-applied.sh fix was falsified in both directions rather than assumed: a stamp naming a tenth patch not on disk still fails with the stale-build-dir message, a patch on disk missing from the stamp still fails by name, an injected extra metadata line now passes instead of failing, and the intact tree exits 0. It counts patch lines by their own shape now, so a future metadata line cannot repeat this.

Note

The full Publish matrix will not run on this PR automatically. It is dispatch-only in practice on this repo — 10/10 recent push-to-main runs and 9/11 pull_request runs are cancelled in the startgate abort window. Validating this branch end-to-end needs a workflow_dispatch with publish_to_central left at its default false.

Four checks will be red and none is from this diff — all four are inherited and were triaged in detail on #437: claude-review (account-side credentials, no successful run since #556 on 2026-09-09), both Verify GPG signing key jobs (environment: maven-central secrets are not delivered on a pull_request event — publish.yml documents this as an expected red), and analyze/CodeQL (KotlinVersionTooRecentError on Kotlin 2.4.20, red on main for 10+ runs).

Related issues / PRs

Follows #437. No upstream issue — nothing in this range required a report.

Checklist

  • I have read CONTRIBUTING.md and CODE_OF_CONDUCT.md
  • My commits follow Conventional Commits
  • No security-sensitive changes

🤖 Generated with Claude Code

https://claude.ai/code/session_01Cft7guQngfyKycdJfBEfJP


Generated by Claude Code

First chunk toward b10988. 4 commits, 54 KiB, and not one file on the
priority-ordered API-compatibility review list.

Two are backend kernel additions, both purely additive: #28599 adds Metal
flash-attention kernels for HSK=96/HSV=64 (MiniCPM3) — one new pair in the
`dk_dv_ok` table and one `fa_vec_baseline_ne` case — and #28881 adds a generic
OpenCL `ssm_scan`. The other two are upstream's own CI (#28885 bumps its
kleidiai runners to 24.04, #28930 bumps its Windows CUDA builds to 13.4.1;
neither is this project's pipeline, and our CUDA pin is unaffected).

Zero files under common/, include/, tools/server/ or tools/mtmd/, so every row
of the API-compatibility table is vacuously satisfied and the three mechanical
tools/server contract greps have no input. No patch-target file is in the
range, so all nine patches are untouched. tests/test-backend-ops.cpp is applied
but never compiled here (LLAMA_BUILD_TESTS=OFF for a FetchContent subproject).

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Cft7guQngfyKycdJfBEfJP
Second chunk toward b10988, and the one that does not fit the runbook's
100 KiB rule — so the reason is recorded rather than the rule quietly bent.

The step is a SINGLE upstream commit, #28638 ("OpenVINO: optimize stateful
decode and GPU MoE inference"), 190.8 KiB across 37 files. It is irreducible:
there is no intermediate b<nnnn> tag inside one commit, so no smaller step
exists to take. Chunking cannot help here, and stopping short of it would
strand the bump.

What makes that acceptable is the scope, which was checked rather than
assumed: 35 of the 37 files are ggml/src/ggml-openvino/**, and the other two
are ci/run.sh and docs/backend/OPENVINO.md — upstream's own CI script and
documentation. Nothing under common/, include/, tools/server/, tools/mtmd/ or
src/. No patch-target file is touched, so all nine patches stay untouched.

The blast radius on this project is one backend that is not in the default
JAR: llama/CMakeLists.txt routes GGML_OPENVINO to the resources_linux_openvino
/ resources_windows_openvino classifier trees only, and per CLAUDE.md both
openvino-* jobs are build-only on GPU-less runners. So the practical risk of
this 190 KiB is "the two OpenVINO classifier jobs must still compile", which
CI checks directly.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Cft7guQngfyKycdJfBEfJP
Third and final chunk, reaching the target release. 7 commits, 78 KiB, and
again not one file on the priority-ordered API-compatibility review list.

The only change outside a backend is #28934 ("models : move build_arch_graph()
after graph() template specialization"), and it is pure code motion: the
function definition moves below the template specializations it instantiates in
src/models/{dflash,eagle3,t5}.cpp. No signature moves, and all three are
internal upstream TUs. The rest is backend work — #28105 Vulkan sparse flash
attention (5 shaders + ggml-vulkan.cpp), #26308 CUDA row-contiguous SUM_ROWS,
#28789 RPC weight-only hash caching, #27637 OpenCL MoE expert matmul selection
by batch size — plus two CI/docs commits.

One header on the "safe to skip" list moves: ggml/include/ggml-rpc.h bumps
RPC_PROTO_MAJOR_VERSION 6 -> 7. That is inert here, checked rather than
assumed: GGML_RPC appears nowhere in llama/CMakeLists.txt, publish.yml,
build.sh or build.bat, so ggml-rpc is never built and the wire protocol it
versions is never spoken.

Verified at the target tag from a fresh configure: stamp head 9f31776c3 with
all nine SHA-256 lines, extraction unchanged at 138 CLI / 57 request / 15
trainer names, Release build clean (0 errors, 0 warnings), ctest 551/551,
nm -D 40 Java_* exports and 0 mangled, NativeLibraryLoadSmokeTest 4/4 with 0
skipped after a clean (the check that cross-validates the bumped
LLAMA_CPP_VERSION against the linked build-info), mvn test 1763/0, SpotBugs 0,
spotless and javadoc:jar clean.

All three standing drop-checks still report "still required", run against the
pristine tag because the fail-loud applier detects "does not apply" but never
"upstream already fixed this": 0001 (common_params_parse_main 0 occurrences in
b10988:common/arg.h, WIN32 override still at common/arg.cpp:1282), 0010
(vocab_type still emitted uncast at server-context.cpp:4554), 0012 (bare
splits[i] /= split_sum still at src/llama-model.cpp:1493, no zero-sum guard).

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Cft7guQngfyKycdJfBEfJP
verify-patches-applied.sh counted the stamp's patch lines as "total lines
minus one", the one being the "head <commit>" line. That was true when the
script was written and false four commits later: the applier's content oracle
added a second metadata line, "tree <fingerprint>", in the very next commit of
the same session, and nothing connected the two. The count has been off by one
ever since, so the guard failed with

  stamp lists 10 patch(es) but 9 are on disk — the build dir is stale

on a perfectly good tree. It is wired into the C++ Tests job, so it would have
redded that job on the next run of the pipeline; it has not surfaced yet only
because publish.yml is aborted at the start gate on every push and PR, and the
last dispatch run predates the oracle.

The fix is not "- 2". Counting metadata lines by subtraction is what went stale
in the first place, and would again the next time the stamp grows a field. The
patch lines are now counted by their own shape -- a first field ending in
.patch or .diff -- so any future metadata line is ignored rather than
miscounted.

Falsified in both directions rather than assumed: a stamp naming a tenth patch
that is not on disk still fails with the stale-build-dir message (the real case
this check exists for), a patch on disk missing from the stamp still fails by
name, an injected extra metadata line now passes instead of failing, and the
intact tree exits 0.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Cft7guQngfyKycdJfBEfJP
Two rows per the runbook's step 4: what moved in the range, and the
patch/upstream-verification row.

The first records the chunking decision explicitly, because this range breaks
the 100 KiB rule and the reason is not obvious from the number. It was walked
in three steps; the middle one is 191 KiB and irreducible, being a single
upstream commit (#28638, OpenVINO) with no intermediate tag inside it. The row
also carries the size breakdown that makes 323 KiB unalarming — 293 KiB of it
is ggml/src backends, and ggml/include contributes 0.3 KiB.

The second records that no patch target is touched anywhere in the range, the
three standing drop-checks against the pristine tag, the full verification
numbers, and the verify-patches-applied.sh defect this bump surfaced.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Cft7guQngfyKycdJfBEfJP
@bernardladenthin
bernardladenthin merged commit 1110f1d into main Sep 15, 2026
8 of 14 checks passed
@bernardladenthin
bernardladenthin deleted the claude/serene-goodall-cq2rgc branch September 15, 2026 19:46
@sonarqubecloud

Copy link
Copy Markdown

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.

2 participants