Skip to content

Update llama.cpp patch queue - #1014

Merged
i386 merged 1 commit into
mainfrom
jd/refresh-llama-patch-queue
Jul 17, 2026
Merged

Update llama.cpp patch queue#1014
i386 merged 1 commit into
mainfrom
jd/refresh-llama-patch-queue

Conversation

@i386

@i386 i386 commented Jul 17, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • update the pinned llama.cpp upstream from 99f3dc32296f825fec94f202da1e9fede1e78cf9 to e8f19cc0ad70a243c8012bf17b4be601abfc8ea2
  • rebase and regenerate the 16-patch Skippy queue against the new upstream
  • preserve upstream MiniMax M2 per-layer input tracking while retaining Skippy's filtered layer range
  • normalize the duplicate final patch numbering from 0015 to 0015 / 0016

Why

The existing patch queue no longer applied cleanly to current llama.cpp master. Patch 2 conflicted in src/models/minimax-m2.cpp after upstream added layer-input bookkeeping.

Impact

Keeps the branch-local staged llama.cpp runtime current while preserving the existing Skippy ABI and patch-series semantics. The range comparison shows the MiniMax M2 conflict resolution is the only semantic adaptation; the remaining carried commits are unchanged.

Validation

  • clean-checkout scripts/prepare-llama.sh pinned
  • just build
  • cargo test -p mesh-llm --lib (41 passed)

Summary by CodeRabbit

  • New Features
    • Added experimental staged inference for splitting model execution across layer ranges.
    • Added model inspection and GGUF slice creation tools.
    • Added chat-template support, reasoning-format handling, grammar improvements, and broader model compatibility.
    • Added token verification, batch sampling, external decoding, and optional MTP draft generation.
    • Added session state, KV-cache, resident-prefix, and recurrent-state save/restore capabilities.
    • Added backend device discovery and model-loading progress events.
  • Bug Fixes
    • Improved activation validation, cache handling, detokenization, and grammar error recovery.
    • Correctly reports tensor sizes and supports additional model families.

@i386
i386 marked this pull request as ready for review July 17, 2026 00:20
@i386
i386 merged commit 8e5bb12 into main Jul 17, 2026
10 of 21 checks passed
@coderabbitai

coderabbitai Bot commented Jul 17, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 0199f6d7-d55a-42ac-8472-e3d9f85dde49

📥 Commits

Reviewing files that changed from the base of the PR and between f13c9dc and 608f236.

📒 Files selected for processing (17)
  • third_party/llama.cpp/patches/0001-Add-Skippy-ABI-and-package-writer-foundation.patch
  • third_party/llama.cpp/patches/0002-Add-early-staged-model-family-and-chat-support.patch
  • third_party/llama.cpp/patches/0003-Add-staged-sampling-checkpoints-and-part-loading.patch
  • third_party/llama.cpp/patches/0004-Add-lanes-external-media-and-chat-grammar-support.patch
  • third_party/llama.cpp/patches/0005-Add-resident-prefix-cache-and-session-refinements.patch
  • third_party/llama.cpp/patches/0006-Expand-staged-execution-across-dense-and-recurrent-f.patch
  • third_party/llama.cpp/patches/0007-Expand-staged-execution-across-VL-and-broad-model-fa.patch
  • third_party/llama.cpp/patches/0008-Add-external-decode-media-prefill-and-newer-family-s.patch
  • third_party/llama.cpp/patches/0009-Add-chat-grammar-device-enumeration-and-runtime-even.patch
  • third_party/llama.cpp/patches/0010-Add-MTP-execution-support-and-sampling-cleanup.patch
  • third_party/llama.cpp/patches/0011-Pass-reasoning-format-through-stage-chat-templates.patch
  • third_party/llama.cpp/patches/0012-Wire-mmap-and-mlock-runtime-load-options.patch
  • third_party/llama.cpp/patches/0013-Add-external-MTP-draft-sidecar-attachment.patch
  • third_party/llama.cpp/patches/0014-Add-non-frame-native-MTP-decode-ABI.patch
  • third_party/llama.cpp/patches/0015-Fix-stage-activation-graph-input-allocation.patch
  • third_party/llama.cpp/patches/0016-Recognize-thinking-field-in-chat-auto-parser.patch
  • third_party/llama.cpp/upstream.txt

📝 Walkthrough

Walkthrough

The patch series extends llama.cpp with Skippy staged execution, activation sidebands, session and KV state transfer, resident-prefix caching, runtime events, device enumeration, native MTP execution, chat-template reasoning formats, and chat auto-parser coverage.

Changes

Skippy staged runtime

Layer / File(s) Summary
Staged graph and activation plumbing
third_party/llama.cpp/patches/0001-*, 0002-*, 0007-*, 0008-*
Adds layer-range graph filtering, activation sidebands, filtered tensor handling, and stage-boundary outputs across supported model families.
Session state, KV pages, and resident prefixes
third_party/llama.cpp/patches/0005-*
Adds session state import/export, recurrent-state APIs, native KV-page serialization, resident-prefix lifecycle APIs, and thread-count configuration.
Runtime events, devices, grammar, and cache compaction
third_party/llama.cpp/patches/0009-*
Adds runtime model-open events, backend enumeration, min-p sampling, grammar exception handling, lazy trigger trimming, and KV-cache compaction.
Native MTP execution and sampling
third_party/llama.cpp/patches/0010-*, 0014-*, 0015-*
Adds MTP graph contexts, next-token validation, model-specific stage filtering, and shared top-k handling.
Chat templates, external MTP, and parser coverage
third_party/llama.cpp/patches/0011-*, 0013-*, 0016-*
Passes reasoning formats through chat templates, supports external MTP draft attachment, and recognizes thinking reasoning fields with tests.
Patch-series synchronization
third_party/llama.cpp/patches/0003-*, 0004-*, 0006-*, 0012-*, third_party/llama.cpp/upstream.txt
Updates embedded patch metadata and the recorded upstream revision.

Estimated code review effort: 5 (Critical) | ~120 minutes

Possibly related PRs

Suggested reviewers: ndizazzo, michaelneale

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch jd/refresh-llama-patch-queue

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@i386
i386 deleted the jd/refresh-llama-patch-queue branch July 17, 2026 00:20
@github-actions

Copy link
Copy Markdown
Contributor

This pull request is currently a draft. Reviews will not take place until the PR is marked as ready for review.

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.

1 participant