feat: upgrade llama.cpp from b10909 to b10938 - #435
Conversation
First chunk of a six-chunk bump toward b10938. `git diff b10909 b10938`
is 1003 KiB, ten times the runbook's 100 KiB per-step threshold.
10 commits, 93 KiB. The notable item is #28555 ("server: refactor
subproc handling"), which rewrites most of `tools/server/server-models.cpp`
-- the target of `patches/0008`. The patch still applies; this was
verified against a pristine b10938 worktree rather than assumed.
#28091 adds PCH and unity build to upstream's own CMake targets. It does
not reach this project: the upstream server sources are added to our own
`jllama` target, not linked from upstream's, and `llama-common` is
consumed as a library where PCH is an internal detail.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AnNYn8W1xuVxVJtyL34GyH
Second chunk. One commit (#28589, hexagon multi-device model split): 45 files, 541 KiB -- over the threshold, but a single commit cannot be subdivided. The size is irrelevant to this project: the change is entirely under `ggml/src/ggml-hexagon/` and `scripts/snapdragon/`, so it touches no patch target, no priority-list row, and no translation unit this project compiles. The Hexagon backend is not built by any job in publish.yml. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AnNYn8W1xuVxVJtyL34GyH
Third chunk. 7 commits, 94 KiB. Two items reach this project. #28787 updates the vendored cpp-httplib to 0.56.0; `vendor/cpp-httplib/httplib.cpp` is compiled directly into `libjllama`, so this is our translation unit, not upstream's. Exposure is limited to compiling and linking -- only upstream's `server-http.cpp` includes it, and no SSL is configured. #28747 touches `tools/server/server-models.cpp` again (`patches/0008`). The rest is OpenCL, WebGPU, SYCL and RPC backend work. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AnNYn8W1xuVxVJtyL34GyH
Fourth chunk. 6 commits, 41 KiB -- the smallest in this bump. Nothing on the priority-ordered API-compatibility list. The server-side edits (#28530, #28795) land in upstream translation units this project compiles, so the build covers them; #28817 changes Jinja template evaluation inside `llama-common` without moving any signature this project calls. `tools/server/server-models.cpp` is touched a third time in this range (`patches/0008`); the patch applies at pristine b10938. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AnNYn8W1xuVxVJtyL34GyH
Fifth chunk, and the only one in this bump with real exposure: one commit (#28736) touching three patch targets and two priority rows. It replaces raw `common_json` schema handling with a typed `common_chat_schema` tree. Why it lands clean: - `common/chat.h` is purely additive -- one new declaration, `common_chat_tool_parameters`. No existing signature moved. - `common/peg-parser.cpp` is `patches/0011`'s file, but every edit is in the schema machinery (`dump_impl`, `builder::schema`, `build_grammar`'s `schema_delegates`). `0011` modifies the until parser's UTF-8 INVALID branch, a disjoint region that survives intact. - `common/json-schema-to-grammar.h` is on the safe-to-skip list. - The wire surface did not move, checked mechanically: request fields 68 -> 68 identical, response keys 142 -> 142 identical, and the two historically-moved hard limits unchanged. New `common/json-schema.*` and `common/parsers/**` sources join `common/CMakeLists.txt`; this project never enumerates `common/` sources, so they are picked up with no project-side change. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AnNYn8W1xuVxVJtyL34GyH
Sixth and final chunk, reaching the latest upstream release b10938. 4 commits, 18 KiB. Additive only on the one row that matters: #28586 adds a `LOG_JSON` macro to `common/log.h`, which is on the safe-to-skip list and which this project does not consume -- it has its own `log_helpers.hpp` with an independent nlohmann::json alias. `common/arg.cpp` (`patches/0001`) is touched for the third time in this range without moving the patched region. All ten patches apply at pristine b10938 and all four standing drop-checks report "still required". Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AnNYn8W1xuVxVJtyL34GyH
Standing non-PR check failuresThe four reds on this head — Re-verified on this head rather than assumed: both GPG jobs failed in 2 seconds with no steps executed (the signature of GitHub refusing a job whose None is caused by this diff, which changes five files: a CMake tag, a Java constant, and three docs. Not re-running them — all are deterministic by construction, so a re-run would spend CI minutes and change nothing. No fix ported, for the reasons given in the #434 comment: each one's fix lives outside a llama.cpp version bump and would widen this PR. The checks that do gate this change — Generated by Claude Code |
|



Summary
b10909tob10938(the latest upstream release) across all four pin sites, and appends six row pairs to the breaking-changes history — one per chunk.server-models.cpprewrite (#28555), PCH + unity build (#28091)common_schemainternal representation (#28736)LOG_JSONmacro, qwen3-coder parser fixChunk 5 is the whole risk, and it lands clean
#28736 replaces raw
common_jsonschema handling with a typedcommon_chat_schematree. In one commit it touches three patch targets and two priority-list rows:common/chat.h,common/peg-parser.{cpp,h},common/json-schema-to-grammar.*,common/arg.cpp,tests/CMakeLists.txt,tools/server/server-schema.cpp, plus a newcommon/json-schema.{h,cpp}and a restructuredcommon/parsers/**(16 model parsers).Why it is safe here — each point established, not inferred:
common/chat.h(priority row 2) is purely additive. One new declaration,common_chat_tool_parameters(const common_json &). No existing signature moved.common/peg-parser.cppispatches/0011's file, but the edits are disjoint from the patch. Every change is in the schema machinery —dump_impl'sSchema(...)rendering,common_peg_parser_builder::schema, andbuild_grammar'sschema_delegateslambda (which collapses ~25 lines of raw-JSON type sniffing intos.raw && s.node->may_be_string()).0011modifies the until-parser's UTF-8INVALIDbranch, which survives intact — the pairedis_lenient()/INVALIDstructure is still at lines 482/487 and 521/527 of the pristine b10938 file.common/json-schema-to-grammar.his on the documented safe-to-skip list (not used directly by project code).server-schema.cpp's field set is 68 → 68 identical,server-task.cpp's response keys 142 → 142 identical, andrepeat_last_n/dry_penalty_last_nkeepset_hard_limits(0, INT32_MAX). That is the silent-contract-change class that costgetMetrics()hundreds of builds; it does not apply here.common/json-schema.*andcommon/parsers/**sources joincommon/CMakeLists.txt, i.e. thellama-commonlibrary this project links. This project'sCMakeLists.txtnever enumeratescommon/sources, so they are picked up with no project-side change.Patches: all ten apply, tested against the target before anything was edited
Two patch targets churn hard in this range —
tools/server/server-models.cpp(+277/−200,patches/0008, touched in three separate chunks) andcommon/peg-parser.cpp(patches/0011). So the patch set was applied in filename order to a pristine b10938 worktree first, before a single pin site was edited: all ten applied cleanly.All four standing drop-checks were run against the pristine tag, because the fail-loud applier detects "does not apply" but never "upstream already fixed this":
0001common_params_parse_mainincommon/arg.hcommon/arg.cpp:1282— unmoved despite three edits to that file in this range → still required0010{"vocab_type", meta.model_vocab_type}server-context.cpp:4554→ still required0012split_sumzero guardsplits[i] /= split_sum;atsrc/llama-model.cpp:1491→ still required00130013remains filed-but-unmerged upstream as ggml-org/llama.cpp#28775. When it merges, the first tag carrying it aborts the configure and the response is to delete the patch, not refresh it.Two other items worth a reviewer's eye
vendor/cpp-httplib/httplib.cppis compiled directly intolibjllama— it is our translation unit, not upstream's, and it is the 16.6k-line file the CI-cache notes single out as a build-time cost. Exposure is confined to compiling and linking: only upstream'sserver-http.cppincludes it, this project's own C++ never does, and no SSL is configured (CPPHTTPLIB_OPENSSL_SUPPORTleft undefined), so the 0.56.0 TLS surface is not reached.CLAUDE.mdwarns a header diff cannot catch. It does not reach this project: the upstream server.cppfiles are added to our ownjllamatarget rather than linked from upstream's, so theirtarget_precompile_headersnever applies;llama-commonis consumed as a library, where PCH is an internal detail.Test plan
Verified on Linux x86_64 from a fresh configure (build directory removed first, so the applier took its clean-tree path and wrote a new stamp):
f1e44dcc11d8802d107bd7331a3d3fd3e6f57b93(=b10938) with all ten SHA-256 lines; no "does not apply cleanly" abort.cmake --build --config Release, zero errors, including cpp-httplib 0.56.0 and thecommon_schemarestructure. This is the step that actually tests this range: the patches applying was necessary but not sufficient, since a new upstream schema type could have broken a signaturejson_helpers.hpp/jni_helpers.hppdepend on.ctest: 537/537. Two of those are load-bearing here:ContentOnlyParseUtf8(the runnable guard for0011, in the very file #28736 restructured) andtest_model_split(0012) — green means the patches still work, not merely apply.OAI_LAYERkeys swept for upstream readers against b10938's sources), so no registry drifted.nm -D: 40Java_*exports.NativeLibraryLoadSmokeTest— 4/4, 0 skipped, run after acleansonativeBuildInfoMatchesPinnedVersionConstantcompared the rebuilt binary against the new constant rather than a stale class.mvn test: 1755 run, 0 failures, 0 errors (269 skipped — the model-gated classes; no GGUF in this sandbox).spotless:checkclean;javadoc:jarBUILD SUCCESS.Related issues / PRs
Refs ggml-org/llama.cpp#28775 — the upstream carry of
patches/0013, still open.Checklist
CONTRIBUTING.mdandCODE_OF_CONDUCT.mdFiles changed (5, all six commits combined)
llama/CMakeLists.txtGIT_TAG b10909→b10938llama/src/main/java/net/ladenthin/llama/value/LlamaCppVersion.javaLLAMA_CPP_VERSIONconstant + 3 javadoc mentionsREADME.mdCLAUDE.mddocs/history/llama-cpp-breaking-changes.mdCHANGELOG.mdis deliberately untouched: it records consumer-visible behaviour, and llama.cpp pin bumps are not recorded there.🤖 Generated with Claude Code
https://claude.ai/code/session_01AnNYn8W1xuVxVJtyL34GyH
Generated by Claude Code