feat!: upgrade llama.cpp from b10870 to b10878 - #425
Merged
Conversation
50.3 KiB / 8 commits / 25 files -- under the runbook's 100 KiB chunking
threshold, so bumped straight through rather than stepped.
Four pin sites moved (CMakeLists GIT_TAG, LlamaCppVersion.LLAMA_CPP_VERSION,
CLAUDE.md, README badge), plus the two incidental b10870 mentions in CLAUDE.md's
local-WebUI recipe and sccache section.
Verified rather than assumed, because the range touches two patch targets:
* 0001 (common/arg.cpp): b10878 still carries the #ifdef _WIN32 count-guarded
`argv = utf8.ptrs.data()` override, and common_params_parse_main appears 0
times in b10878:common/arg.h -- upstream has still not adopted the fix.
* 0012 (src/llama-model.{cpp,h}): b10878 still normalises with a bare
`splits[i] /= split_sum;` and has no split_sum == 0 guard of its own, so
CLAUDE.md's "drop rather than refresh" instruction does not fire. Its
llama-model diff is only a new LLM_TYPE_1B_A400M enumerator, far from the
patch hunks.
Fresh configure through the real FetchContent path: stamp written at head
4850c7727fa73bbe3098e10ee369fbc3467c445f (= b10878) with all nine hashes.
Release build clean. ctest 527/527, including the four LlamaModelSplits.* cases
that are the only place 0012's extracted functions are linked. 40 Java_* exports.
`mvn -pl llama clean test -Dtest=NativeLibraryLoadSmokeTest` 4/4, including
nativeBuildInfoMatchesPinnedVersionConstant -- the end-to-end proof that the pin
sites and the linked binary agree. (clean is required: javac inlines the constant
into the test class and Maven's incremental compile cannot see that dependency.)
NOT fixed here, and the reason this commit is marked breaking: upstream deleted
the deprecated --mlock, --mmap, --no-mmap, -dio/--direct-io and
-ndio/--no-direct-io options in favour of --load-mode. Two of them are public
Java API here -- ModelFlag.MLOCK and ModelFlag.NO_MMAP, emitted by
ModelParameters.enableMlock() and disableMmap() -- and loadModel() hands that
argv straight to common_params_parse, where an unknown option is a hard error.
So both builder methods now produce a failing model load.
No test catches it: ModelFlagTest and ModelParametersExtendedTest assert only
the string mapping, never that llama.cpp still accepts the flag, so they stay
green while the flag is dead. The whole deprecation window opened and closed
inside this 8-tag range -- --load-mode already existed at b10870.
The faithful replacement is --mlock -> --load-mode mlock and --no-mmap ->
--load-mode none, but choosing between re-pointing the two builders, adding a
LoadMode value-taking setter, or removing the constants outright is a public-API
decision and is left to its own change. docs/history records the full analysis.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AnNYn8W1xuVxVJtyL34GyH
bernardladenthin
had a problem deploying
to
maven-central
September 9, 2026 15:14 — with
GitHub Actions
Failure
bernardladenthin
had a problem deploying
to
startgate
September 9, 2026 15:14 — with
GitHub Actions
Error
bernardladenthin
had a problem deploying
to
maven-central
September 9, 2026 15:14 — with
GitHub Actions
Failure
|
This was referenced Sep 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



50.3 KiB / 8 commits / 25 files — under the runbook's 100 KiB chunking threshold, so bumped straight through rather than stepped.
Four pin sites moved (
CMakeListsGIT_TAG,LlamaCppVersion.LLAMA_CPP_VERSION,CLAUDE.md, README badge), plus the two incidentalb10870mentions inCLAUDE.md's local-WebUI recipe and sccache section.Upstream deleted the deprecated
--mlock,--mmap,--no-mmap,-dio/--direct-ioand-ndio/--no-direct-iooptions in favour of-lm/--load-mode. Two of them are public API here:LlamaModel.loadModel(parameters.toArray())hands that argv straight tocommon_params_parse, where an unknown option is a hard error, not a warning. So both builder methods now produce a model load that fails.No test catches this.
ModelFlagTestandModelParametersExtendedTest#testEnableMlock/#testDisableMmapassert only the string mapping (hasKey("--mlock")), never that llama.cpp still accepts it — they stay green while the flag is dead. Same "pins the mapping, not the contract" shape as thegetMetrics()payload drift at b10408.The whole deprecation window opened and closed inside this 8-tag range —
--load-modealready existed at b10870:--load-mode--mlockFaithful replacement is
--mlock→--load-mode mlockand--no-mmap→--load-mode none. Deliberately not done here: choosing between re-pointing the two builders, adding aLoadModevalue-taking setter, or removing the constants outright is a public-API decision, and a new enum-valuedModelParameterssetter also drags in the by-nameOCP_OVERLY_CONCRETE_PARAMETERlist inspotbugs-exclude.xml. It belongs in its own change.Patches — verified against the pristine tag, not assumed
The range touches two patch targets, so both were checked rather than left to the fail-loud applier:
0001(common/arg.cpp) —b10878still carries the#ifdef _WIN32count-guardedargv = utf8.ptrs.data()override, andcommon_params_parse_mainappears 0 times inb10878:common/arg.h. Upstream has still not adopted the fix; the patch stays.0012(src/llama-model.{cpp,h}) —b10878still normalises with a baresplits[i] /= split_sum;and has nosplit_sum == 0guard of its own, so CLAUDE.md's "drop rather than refresh" instruction does not fire. Itsllama-modeldiff is only a newLLM_TYPE_1B_A400Menumerator (Granite3 MoE), far from the patch hunks.Verification
FetchContentpath4850c7727fa73bbe3098e10ee369fbc3467c445f(= b10878) with all nine patch hashescmake --build --config ReleasectestLlamaModelSplits.*cases — the only place0012's extracted functions are linkednm -D libjllama.soJava_*exportsmvn -pl llama clean test -Dtest=NativeLibraryLoadSmokeTestnativeBuildInfoMatchesPinnedVersionConstant— the end-to-end proof that the pin sites and the linked binary agreecleanis required for the last one:LLAMA_CPP_VERSIONis a compile-time constant javac inlines into the test class, and Maven's incremental compilation cannot see that dependency.Other API movement in range — all unreachable here, checked not assumed
include/llama.h:llama_sampler_chain_nreturnsint32_tinstead ofint. No project TU calls it, and the two are the same type on every platform this builds for.tools/mtmd/mtmd-helper.cpp: internal video frame-id propagation.mtmd-helper.his untouched, somtmd_helper::gen_audioand thereforeTextToSpeechare unaffected.GGML_CUDA_FA_ALL_QUANTSdeprecated in favour ofGGML_CUDA_FA_QUANTS. Not set anywhere in this repo, so it cannot reach the CUDA/HIP jobs.docs/history/llama-cpp-breaking-changes.mdcarries the full analysis in two new rows.🤖 Generated with Claude Code
https://claude.ai/code/session_01AnNYn8W1xuVxVJtyL34GyH
Generated by Claude Code