Skip to content

Commit 7d71485

Browse files
Merge pull request bernardladenthin#387 from bernardladenthin/claude/java-llama-cpp-b10359
Upgrade llama.cpp from b10333 to b10360
2 parents 8079cc6 + 2a1c3ea commit 7d71485

5 files changed

Lines changed: 24 additions & 10 deletions

File tree

‎CLAUDE.md‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
66

77
Java bindings for [llama.cpp](https://github.com/ggerganov/llama.cpp) via JNI, providing a high-level API for LLM inference in Java. The Java layer communicates with a native C++ library through JNI.
88

9-
Current llama.cpp pinned version: **b10333**
9+
Current llama.cpp pinned version: **b10360**
1010

1111
## Upgrading CUDA Version
1212

@@ -429,7 +429,7 @@ needs no extra step here, `build-webui` re-reads the tag and rebuilds the matchi
429429
ships no UI):
430430
```bash
431431
# needs node/npm + network; embed.cpp is plain C++17 (no npm)
432-
git clone --depth 1 --branch b10333 https://github.com/ggml-org/llama.cpp /tmp/lc
432+
git clone --depth 1 --branch b10360 https://github.com/ggml-org/llama.cpp /tmp/lc
433433
( cd /tmp/lc/tools/ui && npm ci && npm run build \
434434
&& ( cd dist && find . -type f -not -path './_gzip/*' \
435435
| while read -r f; do mkdir -p "_gzip/$(dirname "$f")"; gzip -9 -c "$f" > "_gzip/$f"; done ) \
@@ -469,7 +469,7 @@ cache lives in **Depot Cache** over sccache's **WebDAV** backend:
469469
- `SCCACHE_WEBDAV_TOKEN: ${{ secrets.DEPOT_TOKEN }}` — a Depot **organization** token, stored
470470
as the repo secret **`DEPOT_TOKEN`**.
471471

472-
Because `sccache` is **content-addressed** and llama.cpp is pinned (`GIT_TAG b10333`), the
472+
Because `sccache` is **content-addressed** and llama.cpp is pinned (`GIT_TAG b10360`), the
473473
~280 upstream object files are byte-identical every run, so a warm cache recompiles only the
474474
*changed* files. Depot's cache is **shared across all branches** (unlike GitHub's
475475
per-branch `actions/cache`), so every branch builds incrementally; a `b<nnnn>` version bump
@@ -1296,7 +1296,7 @@ ctest --test-dir build --output-on-failure -R "ResultsToJson"
12961296

12971297
#### Upstream source location (in CMake build tree)
12981298

1299-
llama.cpp is fetched via CMake FetchContent, pinned to `GIT_TAG b10333`.
1299+
llama.cpp is fetched via CMake FetchContent, pinned to `GIT_TAG b10360`.
13001300

13011301
**GoogleTest** is a separate `BUILD_TESTING`-only FetchContent (`GIT_TAG v1.17.0`), used solely
13021302
by the `jllama_test` C++ unit-test binary — not by the shipped library, and not coupled to the

‎README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
**Build:**
1212
![Java 8+](https://img.shields.io/badge/Java-8%2B-informational)
1313
![Platform](https://img.shields.io/badge/Platform-Linux%20%7C%20macOS%20%7C%20Windows%20%7C%20Android-lightgrey)
14-
[![llama.cpp b10333](https://img.shields.io/badge/llama.cpp-%23b10333-informational)](https://github.com/ggml-org/llama.cpp/releases/tag/b10333)
14+
[![llama.cpp b10360](https://img.shields.io/badge/llama.cpp-%23b10360-informational)](https://github.com/ggml-org/llama.cpp/releases/tag/b10360)
1515
[![JPMS](https://img.shields.io/badge/JPMS-modular%20JAR-25A162)](https://openjdk.org/projects/jigsaw/)
1616
![JUnit](https://img.shields.io/badge/tested%20with-JUnit6-25A162)
1717
[![JSpecify](https://img.shields.io/badge/JSpecify-1.0.0%20%40NullMarked-25A162)](https://jspecify.dev)

‎docs/history/llama-cpp-breaking-changes.md‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -585,3 +585,17 @@ Used during `llama.cpp` version bumps: when upgrading, scan this file from the r
585585
| b10322–b10327 | upstream verification (sandbox, final target) | Remaining **6** patches re-verified against a clean b10327 checkout (ggml/llama.cpp commit `69bf6437`): fail-loud `PATCH_COMMAND` clean. **Full local verification (mandatory for the final target):** fresh configure + full `cmake --build` (`libjllama.so` + `jllama_test` compile and link, `-O3`, no undefined references) + `ctest` **482/482 passing**. Closes the b10319→b10327 walk (2 steps: b10319→b10322→b10327), on a new branch (`claude/java-llama-cpp-b10327`) following on from the b10310→b10319 walk merged as PR #381. |
586586
| b10327–b10333 | `common/{arg.cpp,common.h}` (**purely additive: new `--tools-runtime` CLI flag + `common_params::server_tools_runtime` field**), `tools/server/{server-tools.h,server-tools.cpp,server.cpp}` (**new opt-in Docker-backed runtime for built-in tools**), `ggml/src/ggml-cuda/{ggml-cuda.cu,rope.cu,rope.cuh}` (**GPU backend internals — CUDA rope kernel rework**) | **No project-source change (single-step bump, diff under the 100 KiB chunking threshold).** `common_params::server_tools_runtime` is a new field appended after the existing `server_tools` member — purely additive, no existing field renamed/removed/reordered. `server_tools::setup(...)` gained a third parameter (`const std::string & tools_runtime`) at its one call site in `server.cpp`'s `llama_server()`, which is inside the region `patches/0006` touches only earlier in the function (embedded-mode flag/argv handling) — verified the patch still applies cleanly (see next row). `jllama.cpp`/`jni_helpers.hpp`/`json_helpers.hpp` reference neither `server_tools` nor `server-tools.h` directly (confirmed via grep), so the 584-line `server-tools.cpp` rewrite (adding an opt-in `--tools-runtime docker:<image>` execution backend) is entirely internal to `server.cpp`'s built-in-tools wiring. CUDA rope-kernel changes are internal to `ggml-cuda`; zero diff under `common/chat.h`, `common/speculative.h`, `tools/mtmd/mtmd.h`, `include/llama-cpp.h`, `common/arg.h` (beyond the additive flag above), `include/llama.h`, `common/download.h`, `tools/server/server-schema.h`. |
587587
| b10327–b10333 | upstream verification (sandbox, final target) | All **6** patches re-verified against a clean b10333 checkout (ggml/llama.cpp commit `08659901c`): sequential `git apply` (filename order, mirroring the `PATCH_COMMAND` applier) succeeded for every patch, including `0006`/`0007` across the touched `server.cpp` region. **Full local verification (mandatory for the final target):** fresh configure + full `cmake --build` (`libjllama.so` + `jllama_test` compile and link, `-O3`, no undefined references) + `ctest` **482/482 passing**. Single-step bump (76 KiB / 71 KiB excl. WebUI, 6 commits — under the 100 KiB chunking threshold), on branch `claude/cuda-toolkit-action-update-0675dk` (continuing the CUDA-toolkit-action-bump branch). |
588+
| b10333–b10338 | `ggml/src/ggml-webgpu/**` (**WebGPU backend internals — not built, `GGML_WEBGPU` never referenced in `CMakeLists.txt`**), `src/llama-model-saver.cpp` (**KV-key clobber fix, #26693 — `llama_model_saver` not called by project source**) | **No project-source change.** Confirmed via grep that no project source references `llama_model_saver`. Intermediate chunk (61 KiB / 5 commits). |
589+
| b10333–b10338 | upstream verification (sandbox, checkpoint) | All **6** patches re-verified against a clean b10338 checkout (ggml/llama.cpp commit `0377426ce`): fail-loud `PATCH_COMMAND` clean (fresh `cmake -B build` succeeded). **Configure-only verification per this step's process** (full build deferred to a later checkpoint). |
590+
| b10338–b10342 | `src/models/granite-switch.cpp` + `src/llama-{arch,hparams,model,kv-cache,context,model-loader}.{cpp,h}` (**new Granite-Switch model architecture, #25107**), `conversion/granite.py` + `gguf-py/**` (**Python, not built**) | **No project-source change.** Entirely internal model-implementation additions; `include/llama.h` has zero diff. |
591+
| b10338–b10342 | upstream verification (sandbox, checkpoint) | All **6** patches re-verified against a clean b10342 checkout (ggml/llama.cpp commit `157b81fe6`): fail-loud `PATCH_COMMAND` clean. **Configure-only verification per this step's process.** |
592+
| b10342–b10344 | `vendor/cpp-httplib/{httplib.h,httplib.cpp}` (**0.52.0 → 0.53.0**), `src/models/nemotron-h{,-moe}.cpp` (**Nemotron-H-MoE model work**) | **No project-source change.** The entire httplib diff (105/761 lines) is additive `WebSocketClient` (outbound websocket client) API — `connect()` return-type change, new `Result` type, `set_ca_cert_path` signature change — confirmed via grep that neither `server-http.cpp` (upstream, `httplib::Server` side) nor any project source references `WebSocketClient`; `httplib::Server` itself has zero diff. Nemotron-H-MoE is internal to `src/models/` + `src/llama-model.cpp`, not `include/llama.h`. |
593+
| b10342–b10344 | upstream verification (sandbox, checkpoint) | All **6** patches re-verified against a clean b10344 checkout (ggml/llama.cpp commit `7a20b417f`): fail-loud `PATCH_COMMAND` clean. **Full local verification (compiled vendor dependency bump warranted it):** fresh configure + full `cmake --build` (`libjllama.so` + `jllama_test` compile and link against the real bumped httplib, `-O3`, no undefined references) + `ctest` **482/482 passing**. |
594+
| b10344–b10353 | `common/chat.cpp` (**new Muse-Glimmer chat-template parser**), `tools/mtmd/{clip-impl.h,clip-model.h,mtmd-image.h,mtmd.cpp}` (**new Muse-Glimmer vision projector type/preprocessor**), `vendor/sheredom/subprocess.h` (**`SUBPROCESS_SPAWN_REPORTS_EXEC_ERRORS` pre-glibc-2.24 guard, upstream PR #106**), `tools/server/{server-tools.h,server-tools.cpp,server.cpp}` (**internal `docker_runtime`→`runtime` rename, now covers podman/ssh**), `common/{arg.cpp,speculative.cpp}` (**help-text/internal-logic only**) | **No project-source change.** All Muse-Glimmer additions are new enum values / struct fields with defaults / new classes — `tools/mtmd/mtmd.h` itself has zero diff. The `subprocess.h` change is exactly the upstream PR #106 fix CLAUDE.md's `0009`-patch-drop note already anticipated ("neither affects this project") — purely additive, old-glibc manylinux2014 unaffected. `server_tools::setup(...)` signature unchanged; `jllama.cpp` doesn't reference `server-tools.h`. Unavoidable single-commit-sized step (159 KiB full / 135 KiB excl. WebUI, 9 commits). |
595+
| b10344–b10353 | upstream verification (sandbox, checkpoint) | All **6** patches re-verified against a clean b10353 checkout (ggml/llama.cpp commit `f8def7fe1`): fail-loud `PATCH_COMMAND` clean. **Full local verification (step size warranted it):** fresh configure + full `cmake --build` (`libjllama.so` + `jllama_test` compile and link, `-O3`, no undefined references) + `ctest` **482/482 passing**. |
596+
| b10353–b10354 | `ggml/src/ggml-cpu/ggml-cpu.c` (**1-line Android CPU-affinity fix, #26838**) | **No project-source change.** Trivial internal fix, irrelevant to the x86_64 CI targets that build this file. |
597+
| b10354–b10355 | `include/llama.h` (**`llama_context_params` gains `n_outputs_max_per_seq`, mid-struct; `llama_sampler_i` gains `backend_reset`/`copy_state` + `llama_sampler_copy()`**), `common/speculative.h` (**purely additive `common_speculative_output_limits`/`common_speculative_get_output_limits`**), `common/sampling.h` (**on CLAUDE.md's "safe to skip" list**) — PR #25532 "multi-output backend sampling" | **No project-source change.** The new `llama_context_params` field is inserted mid-struct (ABI-breaking but this project always rebuilds from source) and is source-compatible — confirmed via grep that `jllama.cpp` never constructs `llama_context_params` directly, only through upstream's own `common_init_from_params`. `common_speculative_init`/`_draft`/`_accept` signatures unchanged, and no project source calls any `common_speculative_*` function directly. Unavoidable single-commit-sized step (113 KiB). |
598+
| b10354–b10355 | upstream verification (sandbox, checkpoint) | All **6** patches re-verified against a clean b10355 checkout (ggml/llama.cpp commit `dd1ea5243`): fail-loud `PATCH_COMMAND` clean. **Full local verification (`include/llama.h` touched, warrants it):** fresh configure + full `cmake --build` (`libjllama.so` + `jllama_test` compile and link, `-O3`, no undefined references) + `ctest` **482/482 passing**. |
599+
| b10355–b10359 | `include/llama.h` (**two comment lines removed only, `llama_sampler_copy` signature unchanged**), `ggml/src/ggml-opencl/**` (**flash-attn kernel work — compiled but no header API called directly**), `ggml/src/ggml-webgpu/**` (**unused backend**) | **No project-source change (final step of the b10333→b10359 walk).** Rest of the range is upstream CI workflow files, no C++ surface this project touches. |
600+
| b10355–b10359 | upstream verification (sandbox, final target) | All **6** patches re-verified against a clean b10359 checkout (ggml/llama.cpp commit `84f712946`): fail-loud `PATCH_COMMAND` clean. **Full local verification (mandatory for the final target):** fresh configure + full `cmake --build` (`libjllama.so` + `jllama_test` compile and link, `-O3`, no undefined references) + `ctest` **482/482 passing**. Closes the b10333→b10359 walk (5 steps: b10333→b10338→b10342→b10344→b10353→b10354→b10355→b10359), on branch `claude/java-llama-cpp-b10359`. |
601+
| b10359–b10360 | `common/peg-parser.cpp` (**suppress incomplete escape sequences in the JSON PEG grammar, #26780**) | **No project-source change (single-step, final target).** Internal bugfix; `common/peg-parser.h` itself has zero diff (also on the "safe to skip" list). All **6** patches re-verified against a clean b10360 checkout (ggml/llama.cpp commit `48d22e295`): fail-loud `PATCH_COMMAND` clean. **Full local verification (mandatory for the final target):** fresh configure + full `cmake --build` (`libjllama.so` + `jllama_test` compile and link, `-O3`, no undefined references) + `ctest` **482/482 passing**. Same branch as the b10333→b10359 walk (`claude/java-llama-cpp-b10359`). |

‎llama/CMakeLists.txt‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ set(LLAMA_BUILD_APP OFF CACHE BOOL "" FORCE)
173173
FetchContent_Declare(
174174
llama.cpp
175175
GIT_REPOSITORY https://github.com/ggerganov/llama.cpp.git
176-
GIT_TAG b10333
176+
GIT_TAG b10360
177177
PATCH_COMMAND ${CMAKE_COMMAND}
178178
-DPATCH_DIR=${CMAKE_CURRENT_SOURCE_DIR}/patches
179179
-DLLAMA_SRC=<SOURCE_DIR>

‎llama/src/main/java/net/ladenthin/llama/value/LlamaCppVersion.java‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,28 +10,28 @@
1010
* library was compiled against, exposed as a compile-time constant so callers can render a badge or
1111
* emit a startup log line without loading the native library.
1212
*
13-
* <p>{@link #LLAMA_CPP_VERSION} is a pure-Java string ({@code "b10333"}) that mirrors the
13+
* <p>{@link #LLAMA_CPP_VERSION} is a pure-Java string ({@code "b10360"}) that mirrors the
1414
* {@code GIT_TAG} in {@code llama/CMakeLists.txt}. It is available even when {@code libjllama} is
1515
* absent (pure-Java checkout, before {@code System.load}), which is what makes it suitable for a
1616
* lightweight version badge in Android or other UIs.</p>
1717
*
1818
* <p>For the <em>authoritative</em> value that is baked into the native binary — the build number
19-
* plus the resolved upstream commit, e.g. {@code "b10333-<commit>"} — call
19+
* plus the resolved upstream commit, e.g. {@code "b10360-<commit>"} — call
2020
* {@link net.ladenthin.llama.LlamaModel#getLlamaCppBuildInfo()} instead; that reads llama.cpp's own
2121
* {@code build-info} through JNI and therefore cannot drift from the compiled library (but requires
2222
* the native library to be loaded).</p>
2323
*/
2424
public final class LlamaCppVersion {
2525

2626
/**
27-
* The pinned llama.cpp release tag this library was built against, e.g. {@code "b10333"}.
27+
* The pinned llama.cpp release tag this library was built against, e.g. {@code "b10360"}.
2828
*
2929
* <p>Kept in lockstep with {@code GIT_TAG} in {@code llama/CMakeLists.txt} — see the
3030
* "Upgrading/Downgrading llama.cpp Version" checklist in {@code CLAUDE.md}. This is the
3131
* compile-time pin; use {@link net.ladenthin.llama.LlamaModel#getLlamaCppBuildInfo()} for the
3232
* value actually linked into the native binary.</p>
3333
*/
34-
public static final String LLAMA_CPP_VERSION = "b10333";
34+
public static final String LLAMA_CPP_VERSION = "b10360";
3535

3636
// Constants holder — not instantiable.
3737
private LlamaCppVersion() {}

0 commit comments

Comments
 (0)