feat: upgrade llama.cpp from b10905 to b10909 - #434
Conversation
First chunk of a chunked bump toward b10909. `git diff b10905 b10909` is 149 KiB, over the runbook's 100 KiB per-step threshold, so `.github/scripts/llama-next-version.sh` selected b10908 as the largest intermediate tag under it. 3 commits, 8 files, 40 KiB. One priority-list row is touched: `common/speculative.h` renames `common_speculative_draft_params::n_past` to `pos0` (#28715). The project's own C++ never constructs that struct, so the rename is contained inside the upstream translation units this project compiles; `server-context.cpp`'s call site is updated by the same upstream commit. `src/llama-model.cpp` is a `patches/0012` target but its diff is in `create_memory`, not `load_tensors`, so the hunks do not meet. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01AnNYn8W1xuVxVJtyL34GyH
Second and final chunk, reaching the latest upstream release b10909. One commit (#28164, "metal : single-source fusion table + fusion debug rework"): 26 files, 111 KiB, and zero files on the priority-ordered API-compatibility list. The change is confined to the Metal backend plus upstream's own test and CI scaffolding; the `tests/*` files are applied but never compiled here, since a FetchContent subproject builds with `LLAMA_BUILD_TESTS=OFF`. All ten patches apply at pristine b10909 and all four standing drop-checks report "still required". `0012`'s `tests/CMakeLists.txt` hunk was checked against this chunk's edit to the same file and does not collide. `0013` was filed upstream during this bump as ggml-org/llama.cpp#28775 and is approved but not yet merged, so it is still required here. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01AnNYn8W1xuVxVJtyL34GyH
Standing non-PR check failures on this branchRecording these once so they are not re-diagnosed per bump. None is caused by this diff — which changes five files: a CMake tag, a Java constant, and three docs.
Not re-running any of them. A re-run is for distinguishing a flake from a real failure; all five are deterministic by construction (an environment gate, a toolchain version bound, an API rejection, a repo-wide scan), so re-running would consume CI minutes and change nothing. No fix is ported into this PR, because for each the fix lives outside a llama.cpp version bump and would widen it:
The checks that do gate this change — Generated by Claude Code |
|



Summary
b10905tob10909(the latest upstream release) across all four pin sites, and appends two row pairs to the breaking-changes history.git diff b10905 b10909is 149 KiB — over the runbook's 100 KiB per-step threshold..github/scripts/llama-next-version.shselectedb10908as the largest intermediate tag under it.4ab0f5ef87c2dcChunk 1 (b10905 → b10908) — one real API-compat hit, contained
common/speculative.{h,cpp},examples/speculative-simple, one line oftools/server/server-context.cppsrc/llama-model.cppmul_mvkernels forne00 < 1024common/speculative.h(priority row 3) renamescommon_speculative_draft_params::n_pasttopos0, andserver-context.cpp's designated-initializer call site follows it (slot.prompt.n_tokens()→slot.prompt.tokens.pos_next()).This needs no project-side change, verified rather than assumed:
grepoverllama/src/main/cpp/finds zero references tocommon_speculative,draft_paramsorn_past. The only consumer is upstream's ownserver-context.cpp, which we compile intolibjllamaand which upstream updated in the same commit — so the rename lives entirely inside upstream translation units.src/llama-model.cppis apatches/0012target, but its diff sits increate_memory(~line 2644), notload_tensors(~1491), so the hunks do not meet.Chunk 2 (b10908 → b10909) — larger, but zero priority-list files
One commit, #28164 ("metal : single-source fusion table + fusion debug rework"): a new
ggml-metal-fusion.{cpp,h}pair (606 lines), reworkedggml-metal-ops.cpp, 2 lines ofsrc/llama-context.cpp, threesrc/models/*.cpp, and test/CI scaffolding.None of
common/,include/,tools/server/ortools/mtmd/is touched, so every row of the API-compatibility table has no input. Thetests/*files are applied but never compiled here — a FetchContent subproject builds withLLAMA_BUILD_TESTS=OFF, the same reason0001's and0012's upstream tests are inert. The real gate for this chunk is the three macOS arm64 jobs, where the reworked Metal fusion path is actually compiled and run.Patches: all ten apply, and the collision candidate was checked
Chunk 2 edits
tests/CMakeLists.txt— whichpatches/0012also patches. Rather than infer, all ten patches were applied in filename order to a pristine b10909 worktree before anything else was touched: all ten applied cleanly,0012included, so the two hunks do not collide.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.hargv = utf8.ptrs.data()override still atcommon/arg.cpp:1282→ 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 required00130013was filed upstream during this bump as ggml-org/llama.cpp#28775 ("ggml-cpu(s390x): guard VXE-only repack helpers"), approved by the s390x maintainer and open at the time of writing. The history row now records what happens when it merges: the first tag carrying it makes the applier abort the configure on every platform, and the response is to delete0013, not refresh it (the0009precedent at b10280).Test plan
Verified locally 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):
a2878d30df0130dde503a7d9ba30d3d21bd71b9f(=b10909) with all ten SHA-256 lines; no "does not apply cleanly" abort.cmake --build --config Release, zero errors.ctest: 537/537.OAI_LAYERkeys swept for upstream readers against b10909'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, filed during this bump.Checklist
CONTRIBUTING.mdandCODE_OF_CONDUCT.mdFiles changed (5, both commits combined)
llama/CMakeLists.txtGIT_TAG b10905→b10909llama/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