feat: upgrade llama.cpp from b10878 to b10883 - #427
Conversation
…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
|
Three checks are red on
Not this PR's, on two independent grounds: (1) the diff touches nothing under 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; Generated by Claude Code |
|



Summary
git diff --statto the paths this project compiles, links or includes (common/,include/,tools/server/,tools/mtmd/,ggml/include/,src/, the top-levelCMakeLists.txt) leaves one file, one line:tools/server/tests/requirements.txt, a Python test-requirement pin that is neither compiled nor linked. The rest isggml/src/ggml-vulkan/**(1804 lines inggml-vulkan.cppplus ~15 shaders),ggml/src/ggml-hexagon/**,tests/test-backend-ops.cppand 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.Patch verification
common/arg.cpp,common/arg.hcommon/peg-parser.cpptools/server/server.cpptools/server/server-context.{cpp,h}tools/server/server-models.cppsrc/llama-model.{cpp,h},tests/CMakeLists.txtChecked 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":
0001—common_params_parse_mainappears 0 times inb10883:common/arg.h, and the#ifdef _WIN32argv = utf8.ptrs.data()override is still atcommon/arg.cpp:1282. Still required.0012—b10883:src/llama-model.cpp:1489still normalises with a baresplits[i] /= split_sum;and carries nosplit_sum == 0guard. 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 flipscommon_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'sformat_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:
NativeServerforwards raw llama-server argv verbatim, so all three stay reachable; the gap is only in the typedModelParameterssurface.Test plan
Run locally on Linux x86_64, from a fresh build directory through the real
FetchContentpath:91f6a6cf361385700bbe15981f0f39909df77498(=b10883) with all nine patch hashes recordedJava_*exports (nm -Don the freshlibjllama.so)mvn -pl llama clean test -Dtest=NativeLibraryLoadSmokeTest4/4, 0 skipped, includingnativeBuildInfoMatchesPinnedVersionConstant— the end-to-end proof that the four pin sites and the linked binary agree. (cleanis required: javac inlinesLLAMA_CPP_VERSIONinto the test class and Maven's incremental compile cannot see that dependency.)mvn test— 1759 tests, 0 failures, 0 errorsFirst bump whose flag contract is machine-checked rather than argued.
JavaCliFlagContractre-derives the 138 flags the Java layer emits and re-runs them throughcommon_params_parser_init(params, LLAMA_EXAMPLE_SERVER)at the new tag, so "arg.cppis 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.cppandcmake/extract-java-cli-flags.cmakelanded 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.cpprewrite is upstream-compiled code thevulkan-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.mdper the CLAUDE.md upgrade checklist.Checklist
CONTRIBUTING.mdandCODE_OF_CONDUCT.md🤖 Generated with Claude Code
https://claude.ai/code/session_01AnNYn8W1xuVxVJtyL34GyH
Generated by Claude Code