diff --git a/CLAUDE.md b/CLAUDE.md index 33742d2c..e0b3b000 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -6,7 +6,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co 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. -Current llama.cpp pinned version: **b10197** +Current llama.cpp pinned version: **b10217** ## Upgrading CUDA Version @@ -429,7 +429,7 @@ needs no extra step here, `build-webui` re-reads the tag and rebuilds the matchi ships no UI): ```bash # needs node/npm + network; embed.cpp is plain C++17 (no npm) -git clone --depth 1 --branch b10197 https://github.com/ggml-org/llama.cpp /tmp/lc +git clone --depth 1 --branch b10217 https://github.com/ggml-org/llama.cpp /tmp/lc ( cd /tmp/lc/tools/ui && npm ci && npm run build \ && ( cd dist && find . -type f -not -path './_gzip/*' \ | 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: - `SCCACHE_WEBDAV_TOKEN: ${{ secrets.DEPOT_TOKEN }}` — a Depot **organization** token, stored as the repo secret **`DEPOT_TOKEN`**. -Because `sccache` is **content-addressed** and llama.cpp is pinned (`GIT_TAG b10197`), the +Because `sccache` is **content-addressed** and llama.cpp is pinned (`GIT_TAG b10217`), the ~280 upstream object files are byte-identical every run, so a warm cache recompiles only the *changed* files. Depot's cache is **shared across all branches** (unlike GitHub's per-branch `actions/cache`), so every branch builds incrementally; a `b` version bump @@ -579,7 +579,7 @@ Current patches: |-------|-------| | `0001-win32-arg-parse-embed-guard.patch` | Windows JNI regression from llama.cpp **#24779** (introduced b9739): on Windows `common_params_parse` re-derived argv from the **process** command line (`GetCommandLineW`) and adopted it, so an embedded/JNI caller (`java.exe`) lost its `--model …` args → "Failed to parse model parameters". b9789 narrowed the unconditional override to a **count-guard** (`if (static_cast(utf8.buf.size()) == argc) { argv = utf8.ptrs.data(); }`), but that is exactly the variant the project already found breaks its Windows server-integration tests (when the embedded argv length coincides with `java.exe`'s). The patch carries the **complete upstream change** (so it can be submitted to llama.cpp verbatim and then dropped here): **(1)** `common_params_parse` parses **exactly the argv it is given** (no `GetCommandLineW` magic) and a new `common_params_parse_main()` wrapper holds the UTF-8 recovery for the standalone tools' `main()` (`common/arg.{cpp,h}`); **(2)** the **~34 standalone `main()` call sites** (every `common_params_parse(argc, argv, …)` across `tools/*`, `examples/*` and the `tests/*` programs) flip to `common_params_parse_main()`; **(3)** a `tests/test-arg-parser.cpp` regression case pins that `common_params_parse` honors a caller-supplied argv. The embedded caller (`jllama.cpp`) keeps calling `common_params_parse` and is never overridden. **Our subproject build compiles only the `arg.{cpp,h}` core** — `LLAMA_BUILD_TOOLS`/`LLAMA_BUILD_TESTS` are OFF for a FetchContent subproject — so the flips + test are applied-but-not-compiled here; they were validated via a one-off `-DLLAMA_BUILD_TOOLS=ON -DLLAMA_BUILD_TESTS=ON` build (the new test compiles and its asserts pass; `test-arg-parser`'s only red there is the live `ggml.ai` download check, which is sandbox-network, not the patch). Because it spans **37 files** it must be refreshed on every llama.cpp bump (the applier fails loud). | | `0002-server-preserve-caller-load-progress-callback.patch` | Load-progress-callback regression introduced in llama.cpp **b9789**: `server_context::load_model` (`tools/server/server-context.cpp`) now **unconditionally** installs the server's own load-progress reporter on `params_base.load_progress_callback` immediately before `common_init_from_params`, clobbering any callback the embedding caller already set. libjllama's `LoadProgressCallback` feature wires `common_params.load_progress_callback` to a JNI trampoline *before* calling `load_model`, so the bump silently killed it — `LoadProgressCallbackTest` saw zero progress updates and the abort-on-`false` path never threw. The patch guards the assignment with `if (params_base.load_progress_callback == nullptr)`, so the server installs its own reporter **only when the caller hasn't** — a caller-supplied callback survives and fires during load. Standalone `llama-server` (no caller callback, so the field is null) is unaffected. Same JNI-vs-standalone divergence class as `0001`. | -| `0003-pr22393-server-add-slot-prompt-similarity-getter-setter.patch` | **Upstream-PR carry** of [ggml-org/llama.cpp#22393](https://github.com/ggml-org/llama.cpp/pull/22393) ("server : add slot_prompt_similarity getter/setter") while it is still open upstream. Purely additive: adds `server_context::get_slot_prompt_similarity()` / `set_slot_prompt_similarity(float)` (`tools/server/server-context.{cpp,h}`) so an embedding/JNI caller can query and tune the slot-selection threshold at runtime without reloading the model. Verbatim copy of the PR — drop it once a pinned `b` includes the change. | +| `0003-pr22393-server-add-slot-prompt-similarity-getter-setter.patch` | **Upstream-PR carry** of [ggml-org/llama.cpp#22393](https://github.com/ggml-org/llama.cpp/pull/22393) ("server : add slot_prompt_similarity getter/setter"). Purely additive: adds `server_context::get_slot_prompt_similarity()` / `set_slot_prompt_similarity(float)` (`tools/server/server-context.{cpp,h}`) so an embedding/JNI caller can query and tune the slot-selection threshold at runtime without reloading the model. Verbatim copy of the PR, which **upstream closed without merging** (rejected as exposing unsafe internal state — see the patch header). Carried permanently; it will not be droppable via a version bump. | | `0007-server-attach-http-frontend.patch` | **Adds `llama_server_attach(argc, argv, server_context&)`** so the `NativeServer` *attach mode* can serve an **already-loaded `LlamaModel`** over the upstream HTTP frontend — no second model load, no `start_loop()`; the LlamaModel's worker keeps driving the shared `server_context` and the HTTP routes post tasks to its queue (the queue is the synchronization point). Mechanically: (1) extracts the **pure core route table** (`health` … `slots`) out of `llama_server()` into `static void llama_server_register_common_routes(ctx_http, routes)` (shared, so the two entry points cannot drift on the core endpoint set). **Scope note (narrowed at the b10154 bump):** the helper deliberately carries **only** the stable, state-independent route table — **not** the resumable-streaming routes (their handlers differ between router / non-router), the GCP-compat shim, or the experimental **CORS-proxy / MCP-server / built-in-tools** wiring. b10154 (upstream MCP-server support) moved the streaming routes into the middle of that block and coupled tools/CORS to a per-call `server_mcp mcp_mgr` lifecycle, so the earlier contiguous "route-table + CORS-proxy + tools" extraction is no longer possible; `llama_server()` keeps all of that inline, **byte-identical to upstream b10154** (only the route-table block is factored out). (2) adds `llama_server_attach`, which parses only the HTTP-side argv via `common_params_parse`, starts the stream-session GC + `server_http_context`, registers the common route table, the **non-router** resumable-streaming handlers (upstream b10154 paths `/v1/stream` GET/DEL + `/v1/streams/lookup` POST), the GCP-compat shim, and **403 "disabled" stubs for `/cors-proxy` + `/tools`** (attach mode does not wire the experimental CORS-proxy / MCP / built-in-tools host — those belong to a full `llama-server`, not an embedded model), marks ready immediately (model already loaded), and blocks on the HTTP thread until `llama_server_request_shutdown()` — never calling `common_init()`, backend init, `ctx_server.terminate()` or `llama_backend_free()` (the embedding caller owns those). Applies after `0001`+`0006` (same file); closes the "NativeServer — reuse an already-loaded LlamaModel" TODO. Upstream-submittable ("server: let embedding callers attach the HTTP frontend to an existing server_context"). | | `0008-server-models-worker-cmd-override.patch` | **Makes router mode usable in-JVM.** The router (`server-models.cpp`) spawns each model worker by re-executing its own binary (`get_server_exec_path()` = `/proc/self/exe` & friends) — inside a JVM that binary is `java`, not a llama-server, so embedded router workers could never start. The patch adds env `LLAMA_SERVER_WORKER_CMD` (whitespace-split; read in `server_model_meta::update_args`) which replaces only the leading binary-path token of the rendered worker args, letting an embedding host relaunch workers through its own bootstrap — e.g. `java -cp app.jar net.ladenthin.llama.server.NativeServer` (each worker is then a fresh JVM running the classic single-model `NativeServer`). Exposed in Java as `NativeServer.setWorkerCommand(String...)` (JNI `setenv`); exercised by `RouterModeIntegrationTest` (Linux CI). Upstream-submittable (also useful for containerized/wrapped deployments). | | `0006-server-embed-native-server-jni.patch` | **Makes `server.cpp`'s `llama_server` embeddable in the JVM** so the `NativeServer` JNI bridge can run the full upstream HTTP server (WebUI included) inside `libjllama` — see "Two server modes" below. b9870 already exposes `int llama_server(int, char**)` (non-static; no `main` in the file), so the patch only adds embedded-mode support: (1) a `g_llama_server_embedded` flag + `llama_server_set_embedded()` / `llama_server_request_shutdown()` (declared in the committed `src/main/cpp/native_server_bridge.h`); (2) skips installing the process-wide SIGINT/SIGTERM handlers when embedded (they would hijack the JVM's); (3) in embedded mode parses the **forwarded** argv via `common_params_parse` instead of `common_params_parse_main` (whose `GetCommandLineW` recovery would pick up `java.exe`'s command line — the same Windows class of bug `0001` fixes). `llama_server_request_shutdown()` mirrors the SIGTERM path (invokes the installed `shutdown_handler` → `ctx_server.terminate()` unblocks `start_loop()`), giving JNI an out-of-band stop since `ctx_server` is loop-local. Applies **after `0001`** (which flips this call site to `common_params_parse_main`), so its context is the post-`0001` tree; regenerate against `0001`+source on a bump. Only touches `tools/server/server.cpp`. | @@ -1263,7 +1263,7 @@ ctest --test-dir build --output-on-failure -R "ResultsToJson" #### Upstream source location (in CMake build tree) -llama.cpp is fetched via CMake FetchContent, pinned to `GIT_TAG b10197`. +llama.cpp is fetched via CMake FetchContent, pinned to `GIT_TAG b10217`. **GoogleTest** is a separate `BUILD_TESTING`-only FetchContent (`GIT_TAG v1.17.0`), used solely by the `jllama_test` C++ unit-test binary — not by the shipped library, and not coupled to the diff --git a/README.md b/README.md index 5c938311..94a88be8 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ **Build:** ![Java 8+](https://img.shields.io/badge/Java-8%2B-informational) ![Platform](https://img.shields.io/badge/Platform-Linux%20%7C%20macOS%20%7C%20Windows%20%7C%20Android-lightgrey) -[![llama.cpp b10197](https://img.shields.io/badge/llama.cpp-%23b10197-informational)](https://github.com/ggml-org/llama.cpp/releases/tag/b10197) +[![llama.cpp b10217](https://img.shields.io/badge/llama.cpp-%23b10217-informational)](https://github.com/ggml-org/llama.cpp/releases/tag/b10217) [![JPMS](https://img.shields.io/badge/JPMS-modular%20JAR-25A162)](https://openjdk.org/projects/jigsaw/) ![JUnit](https://img.shields.io/badge/tested%20with-JUnit6-25A162) [![JSpecify](https://img.shields.io/badge/JSpecify-1.0.0%20%40NullMarked-25A162)](https://jspecify.dev) diff --git a/docs/history/llama-cpp-breaking-changes.md b/docs/history/llama-cpp-breaking-changes.md index 7a09a9b9..445583ad 100644 --- a/docs/history/llama-cpp-breaking-changes.md +++ b/docs/history/llama-cpp-breaking-changes.md @@ -524,3 +524,11 @@ Used during `llama.cpp` version bumps: when upgrading, scan this file from the r | b10175–b10189 | upstream verification (sandbox) | All **7** patches re-verified against a clean b10189 checkout (ggml/llama.cpp commit `b2f221684`): fail-loud `PATCH_COMMAND` clean, no rejects despite the `server-context.cpp`/`server-task.cpp` churn in this range (confirmed no line overlap with the `0002`/`0003` hunks). OuteTTS generator anchors hold (`tts.cpp @ b10189`). **Full local verification:** fresh configure + full `cmake --build` (`libjllama.so` + `jllama_test` compile and link, `-O3`, no undefined references) + `ctest` **485/485 passing**. Per-platform build + `ctest` confirmation deferred to the CI pipeline. | | b10189–b10197 | `common/{common.h,common.cpp}` + `src/llama-context.cpp` + `ggml/**` (**ggml bumped to 0.18.0**) + `tools/ui/**` | **No project-source change (8 commits, ~92 KiB full / ~63 KiB excluding WebUI).** `common/common.h`/`common.cpp` gain a test-only `common_get_model_or_exit(int, char*[])` helper (consolidating the deleted `tests/get-model.{cpp,h}` — upstream test-infra only, not referenced by project source). `src/llama-context.cpp`'s destructor and `encode()`/`decode()` now call `synchronize()` before clearing `embd_seq` to avoid a race with in-flight async output copies — purely internal, no header signature changed. Everything else is ggml-CUDA Q2_0 support + the version bump to 0.18.0, a Vulkan `common.cuh` tweak, and the auto-followed WebUI README refresh. No patch-target file touched (`common/arg.{cpp,h}`, `tools/server/server*.cpp`, `vendor/sheredom/subprocess.h`, `include/llama.h` all unchanged), no OuteTTS generator anchor touched. | | b10189–b10197 | upstream verification (sandbox) | All **7** patches re-verified against a clean b10197 checkout (ggml/llama.cpp commit `958d9c0be`): fail-loud `PATCH_COMMAND` clean, no patch-target file changed in the range. OuteTTS generator anchors hold (`tts.cpp @ b10197`). **Full local verification:** fresh configure + full `cmake --build` (`libjllama.so` + `jllama_test` compile and link, `-O3`, no undefined references) + `ctest` **485/485 passing**. Per-platform build + `ctest` confirmation deferred to the CI pipeline. | +| b10197–b10204 | `ggml/src/{ggml-sycl/**,ggml-vulkan/ggml-vulkan.cpp,ggml-webgpu/**}` + `tools/mtmd/{clip-model.h,mtmd-image.cpp}` + `tools/server/server-context.cpp` (**server embd-batch support**) | **No project-source change (7 commits, ~83 KiB — first chunk toward the b10217 target).** Full diff `b10197...b10217` is over the 100 KiB chunk threshold, so the bump proceeds in reviewable steps per the chunking runbook. The only patch-target file touched is `tools/server/server-context.cpp` (upstream #26313 "server: support inp embd to generate next token"): `server_batch` gains an `embd`-carrying `add()` overload + `n_embd`/`has_embd` bookkeeping and `server_slot` gains an `inp_embd` member (for TTS-style models that decode raw embeddings instead of token ids) — entirely additive, well clear of the `0002`/`0003` hunks (load-progress-callback ~line 1152, slot-similarity getters ~line 3965; confirmed no line overlap). Everything else is SYCL q2 mul_mat + RMS_NORM/MUL fusion + dev2dev memcpy, ggml-webgpu flash-attn quantized-KV tuning, Vulkan quantized-concat support, and an mtmd Lanczos image-resize method — none of the priority-8 headers changed, no `CMakeLists.txt`/link-target change. No OuteTTS generator anchor touched (`tools/tts/tts.cpp` unchanged). | +| b10197–b10204 | upstream verification (sandbox) | All **7** patches re-verified against a clean b10204 checkout (ggml/llama.cpp commit `1c5b89ff6`): fail-loud `PATCH_COMMAND` clean, no rejects despite the `server-context.cpp` churn in this range (confirmed no line overlap with the `0002`/`0003` hunks). OuteTTS generator anchors hold (`tts.cpp @ b10204`). **Full local verification:** fresh configure + full `cmake --build` (`libjllama.so` + `jllama_test` compile and link, `-O3`, no undefined references) + `ctest` **485/485 passing** + `NativeLibraryLoadSmokeTest` (JNI `FindClass`/build-info cross-check) green. Per-platform build + `ctest` confirmation deferred to the CI pipeline. | +| b10204–b10207 | `ggml/src/{ggml-sycl/cpy.{cpp,hpp},ggml-zendnn/**}` + `src/llama-context.cpp` (**K/V cache type + quantized-V validation**) | **No project-source change (3 commits, ~66 KiB).** `llama_init_from_model` (`src/llama-context.cpp`, upstream #25871) adds a new hard error requiring matching K/V cache types for DeepSeek-V4/MLA models, and folds the pre-existing "quantized V cache requires flash_attn" check into a combined block that also auto-enables flash attention (`LLAMA_FLASH_ATTN_TYPE_AUTO` → `ENABLED`) when V is quantized — purely internal validation logic, no signature change to any priority-8 header. Everything else is SYCL `cpy` type-coverage additions and a ggml-zendnn `mul_mat_id` direct-API refactor — backend-internal, no patch-target file touched. No OuteTTS generator anchor touched. | +| b10204–b10207 | upstream verification (sandbox) | All **7** patches re-verified against a clean b10207 checkout (ggml/llama.cpp commit `d5d3e05bf`): fail-loud `PATCH_COMMAND` clean, no patch-target file changed in the range. OuteTTS generator anchors hold (`tts.cpp @ b10207`). **Full local verification:** fresh configure + full `cmake --build` (`libjllama.so` + `jllama_test` compile and link, `-O3`, no undefined references) + `ctest` **485/485 passing** + `NativeLibraryLoadSmokeTest` green. Per-platform build + `ctest` confirmation deferred to the CI pipeline. | +| b10207–b10216 | `include/llama.h` (+`bool load_mtp`) + `tools/server/server-context.cpp` (**speculative-replay accepted-token accounting**) + `ggml/**` backends (CUDA/SYCL/Vulkan) + `tools/mtmd/{clip-impl.h,clip-model.h,clip.cpp}` | **No project-source change (9 commits, ~87 KiB).** `include/llama.h` gains a single purely-additive `bool load_mtp` field appended to a model-loading params struct (upstream #26296, "load MTP tensors only if they are really used") — no existing field renamed/reordered, no project source constructs that struct positionally. `tools/server/server-context.cpp` (upstream #26320) adds `server_slot::spec_is_replay` bookkeeping so the accepted-draft-token counters (`n_draft_accepted`, `n_accepted_per_pos`) are corrected when a partial-acceptance replay re-decodes an already-counted token — the touched regions (~line 212/333/3878–3964) are clear of the `0002`/`0003` hunks (~1152/~3965); patches still applied via fuzzy context match despite the line-number shift. Everything else is CUDA MMQ tile-loading/vecdotq refactors, SYCL oneMKL XMX flash-attention + Q2_0 `__byte_perm` extraction, Vulkan `POOL_1D` op + an Intel-Windows driver-version crash mitigation, and an mtmd `n_embd_head` addition — none of the other priority-8 headers changed, no `CMakeLists.txt`/link-target change. No OuteTTS generator anchor touched. | +| b10207–b10216 | upstream verification (sandbox) | All **7** patches re-verified against a clean b10216 checkout (ggml/llama.cpp commit `876a43211`): fail-loud `PATCH_COMMAND` clean; `0003`'s `server-context.cpp` hunk still applied cleanly via fuzzy context matching despite upstream inserting lines earlier in the file (the speculative-replay accounting change). OuteTTS generator anchors hold (`tts.cpp @ b10216`). **Full local verification:** fresh configure + full `cmake --build` (`libjllama.so` + `jllama_test` compile and link, `-O3`, no undefined references) + `ctest` **485/485 passing** + `NativeLibraryLoadSmokeTest` green. Per-platform build + `ctest` confirmation deferred to the CI pipeline. | +| b10216–b10217 | `common/chat.cpp` (**DeepSeek-V4 tool-call-in-thinking parsing**) | **No project-source change (1 commit, ~15 KiB — final chunk; reaches the b10217 target).** Upstream #26269 reworks the DeepSeek-V4 chat-format parser (`common/chat.cpp`) so a tool call can be emitted while still inside a `` block, plus two new `tests/test-chat.cpp` regression cases — pure parsing-logic internals inside the upstream-compiled `llama-common` TU; `common/chat.h`'s public surface (`common_chat_parser_params`, `to_json_oaicompat`, etc.) is unchanged, so no project source (`jllama.cpp`, `json_helpers.hpp`) needs updating. No patch-target file touched, no OuteTTS generator anchor touched. | +| b10216–b10217 | upstream verification (sandbox) | All **7** patches re-verified against a clean b10217 checkout (ggml/llama.cpp commit `ddd4ec142`): fail-loud `PATCH_COMMAND` clean, no patch-target file changed in the range. OuteTTS generator anchors hold (`tts.cpp @ b10217`). **Full local verification:** fresh configure + full `cmake --build` (`libjllama.so` + `jllama_test` compile and link, `-O3`, no undefined references) + `ctest` **485/485 passing** + `NativeLibraryLoadSmokeTest` green. **b10217 is the topmost release; the b10197→b10217 bump is complete** (4 chunks: b10197→b10204→b10207→b10216→b10217). Per-platform build + `ctest` confirmation deferred to the CI pipeline. | diff --git a/llama/CMakeLists.txt b/llama/CMakeLists.txt index 0d4daaaf..69fdff20 100644 --- a/llama/CMakeLists.txt +++ b/llama/CMakeLists.txt @@ -173,7 +173,7 @@ set(LLAMA_BUILD_APP OFF CACHE BOOL "" FORCE) FetchContent_Declare( llama.cpp GIT_REPOSITORY https://github.com/ggerganov/llama.cpp.git - GIT_TAG b10197 + GIT_TAG b10217 PATCH_COMMAND ${CMAKE_COMMAND} -DPATCH_DIR=${CMAKE_CURRENT_SOURCE_DIR}/patches -DLLAMA_SRC= @@ -196,7 +196,7 @@ execute_process( COMMAND ${CMAKE_COMMAND} -DTTS_SRC=${llama.cpp_SOURCE_DIR}/tools/tts/tts.cpp -DOUT_CPP=${JLLAMA_TTS_GEN_CPP} - -DLLAMA_TAG=b10197 + -DLLAMA_TAG=b10217 -P ${CMAKE_CURRENT_SOURCE_DIR}/cmake/generate-tts-upstream.cmake RESULT_VARIABLE JLLAMA_TTS_GEN_RESULT ) diff --git a/llama/patches/0003-pr22393-server-add-slot-prompt-similarity-getter-setter.patch b/llama/patches/0003-pr22393-server-add-slot-prompt-similarity-getter-setter.patch index d52ebdc4..5cd939e1 100644 --- a/llama/patches/0003-pr22393-server-add-slot-prompt-similarity-getter-setter.patch +++ b/llama/patches/0003-pr22393-server-add-slot-prompt-similarity-getter-setter.patch @@ -8,6 +8,12 @@ additive (two new accessors + their declarations) and is a verbatim copy of the so it can be dropped from patches/ once b includes it. Refresh against the new source on every llama.cpp version bump (the applier fails loud if the context shifts). +Update: upstream closed PR #22393 without merging -- ngxson rejected it, reasoning that +slot_prompt_similarity is internal, single-use-case state that shouldn't be exposed as public +API and should instead live in downstream code. This patch is therefore now carried +indefinitely, not pending-merge; it will never be droppable via an upstream bump and must keep +being refreshed on every version bump. + diff --git a/tools/server/server-context.cpp b/tools/server/server-context.cpp index 39b7eb2..7c274cb 100644 --- a/tools/server/server-context.cpp diff --git a/llama/src/main/java/net/ladenthin/llama/value/LlamaCppVersion.java b/llama/src/main/java/net/ladenthin/llama/value/LlamaCppVersion.java index ec0a3f70..d1fa8db6 100644 --- a/llama/src/main/java/net/ladenthin/llama/value/LlamaCppVersion.java +++ b/llama/src/main/java/net/ladenthin/llama/value/LlamaCppVersion.java @@ -10,13 +10,13 @@ * library was compiled against, exposed as a compile-time constant so callers can render a badge or * emit a startup log line without loading the native library. * - *

{@link #LLAMA_CPP_VERSION} is a pure-Java string ({@code "b10197"}) that mirrors the + *

{@link #LLAMA_CPP_VERSION} is a pure-Java string ({@code "b10217"}) that mirrors the * {@code GIT_TAG} in {@code llama/CMakeLists.txt}. It is available even when {@code libjllama} is * absent (pure-Java checkout, before {@code System.load}), which is what makes it suitable for a * lightweight version badge in Android or other UIs.

* *

For the authoritative value that is baked into the native binary — the build number - * plus the resolved upstream commit, e.g. {@code "b10197-"} — call + * plus the resolved upstream commit, e.g. {@code "b10217-"} — call * {@link net.ladenthin.llama.LlamaModel#getLlamaCppBuildInfo()} instead; that reads llama.cpp's own * {@code build-info} through JNI and therefore cannot drift from the compiled library (but requires * the native library to be loaded).

@@ -24,14 +24,14 @@ public final class LlamaCppVersion { /** - * The pinned llama.cpp release tag this library was built against, e.g. {@code "b10197"}. + * The pinned llama.cpp release tag this library was built against, e.g. {@code "b10217"}. * *

Kept in lockstep with {@code GIT_TAG} in {@code llama/CMakeLists.txt} — see the * "Upgrading/Downgrading llama.cpp Version" checklist in {@code CLAUDE.md}. This is the * compile-time pin; use {@link net.ladenthin.llama.LlamaModel#getLlamaCppBuildInfo()} for the * value actually linked into the native binary.

*/ - public static final String LLAMA_CPP_VERSION = "b10197"; + public static final String LLAMA_CPP_VERSION = "b10217"; // Constants holder — not instantiable. private LlamaCppVersion() {}