Skip to content

Upgrade llama.cpp from b11476 to b11512 (7 steps); ModelParameters.setMoeCacheMib - #486

Merged
bernardladenthin merged 8 commits into
mainfrom
claude/hopeful-pascal-9jlbqb
Oct 8, 2026
Merged

bernardladenthin merged 8 commits into
mainfrom
claude/hopeful-pascal-9jlbqb

Conversation

@bernardladenthin

Copy link
Copy Markdown
Owner

Summary

  • llama.cpp b11476 → b11512, in 7 reviewed steps (b11480, b11484, b11487, b11491, b11495, b11505, b11512; each step's upstream diff is under 100 KiB, each ends at a tag). No carried patch needed a refresh: all ten apply unchanged at every one of the seven tags, and every drop-check still finds its defect (the 0001 override, the unconditional 0002 assignment, no split_sum guard for 0012, no common_log hook for 0014, no stop_server for 0015, no kolibri under src/ for 0016). Upstream touched nothing under .github/ in the range: CCCL v3.4.3, OpenVINO 2026.4.1 and ROCm 10.0.0 stay as they are.
  • One project source change, in the C++ tests only. #29876 (b11480) hands the chat parser the generated tokens next to the text: common_chat_input replaces the std::string of common_chat_parse(), of common_chat_parser_params::generation_prompt and of the server result types' content. Its string constructor is explicit, so test_server.cpp and test_utils.cpp wrap their literals. Nothing moves on the wire -- request fields, their bounds and the response keys are identical between b11476 and b11512 (the two greps from the runbook), and jllama.cpp reads results through to_json() only.
  • One new feature wired: ModelParameters.setMoeCacheMib(int) (--moe-cache-mib, #29887 at b11480, split across GPUs by #30112 at b11512; EXPERIMENTAL upstream): a device-side cache for the MoE expert weights a setCpuMoeLayers / --cpu-moe setup keeps in host memory. Registered as ModelOption.MOE_CACHE_MIB, so test_model_flags.cpp holds it against the server parser; negative values are rejected like upstream's parser does. Three tests in ModelParametersTest, a CHANGELOG Added entry.
  • Reviewed and deliberately not wired (nothing for a Java consumer to call, all exercised by the existing suites): the two LiquidAI d1 decision models (#30110, #30114 -- SystemOneIntegrationTest covers the endpoint, the models are not in the CI set), the reranker classifier activation as a model property (#29692, read from the GGUF), the context checkpoints kept across a slot save/restore (#26004 -- an appendix older state files simply lack, so they still restore), cpp-httplib 0.60.1 (b11505), and the Vulkan / CUDA / SYCL backend fixes.
  • Also on the branch: the docs fix saying the CPU variants ship with 5.2.0, not 5.3.0 (the reactor is at 5.2.0-SNAPSHOT).

Per-step record: two rows per range in docs/history/llama-cpp-breaking-changes.md.

Test plan

  • All ten llama/patches/ apply in order on each of the seven pristine tags (git apply), and at b11480 and b11512 a fresh cmake -B … -DBUILD_TESTING=ON configure through the real FetchContent path succeeds (stamp lists the patches, head a11f57ba = b11512).
  • Full local build at b11480 and b11512; ctest: 598/598 pass at both.
  • Java against the fresh library: LlamaLoaderTest, BackendLoadTest, NativeLibraryLoadSmokeTest (pins LLAMA_CPP_VERSION against the linked build), ModelParametersTest, WireNameRegistryTest, RpcServerTest, LlamaLoggerTest -- 167 tests, 0 failures.
  • spotbugs:check, spotless:check, javadoc:jar, check-natives.py, check-release-gate.py, check-run-scripts.py, check-shared-files.py and the buildcheck unit tests report nothing.
  • CI is green on this branch. Note: this is also the first Publish run that reaches the two manylinux_2_28 CPU-variant jobs and test-cpp-linux-aarch64 from Ship CPU backend variants for Linux x86-64 and aarch64 (manylinux_2_28) #485 (both runs for Ship CPU backend variants for Linux x86-64 and aarch64 (manylinux_2_28) #485 were cancelled at the start gate).
  • Docs / CHANGELOG updated.

Related issues / PRs

Follows #482 (b11476). Refs #485 (the CPU variants whose CI jobs run for the first time here).

Checklist

  • I have read CONTRIBUTING.md and CODE_OF_CONDUCT.md
  • My commits follow Conventional Commits. They use the repository's usual imperative style instead (Upgrade llama.cpp from bX to bY).
  • No security-sensitive changes.

🤖 Generated with Claude Code

https://claude.ai/code/session_01AytmJF9faEiQEVt6eetQS2


Generated by Claude Code

claude added 8 commits October 8, 2026 18:14
The reactor is at 5.2.0-SNAPSHOT (last release v5.1.0), so the first release
with the Linux CPU-variant builds is 5.2.0; CLAUDE.md and TODO.md named 5.3.0.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AytmJF9faEiQEVt6eetQS2
#29876 hands the chat parser the generated tokens next to the text:
common_chat_input replaces the std::string of common_chat_parse(), of
common_chat_parser_params::generation_prompt and of the server result
types' content. Its string constructor is explicit, so the C++ tests
wrap their literals; the wire format is unchanged.

#29887 adds a GPU cache for the MoE experts a --cpu-moe setup keeps in
host memory (--moe-cache-mib, EXPERIMENTAL). Exposed as
ModelParameters.setMoeCacheMib(int) with ModelOption.MOE_CACHE_MIB,
negative values rejected like upstream's parser does.

All ten patches apply unchanged (verified in order against the pristine
tag and by a fresh configure); see
docs/history/llama-cpp-breaking-changes.md for the range.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AytmJF9faEiQEVt6eetQS2
All ten patches apply unchanged (verified in order against the pristine
tag); see docs/history/llama-cpp-breaking-changes.md for the range.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AytmJF9faEiQEVt6eetQS2
All ten patches apply unchanged (verified in order against the pristine
tag); see docs/history/llama-cpp-breaking-changes.md for the range.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AytmJF9faEiQEVt6eetQS2
All ten patches apply unchanged (verified in order against the pristine
tag); see docs/history/llama-cpp-breaking-changes.md for the range.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AytmJF9faEiQEVt6eetQS2
All ten patches apply unchanged (verified in order against the pristine
tag); see docs/history/llama-cpp-breaking-changes.md for the range.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AytmJF9faEiQEVt6eetQS2
All ten patches apply unchanged (verified in order against the pristine
tag); see docs/history/llama-cpp-breaking-changes.md for the range.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AytmJF9faEiQEVt6eetQS2
All ten patches apply unchanged (verified in order against the pristine
tag); see docs/history/llama-cpp-breaking-changes.md for the range.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AytmJF9faEiQEVt6eetQS2
@claude

claude Bot commented Oct 8, 2026

Copy link
Copy Markdown

✅ Overall Assessment: This PR is well-structured and thoroughly tested. No quality, correctness, or security issues found.

Strengths:

  • Comprehensive 7-step bump strategy with clear verification at each stage
  • Wire format stability verified (API changes are internal-only)
  • Proper validation of setMoeCacheMib() with negative value rejection
  • Complete test coverage: C++ tests updated (11 instances), 3 new Java unit tests, wire-name registry extended
  • Thorough documentation in CHANGELOG and breaking-changes history
  • All version constants updated consistently

Code Quality:

  • ModelParameters.setMoeCacheMib() follows established putScalar() pattern
  • Clear, actionable error messages
  • Javadoc properly documents EXPERIMENTAL upstream status

Test Plan: All items verified

  • ✅ All 10 patches apply unchanged at every tag
  • ✅ 598 C++ tests pass
  • ✅ 167 model-free Java tests pass
  • ✅ All style checks clean
  • ⏳ CI pending (expected for development branch)

Security: No issues found - no new JNI entry points, proper input validation at boundary.

@sonarqubecloud

sonarqubecloud Bot commented Oct 8, 2026

Copy link
Copy Markdown

@bernardladenthin
bernardladenthin merged commit 06c5bda into main Oct 8, 2026
67 of 71 checks passed
@bernardladenthin
bernardladenthin deleted the claude/hopeful-pascal-9jlbqb branch October 8, 2026 21:04
bernardladenthin pushed a commit that referenced this pull request Oct 11, 2026
Appended section only, nothing above moved: the session that shipped the
modular natives (#504 to #506) and watched their two full runs leaves its
open items here for the branch that carries on.

First item first: main (#506) and this branch each carry a 0018 patch for
the same AMX line under different file names; after a merge the second one
fails to apply and every native build goes red, while git merges the two
patch files, the two CLAUDE.md rows and the two CHANGELOG bullets silently
(only TODO.md conflicts). The item says what to keep.

Then what was raised in the session and recorded nowhere: WER minidumps
and the emulator pre-install are switched on but unproven; everything
behind `package` has never run on the modular natives; the 8080/9931
server-port split; unpinned Maven plugins and `requirePluginVersions`;
SECURITY.md/CONTRIBUTING.md never compared across the four repos; the
unread SonarCloud finding on #486; the local-agent assignment that exists
only in the session (with the OpenCL-ICD question item 1 lacks); the REUSE
attribution of the dockcross wrappers; and the srcmorph smoke decision
that lives in srcmorph's own TODO.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AytmJF9faEiQEVt6eetQS2

This branch had an error being deployed

1 failed and 1 active deployments
startgate — 51be6866 Deployed Oct 8, 2026 by bernardladenthin via Start gate (abort window) #1117
maven-central — 51be6866 Deployed Oct 8, 2026 by bernardladenthin via Verify GPG signing key (no secrets printed) #1117
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