Skip to content

feat!: upgrade llama.cpp from b10819 to b10850, and record the isolated macOS cause - #420

Merged
bernardladenthin merged 1 commit into
mainfrom
claude/llama-cpp-b10850
Sep 7, 2026
Merged

feat!: upgrade llama.cpp from b10819 to b10850, and record the isolated macOS cause#420
bernardladenthin merged 1 commit into
mainfrom
claude/llama-cpp-b10850

Conversation

@bernardladenthin

Copy link
Copy Markdown
Owner

Summary

Two things, same investigation: the bump, and the documentation that run #910 produced.

llama.cpp b10819b10850

No project-source change. 31 commits and 466 KB in total, but the review surfacecommon/, include/, tools/server/, tools/mtmd/, ggml/include/, top-level CMakeLists.txt — is 10 files, +181/−98, 27 KB. include/, ggml/include/ and tools/mtmd/ are not touched at all.

The header moves are additive: common_log_set_jsonl plus a level_str helper and a json.h include in common/log.{cpp,h}, and two new common_arg entries (--log-jsonl / --no-log-jsonl) in common/arg.cpp. Nothing here calls either. The 159 rewritten lines in tools/server/server-models.cpp are the router's instance lifecycle, not its argv rendering; server-models.h gains request_stop(name).

The patch intersection was NOT empty this time, which is the part that needed proving rather than asserting: common/arg.cpp is patch 0001's target and tools/server/server-models.cpp is patch 0008's. A fresh rm -rf build && cmake -B build applied all eight clean and stamped them at head f114f91f. Server wire contract re-checked mechanically: byte-identical — request-field set, set_hard_limits bounds, response keys in both emit forms.

Chunking, recorded rather than decided quietly. With the exclusion list the earlier history rows used (ggml/src, tools/ui, docs, .github, conversion) the diff is still 171 KB, over the runbook's 100 KiB threshold. That figure is misleading: the remainder is scripts/ui-assets.cmake, tests/test-backend-ops.cpp, a new model architecture (src/models/spark2-5.cpp + its Jinja template) and gguf-py/ — none of which this project links against, and none of which the old exclusion list names. Both numbers are in the history row so the call is auditable instead of asserted.

macOS-15: the cause is isolated

