From 22a6fe20438ac43c8c21b9952a7f18213e633257 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 6 Jul 2026 13:24:05 +0000 Subject: [PATCH] Upgrade llama.cpp from b9878 to b9886 Small upstream range (12 files, ~12.4 KiB, 8 commits): ggml-only backend tweaks (ARM NVFP4 UE4M3 LUT, AIX tiled matmul, Vulkan CEIL_DIV 32-bit overflow fix, CUDA conv_transpose_1d indexing, HIP -ffast-math) plus WebUI fixes (auto-followed by build-webui). No API-surface changes. All eight patches (0001-0008) re-verified against b9886: applied clean onto a fresh checkout and again via the fail-loud PATCH_COMMAND during a real cmake configure; OuteTTS generator anchors held (tools/tts/tts.cpp unchanged). Breaking-changes history extended with the b9878-b9886 rows. Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_01CUkH25DqF1fwabQkXgsrii --- CLAUDE.md | 8 ++++---- README.md | 2 +- docs/history/llama-cpp-breaking-changes.md | 2 ++ llama/CMakeLists.txt | 4 ++-- 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index 456d0e65..3ee87ab2 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: **b9878** +Current llama.cpp pinned version: **b9886** ## Upgrading CUDA Version @@ -376,7 +376,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 b9878 https://github.com/ggml-org/llama.cpp /tmp/lc +git clone --depth 1 --branch b9886 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 ) \ @@ -416,7 +416,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 b9878`), the +Because `sccache` is **content-addressed** and llama.cpp is pinned (`GIT_TAG b9886`), 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 @@ -1167,7 +1167,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 b9878`. +llama.cpp is fetched via CMake FetchContent, pinned to `GIT_TAG b9886`. **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 823b679e..fbb9f590 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,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 b9878](https://img.shields.io/badge/llama.cpp-%23b9878-informational)](https://github.com/ggml-org/llama.cpp/releases/tag/b9878) +[![llama.cpp b9886](https://img.shields.io/badge/llama.cpp-%23b9886-informational)](https://github.com/ggml-org/llama.cpp/releases/tag/b9886) [![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 c207614a..9aea11ab 100644 --- a/docs/history/llama-cpp-breaking-changes.md +++ b/docs/history/llama-cpp-breaking-changes.md @@ -429,3 +429,5 @@ Used during `llama.cpp` version bumps: when upgrading, scan this file from the r | b9873–b9876 | upstream verification (sandbox) | All **eight** patches (`0001`–`0008`) re-verified against b9876: applied in filename order onto a clean b9876 checkout, all clean. The b9873→b9876 diff (3 files, ~9.6 KiB) touches **no** patch-target file and **no** OuteTTS generator anchor (`tools/tts/tts.cpp` unchanged). Full build + `ctest` to be confirmed by the CI pipeline. | | b9876–b9878 | `ggml/src/ggml-backend-meta.cpp` + `src/llama-model.cpp` | Internal-only, no API surface (2 files, ~1.8 KiB). **(1)** meta backend gains a fail-loud `GGML_ABORT` guard when handed a multi-buffer (upstream #22197); **(2)** `llama_model` now **copies** the borrowed `params.tensor_split` array into an owned vector (`tensor_split_owned`) so tensor-parallel KV-cache split metadata cannot read a dangling caller pointer later. Both inside upstream-compiled TUs; no project source changes required. | | b9876–b9878 | upstream verification (sandbox) | All **eight** patches (`0001`–`0008`) re-verified against b9878: applied in filename order onto a clean b9878 checkout, all clean. The range touches **no** patch-target file and **no** OuteTTS generator anchor (`tools/tts/tts.cpp` unchanged). Full build + `ctest` to be confirmed by the CI pipeline. | +| b9878–b9886 | `ggml/src/ggml-cpu/{arch/arm/quants.c,llamafile/sgemm.cpp,simd-mappings.h}` + `ggml/src/ggml-cuda/conv-transpose-1d.cu` + `ggml/src/ggml-hip/CMakeLists.txt` + `ggml/src/ggml-vulkan/ggml-vulkan.cpp` + `scripts/ui-assets.cmake` + `tools/ui/**` | Internal-only, no API surface (12 files, ~12.4 KiB), ggml + WebUI only. **(1)** ARM NVFP4 dot product switches to the shared UE4M3 LUT (`quants.c`/`simd-mappings.h`); **(2)** tiled matmul enabled on AIX (`sgemm.cpp` — irrelevant to our targets); **(3)** CUDA `conv_transpose_1d` indexing optimized (`.cu`, CUDA classifiers only); **(4)** Vulkan `CEIL_DIV` 32-bit overflow fix; **(5)** HIP builds add `-ffast-math` (ROCm classifiers only); **(6)** `scripts/ui-assets.cmake` uses `HF_TOKEN` when downloading UI assets — not used by this repo's `build-webui` (it builds the Svelte UI from source); **(7)** `tools/ui/**` WebUI fixes (Ctrl+B sidebar shortcut, MCP proxy DELETE handling — auto-followed by `build-webui`). All inside upstream-compiled TUs or non-shipped tooling; no project source changes required. | +| b9878–b9886 | upstream verification (sandbox) | All **eight** patches (`0001`–`0008`) re-verified against b9886: applied in filename order onto a clean b9886 checkout, all clean. The range touches **no** patch-target file and **no** OuteTTS generator anchor (`tools/tts/tts.cpp` unchanged). Full build + `ctest` to be confirmed by the CI pipeline. | diff --git a/llama/CMakeLists.txt b/llama/CMakeLists.txt index 73412d84..602b9931 100644 --- a/llama/CMakeLists.txt +++ b/llama/CMakeLists.txt @@ -174,7 +174,7 @@ set(LLAMA_BUILD_APP OFF CACHE BOOL "" FORCE) FetchContent_Declare( llama.cpp GIT_REPOSITORY https://github.com/ggerganov/llama.cpp.git - GIT_TAG b9878 + GIT_TAG b9886 PATCH_COMMAND ${CMAKE_COMMAND} -DPATCH_DIR=${CMAKE_CURRENT_SOURCE_DIR}/patches -DLLAMA_SRC= @@ -197,7 +197,7 @@ execute_process( COMMAND ${CMAKE_COMMAND} -DTTS_SRC=${llama.cpp_SOURCE_DIR}/tools/tts/tts.cpp -DOUT_CPP=${JLLAMA_TTS_GEN_CPP} - -DLLAMA_TAG=b9878 + -DLLAMA_TAG=b9886 -P ${CMAKE_CURRENT_SOURCE_DIR}/cmake/generate-tts-upstream.cmake RESULT_VARIABLE JLLAMA_TTS_GEN_RESULT )