Skip to content

feat: upgrade llama.cpp from b10878 to b10883 - #427

Merged
bernardladenthin merged 2 commits into
mainfrom
claude/llama-cpp-b10883
Sep 10, 2026
Merged

feat: upgrade llama.cpp from b10878 to b10883#427
bernardladenthin merged 2 commits into
mainfrom
claude/llama-cpp-b10883

Conversation

@bernardladenthin

Copy link
Copy Markdown
Owner

Summary

  • Bumps the pin b10878 → b10883. No project-source change, and no patch needed refreshing — every one of the ten patch-target files is byte-unchanged in the range.
  • The 100 KiB chunking rule was consciously overridden, not overlooked. The raw diff is 426 KiB (29 files, 2360 insertions, 2276 deletions), well over the runbook's threshold. Restricting git diff --stat to the paths this project compiles, links or includes (common/, include/, tools/server/, tools/mtmd/, ggml/include/, src/, the top-level CMakeLists.txt) leaves one file, one line: tools/server/tests/requirements.txt, a Python test-requirement pin that is neither compiled nor linked. The rest is ggml/src/ggml-vulkan/** (1804 lines in ggml-vulkan.cpp plus ~15 shaders), ggml/src/ggml-hexagon/**, tests/test-backend-ops.cpp and six Python version pins. Zero priority-8 headers moved. Same shape as the b10819–b10850 row: a headline number dominated by backends the project builds but never calls into.
  • Also carries a TODO.md note (separate commit) recording the three upstream flags the b10878 flag audit deliberately left unimplemented — that decision existed only in the session, so a later audit would have rediscovered them as an oversight.

Patch verification

File Patch(es) b10878 → b10883
common/arg.cpp, common/arg.h 0001, 0006 unchanged
common/peg-parser.cpp 0011 unchanged
tools/server/server.cpp 0001, 0006, 0007 unchanged
tools/server/server-context.{cpp,h} 0002, 0003, 0010 unchanged
tools/server/server-models.cpp 0008 unchanged
src/llama-model.{cpp,h}, tests/CMakeLists.txt 0012 unchanged

Checked file by file rather than inferred from the aggregate. Both standing drop-checks were still run against the pristine tag, because the fail-loud applier detects "does not apply" but never "upstream already fixed this":

  • 0001common_params_parse_main appears 0 times in b10883:common/arg.h, and the #ifdef _WIN32 argv = utf8.ptrs.data() override is still at common/arg.cpp:1282. Still required.
  • 0012b10883:src/llama-model.cpp:1489 still normalises with a bare splits[i] /= split_sum; and carries no split_sum == 0 guard. CLAUDE.md's instruction to drop rather than refresh does not fire. Still required.

The TODO note (second commit)

The b10878 audit found ten option groups upstream added since b10456 that the Java API does not expose; seven were already covered. The remaining three were left out of that correction PR on purpose — it fixed an unloadable-model bug, and adding surface would have widened it:

  • --log-jsonl / --no-log-jsonl — the only one with real consumer value, and not a free addition: it flips common_log_set_jsonl(common_log_main(), …), the process-wide llama.cpp logger, whose output reaches this library through the JNI log callback. The project already has JSON logging one layer up (args.LogFormat + log_helpers.hpp's format_log_as_json), so the two would overlap on the same stream. Which layer owns the format is a feature decision needing its own change and tests.
  • --spec-synth-len / --spec-synth-rates — marked benchmarking-only by upstream's own help text.

Nothing is broken by the omission: NativeServer forwards raw llama-server argv verbatim, so all three stay reachable; the gap is only in the typed ModelParameters surface.

Test plan

  • Affected unit / integration tests pass locally
  • CI is green on this branch
  • Docs / CHANGELOG updated where applicable

Run locally on Linux x86_64, from a fresh build directory through the real FetchContent path:

  • Configure clean; stamp written at head 91f6a6cf361385700bbe15981f0f39909df77498 (= b10883) with all nine patch hashes recorded
  • Release build clean
  • ctest 531/531
  • 40 Java_* exports (nm -D on the fresh libjllama.so)
  • mvn -pl llama clean test -Dtest=NativeLibraryLoadSmokeTest 4/4, 0 skipped, including nativeBuildInfoMatchesPinnedVersionConstant — the end-to-end proof that the four pin sites and the linked binary agree. (clean is required: javac inlines LLAMA_CPP_VERSION into the test class and Maven's incremental compile cannot see that dependency.)
  • Full mvn test1759 tests, 0 failures, 0 errors

First bump whose flag contract is machine-checked rather than argued. JavaCliFlagContract re-derives the 138 flags the Java layer emits and re-runs them through common_params_parser_init(params, LLAMA_EXAMPLE_SERVER) at the new tag, so "arg.cpp is unchanged, therefore the registered option set is unchanged" is now an assertion the build makes, not an inference a reviewer makes.

Worth watching in CI, and not caused by this bump: test_model_flags.cpp and cmake/extract-java-cli-flags.cmake landed in #426, whose own CI run was cancelled by the merge, so they have still only ever run on Linux with CMake 3.28. This PR's matrix is the first run of that CMake extractor on macOS, both Windows generators, Windows arm64, aarch64, s390x (ctest under qemu-user) and Android. A failure there would be #426's to answer for, not b10883's — but it would surface here.

Separately, the 1804-line ggml-vulkan.cpp rewrite is upstream-compiled code the vulkan-linux-* / vulkan-windows-* classifier jobs must still build; a compile break there would show up in those jobs rather than in any project source.

Related issues / PRs

Follows #426 (the CLI flag contract guard) and #425 (the b10878 bump). Appends two rows to docs/history/llama-cpp-breaking-changes.md per the CLAUDE.md upgrade checklist.

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_01AnNYn8W1xuVxVJtyL34GyH


Generated by Claude Code

…eft out

The flag audit that produced test_model_flags.cpp found ten option groups
upstream added since b10456 that the Java API does not expose; seven were
already covered. The correction PR implemented none of the remaining three on
purpose -- it was a fix for an unloadable-model bug, and adding surface would
have widened it -- but that decision was only in the session, not in the repo,
so a later audit would rediscover them as an oversight.

--log-jsonl / --no-log-jsonl is the only one with real consumer value, and it is
not a free addition: it flips common_log_set_jsonl on the process-wide llama.cpp
logger, whose output reaches this library through the JNI log callback, and the
project already has JSON logging one layer up (args.LogFormat +
log_helpers.hpp's format_log_as_json). Which layer owns the format is a feature
decision needing its own change and its own tests, not a line in a bug fix.

--spec-synth-len and --spec-synth-rates are marked benchmarking-only by
upstream's own help text.

Nothing is broken by the omission: NativeServer forwards raw llama-server argv
verbatim, so all three stay reachable. The gap is only in the typed
ModelParameters surface.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AnNYn8W1xuVxVJtyL34GyH
No project-source change, and no patch needed refreshing.

The raw diff is 426 KiB -- 29 files, 2360 insertions, 2276 deletions -- which is
well over the runbook's 100 KiB chunking threshold, so the decision to bump
straight through is recorded rather than taken quietly. Restricting the diff to
the paths this project compiles, links or includes (common/, include/,
tools/server/, tools/mtmd/, ggml/include/, src/, the top-level CMakeLists.txt)
leaves one file and one line: tools/server/tests/requirements.txt, a Python
test-requirement pin that is neither compiled nor linked. The rest is
ggml/src/ggml-vulkan/** (1804 lines in ggml-vulkan.cpp plus ~15 shaders),
ggml/src/ggml-hexagon/**, tests/test-backend-ops.cpp and six Python version
pins. Zero priority-8 headers moved. Same shape as the b10819..b10850 row: a
headline number dominated by backends the project builds but never calls into.

Every patch-target file is byte-unchanged in the range -- verified file by file,
not inferred from the aggregate: common/arg.{cpp,h}, common/peg-parser.cpp,
tools/server/server.cpp, tools/server/server-context.{cpp,h},
tools/server/server-models.cpp, src/llama-model.{cpp,h}, tests/CMakeLists.txt.

Both standing drop-checks were still 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 appears 0 times in b10883:common/arg.h and
    the #ifdef _WIN32 argv = utf8.ptrs.data() override is still at
    common/arg.cpp:1282. Still required.
  * 0012 -- b10883:src/llama-model.cpp:1489 still normalises with a bare
    splits[i] /= split_sum; and carries no split_sum == 0 guard. Still required.

Verified: fresh rm -rf build && cmake -B build -DBUILD_TESTING=ON through the
real FetchContent path, configure clean, stamp written at head 91f6a6cf (=
b10883) with all nine hashes; Release build clean; ctest 531/531; 40 Java_*
exports; mvn -pl llama clean test -Dtest=NativeLibraryLoadSmokeTest 4/4, 0
skipped, including nativeBuildInfoMatchesPinnedVersionConstant; full mvn test
1759 tests, 0 failures, 0 errors.

First bump whose flag contract is machine-checked instead of argued:
JavaCliFlagContract re-derives the 138 flags the Java layer emits and re-runs
them through common_params_parser_init(params, LLAMA_EXAMPLE_SERVER) at the new
tag, so "arg.cpp is unchanged, therefore the registered option set is unchanged"
is now something the build asserts rather than something a reviewer infers.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AnNYn8W1xuVxVJtyL34GyH
@bernardladenthin
bernardladenthin merged commit 7441f1b into main Sep 10, 2026
8 of 14 checks passed
@bernardladenthin
bernardladenthin deleted the claude/llama-cpp-b10883 branch September 10, 2026 05:51

Copy link
Copy Markdown
Owner Author

Three checks are red on 856d953. None of them is this PR's, and I am pushing nothing for them — reasoning below so the call is auditable rather than asserted.

Verify GPG signing key (no secrets printed) / … — Gradle/BouncyCastle path — red by design on every pull_request run. Both declare environment: maven-central, and GitHub withholds environment secrets from PR contexts, so GPG_PRIVATE_KEY is empty. publish.yml's own comment says so at the job definition: "It is EXPECTED to go RED on refs where the secret is not delivered … That red is the intended signal: 'this ref cannot sign a release', not a regression." They are green on push/workflow_dispatch. Nothing to fix.

claude-review — an API/auth failure of the review action itself; the model was never invoked, so there is no review finding behind it. The run ends:

{ "type": "result", "subtype": "success", "is_error": true,
  "duration_ms": 21174, "num_turns": 1,
  "total_cost_usd": 0, "modelUsage": {} }
##[error]Claude result reported subtype success with is_error:true

total_cost_usd: 0 with an empty modelUsage and a single turn means it failed before reaching the model — it never read the diff.

Not this PR's, on two independent grounds: (1) the diff touches nothing under .github/ (git diff --stat origin/main..HEAD -- .github/ is empty — this PR moves a version pin, two docs/ rows and a TODO.md note); (2) it has failed identically on unrelated PRs since ~2026-09-09T15:14Z — #425 (the b10878 bump) and #426 (the CLI flag guard), both of which were merged and whose content has nothing in common with this one.

I am deliberately not spending the one permitted re-run on it. A re-run is meant to confirm exactly this "not ours" case, but reproducing across three separate PRs with three unrelated diffs over 14+ hours is stronger evidence than one more attempt would be. No fix exists in this repo to port: the failure is on the action/API side, not in workflow configuration.

Worth flagging separately, because it is easy to miss: this means the AI review has silently not run on the last three PRs. Whatever it would have caught in #425 and #426 — both already merged — was never looked at.

The substantive matrix has not reported yet; Start gate (abort window) is still inside its wait window, so every job that needs: startgate is queued behind it. I will keep watching. What actually matters on this run is the first cross-platform execution of cmake/extract-java-cli-flags.cmake + test_model_flags.cpp (they landed in #426, whose run was cancelled by the merge, so they have only ever run on Linux/CMake 3.28) and the three Vulkan classifier jobs against upstream's 1804-line ggml-vulkan.cpp rewrite.


Generated by Claude Code

@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