Run 33994480652 (#910) — the first dispatch after the -DGGML_METAL=OFF fix from #418 — turns the two macOS-15 jobs into a clean single-variable comparison, and they disagree. Same runner, same OS, same -DGGML_NATIVE=OFF, identical 1742 tests / 11 skipped on both sides, differing only in GGML_METAL:

Metal no Metal
result 2 errorsMemoryManagementTest 1/10, LlamaModelTest 1/60, both llama_model_load: error loading model: vector 0 errors, those same classes 10/10 and 60/60
MTL0 / ggml_metal log lines 44 0

It is a Metal bug. The standing conclusion "the no-Metal job fails identically, so this is not a Metal problem" was an artifact of the no-op flag and is retired. The zero MTL0 lines also confirm #418's flag fix took effect.

What this does not establish, written down too: Java Tests macOS 14 arm64 (Metal) is green, but that job differs in two variables at once — OS version and GGML_NATIVE (macos-14 builds host-native, macos-15 passes -DGGML_NATIVE=OFF) — so it cannot narrow "Metal" to "Metal on macOS 15". Only the macos-15 pair isolates anything.

What it buys. The bisect window stays b10618 → b10797 in tags, but the candidate set collapses from every upstream change to the Metal backend alone (ggml/src/ggml-metal/**) — precisely the directory every bump review in that table waved through as "GPU backend, safe to skip". That rule is sound for compile/link breaks and blind to runtime ones; this is the first entry where it cost something. Metal moved in this range too (ggml-metal-device.m +7/−2, a new 147-line ggml-metal-tuning.cpp), noted without claiming it fixes anything.

Test plan

  • Fresh configure clean; full build, BUILD_EXIT=0
  • ctest --test-dir llama/build520/520, 0 failed
  • mvn -f llama/pom.xml clean verify1742 tests, 0 failures, 0 errors, incl. NativeLibraryLoadSmokeTest 4 tests / 0 skipped — the guard that cross-checks LLAMA_CPP_VERSION against the linked build-info, i.e. the one that catches a half-applied pin
  • .github/verify-bytecode-version.sh --max-major 52 llama/target616 class files in 5 jars; 0 jars over major 52
  • Patch applier run for real, not inferred: 8/8 clean, stamp at head f114f91f
  • CI is green on this branch — Java Tests macOS 15 arm64 (Metal) is expected to stay red. This bump neither targets nor is known to fix the Metal issue; every other job was green in #910.
  • Docs / CHANGELOG updated — CHANGELOG entry folded to b10731 → b10850; two history rows (the bump, and the isolated cause); the superseded "not resolved" row now points at the new one

Related issues / PRs

Follows #417 (b10817 → b10819) and #418 (the -DGGML_METAL=OFF fix that made run #910's comparison meaningful).

Checklist

  • I have read CONTRIBUTING.md and CODE_OF_CONDUCT.md
  • My commits follow Conventional Commits
  • No security-sensitive changes

🤖 Generated with Claude Code

https://claude.ai/code/session_01AnNYn8W1xuVxVJtyL34GyH


Generated by Claude Code

…ed macOS cause

Two things in one change set because they belong to the same investigation: the
bump, and the documentation the run that justified it produced.

llama.cpp b10819 -> b10850
--------------------------

No project-source change. 31 commits and 466 KB in total, but the review
surface -- common/, include/, tools/server/, tools/mtmd/, ggml/include/, the
top-level CMakeLists.txt -- is 10 files, +181/-98, 27 KB. include/,
ggml/include/ and tools/mtmd/ are not touched at all.

The header moves are additive: common_log_set_jsonl plus a level_str helper and
a json.h include in common/log.{cpp,h}, and two new common_arg entries
(--log-jsonl / --no-log-jsonl) in common/arg.cpp. Nothing here calls either.
The 159 rewritten lines in tools/server/server-models.cpp are the router's
instance lifecycle, not its argv rendering, and server-models.h gains
request_stop(name).

The patch intersection was NOT empty this time, which is the part that needed
proving rather than asserting: common/arg.cpp is patch 0001's target and
tools/server/server-models.cpp is patch 0008's. A fresh rm -rf build && cmake -B
build applied all eight clean and stamped them at head f114f91f. The server wire
contract was re-checked mechanically and is byte-identical -- request-field set,
set_hard_limits bounds, and response keys in BOTH emit forms.

Chunking, recorded rather than decided quietly: with the exclusion list the
earlier rows in the history table used (ggml/src, tools/ui, docs, .github,
conversion) the diff is still 171 KB, over the runbook's 100 KiB threshold. That
figure is misleading -- the remainder is scripts/ui-assets.cmake,
tests/test-backend-ops.cpp, a new model architecture (src/models/spark2-5.cpp
plus its Jinja template) and gguf-py/, none of which this project links against
and none of which the old exclusion list names. Both numbers are in the history
row so the call is auditable instead of asserted.

macOS-15: the cause is isolated
-------------------------------

Run 33994480652 (#910, the first dispatch after the -DGGML_METAL=OFF fix) turns
the two macOS-15 jobs into a clean single-variable comparison, and they
disagree. Same runner, same OS, same -DGGML_NATIVE=OFF, identical 1742 tests /
11 skipped on both sides, differing only in GGML_METAL:

  with Metal:    2 errors -- MemoryManagementTest 1 of 10, LlamaModelTest 1 of
                 60, both "llama_model_load: error loading model: vector"
  without Metal: 0 errors, those same classes 10/10 and 60/60, and ZERO
                 MTL0/ggml_metal lines where the old build had 44

It is a Metal bug. The standing conclusion "the no-Metal job fails identically,
so this is not a Metal problem" was an artifact of the no-op flag and is retired.

What this does not establish is written down too: macOS 14 + Metal is green, but
that job differs in two variables at once (OS version and GGML_NATIVE), so it
cannot narrow "Metal" to "Metal on macOS 15". Only the macos-15 pair isolates
anything.

The bisect window stays b10618 -> b10797 in tags, but the candidate set collapses
to ggml/src/ggml-metal/** -- the directory every bump review in that table waved
through as "GPU backend, safe to skip". That rule is sound for compile and link
breaks and blind to runtime ones; this is the first entry where it cost
something. Metal moved in THIS range too (ggml-metal-device.m +7/-2, a new
147-line ggml-metal-tuning.cpp), which is noted without claiming it fixes
anything.

Verified locally: fresh configure clean, full build, ctest 520/520, mvn clean
verify 1742 tests / 0 failures (including NativeLibraryLoadSmokeTest, 4 tests, 0
skipped -- the guard that cross-checks LLAMA_CPP_VERSION against the linked
build-info), bytecode gate clean over llama/target (616 classes in 5 jars, 0
above major 52).

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AnNYn8W1xuVxVJtyL34GyH
@claude

claude Bot commented Sep 7, 2026

Copy link
Copy Markdown

✅ Review Complete

This is a well-executed llama.cpp version bump with comprehensive verification and excellent documentation.

Strengths

  1. Complete version pinning — All four required locations updated correctly:

    • llama/CMakeLists.txt (GIT_TAG)
    • LlamaCppVersion.java (compile-time constant)
    • CLAUDE.md (documentation references)
    • README.md (badge link)
  2. Thorough testing verification recorded:

    • ✓ 520/520 C++ unit tests
    • ✓ 1742 Java tests, 0 failures/errors
    • NativeLibraryLoadSmokeTest (4/4, 0 skipped) — guards against version-constant drift
    • ✓ Bytecode gate (616 classes, 0 above major 52)
    • ✓ Patch applier verified (all 8 clean, stamped at b10850 head)
  3. Patch intersection handling — Unlike some prior bumps, this one touches two patch-target files (common/arg.cpp for 0001, tools/server/server-models.cpp for 0008). The applier was run for real rather than inferred, proving the contexts survived.

  4. Server contract verification — Request-field set, set_hard_limits bounds, and response keys in both emit forms re-checked mechanically and confirmed byte-identical.

  5. Excellent documentation:

    • CHANGELOG.md entry clearly delineates review surface (27 KB / 10 files) from full diff
    • History table comprehensively documents Metal bug investigation and its isolation
    • Distinguishes what this bump resolves (nothing) from what it revealed (Metal issue is on macOS-15 + Metal specifically)

Metal Investigation Quality

The investigation conclusively shows:

  • The "-DLLAMA_METAL=OFF" flag was silently ignored by upstream's CMake forwarder before fix(ci): make the "no Metal" macOS job actually build without Metal #418
  • Both macOS-15 jobs were actually Metal builds, invalidating the "identical failure = Metal not involved" logic
  • Metal bug is isolated via a clean single-variable comparison: same runner/OS, identical test counts, differing only in GGML_METAL
  • Bisect window correctly widened from b10792–b10797 to b10618–b10797 based on CI history

No Issues Found

  • ✅ No security vulnerabilities
  • ✅ No code quality issues
  • ✅ No missed version references
  • ✅ No unexplained test failures (macOS-15 Metal remains red, as documented and expected)
  • ✅ No floating references to old versions

Expected CI state: All jobs green except Java Tests macOS 15 arm64 (Metal), which is expected to remain red per the PR notes (pre-existing Metal backend issue, not a regression).

@bernardladenthin
bernardladenthin merged commit 92663b2 into main Sep 7, 2026
10 of 14 checks passed
@bernardladenthin
bernardladenthin deleted the claude/llama-cpp-b10850 branch September 7, 2026 23:32
@sonarqubecloud

sonarqubecloud Bot commented Sep 7, 2026

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants