llama-patch-changes
Skill3.8k starsChanged 20 days agoApache-2.0View on GitHub
Use when changing mesh-llm's llama.cpp patch queue, upstream pin, prepare/build scripts, or carried RPC, MoE, and mesh-hook llama.cpp patches.
- Deletes or force-pushes
We split this skill into the rules it gives an agent
17 rules. About 0 are common, 10 are distinctive, and 7 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈10
Distinctive · estimate
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 8
Use this skill when editing the llama.cpp patch queue, refreshing patches from a llama.cpp checkout, updating the pinned upstream SHA, or …
- Very specific: line 14
Keep durable llama-side changes in the ordered queue under skippy/llama_cpp/patches: top-level core patches first, model_support/series …
- Very specific: line 17
Keep the upstream pin in skippy/llama_cpp/upstream.txt.
- Very specific: line 18
Do not add a submodule, vendor a llama checkout, or depend on the old Mesh-LLM llama.cpp fork.
- Very specific: line 20
Do not treat edits in .deps/llama.cpp as durable until the patch queue has been regenerated and committed.
- Distinctive: line 22
Do not add llama-stage ABI/static in-process patches unless the task explicitly asks for that integration pass.
- Distinctive: line 24
Prefer small, reviewable llama commits with one functional boundary per patch.
- Very specific: line 26
Put a new model family's implementation, conversion, templates, multimodal integration, runtime adaptations, and family tests in one …
- Very specific: line 29
Keep generated graph-semantics edits in generated/.
- Distinctive: line 31
Do not append a terminal patch whose only purpose is to split, move, or clean up code introduced by earlier patches.
- Distinctive: line 78
Keep the temporary backup until clean patch application and the required native build pass.
- Distinctive: line 105
Run Cargo commands serially.
- Very specific: line 117
After any queue change that touches backend sources (.metal, CUDA, Vulkan), ggml.c/ggml-*.h kernel argument structs, or src/llama-model.cpp …
- Distinctive: line 135
When regenerating the queue against a new upstream pin, also diff the arch case lists of reconciled switches against upstream and account …
- Distinctive: line 151
Test the queue against current upstream without moving the pin:
- Distinctive: line 159
If the queue applies and validation passes, update the upstream pin:
- Distinctive: line 166
Commit the pin update with any patch refreshes.
≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
llama-patch-changes
Use this skill when editing the llama.cpp patch queue, refreshing patches from a llama.cpp checkout, updating the pinned upstream SHA, or changing build scripts that prepare or consume patched llama.cpp.
Boundaries
- Keep durable llama-side changes in the ordered queue under
skippy/llama_cpp/patches: top-level core patches first,model_support/seriessecond, andgenerated/serieslast. - Keep the upstream pin in
skippy/llama_cpp/upstream.txt. - Do not add a submodule, vendor a llama checkout, or depend on the old Mesh-LLM llama.cpp fork.
- Do not treat edits in
.deps/llama.cppas durable until the patch queue has been regenerated and committed. - Do not add llama-stage ABI/static in-process patches unless the task explicitly asks for that integration pass.
- Prefer small, reviewable llama commits with one functional boundary per patch. Keep patch numbers unique and contiguous within each queue lane.
- Put a new model family's implementation, conversion, templates, multimodal
integration, runtime adaptations, and family tests in one focused patch in
model_support/. Do not spread family-specific code through core patches. - Keep generated graph-semantics edits in
generated/; do not hand-maintain them in either the core or model-support lane. - Do not append a terminal patch whose only purpose is to split, move, or clean up code introduced by earlier patches. Recreate the affected patches so they use the intended ownership boundaries from the outset.
Local Flow
Prepare the pinned upstream checkout and current patch queue:
scripts/prepare-llama.sh pinnedFor actual llama-side editing, prefer a normal llama.cpp checkout or branch
where commits can be named and inspected. Base the branch on upstream
ggml-org/llama.cpp master, then carry the Mesh-LLM patch commits on top.
For a deliberate queue rewrite, reconstruct capability-owned core commits from
the pinned upstream, add model-family support commits, then add the generated
family shards. Verify the reconstructed head is tree-identical to the
authoritative final checkout before regenerating each queue lane. Preserve the
model_support/series and generated/series manifests explicitly rather than
flattening their patches into the top-level queue.
repo_root="$(pwd)"
llama_checkout="${LLAMA_CHECKOUT:-$repo_root/.deps/llama.cpp}"
patch_backup="$(mktemp -d /tmp/mesh-llm-patches.XXXXXX)"
patch_root="$repo_root/skippy/llama_cpp/patches"
mkdir -p "$patch_backup/core"
mv "$patch_root"/*.patch "$patch_backup/core/"
mv "$patch_root/model_support" "$patch_backup/model_support"
mkdir -p "$patch_root/model_support"
git -C "$llama_checkout" format-patch \
--start-number 1 \
--output-directory "$patch_root" \
"$(cat "$repo_root/skippy/llama_cpp/upstream.txt")..<core-head>"
git -C "$llama_checkout" format-patch \
--start-number 1 \
--output-directory "$patch_root/model_support" \
"<core-head>..<model-support-head>"Regenerate model_support/series from the sorted patch filenames. Leave the
generated lane in place unless its generator inputs changed; if they did,
regenerate it with the deterministic family-patch workflow rather than moving
or formatting those commits by hand.
Keep the temporary backup until clean patch application and the required native build pass. Ordinary focused changes may append a patch without rebuilding unrelated functional boundaries.
Validation
Validate that patches apply in a clean checkout:
tmp_llama="$(mktemp -d /tmp/mesh-llm-llama.XXXXXX)"
trap 'rm -rf -- "$tmp_llama"' EXIT
LLAMA_WORKDIR="$tmp_llama" scripts/prepare-llama.sh pinnedFor normal mesh-llm validation, use the repository build workflow:
just buildFor Rust-only fallout from build-system or runtime call-site changes:
cargo fmt --all --check
cargo check -p mesh-llmRun Cargo commands serially. This repo frequently hits Cargo lock conflicts when multiple Cargo commands run at once.
Model-load spot check (required for backend or model-switch changes)
A clean patch replay plus a green build does not prove the runtime works.
Metal shaders in ggml-metal.metal are JIT-compiled on-device at first model
open, so a broken shader builds green everywhere and only fails at load time.
Machine-reconciled patches can also silently drop arch cases from switches in
src/llama-model.cpp (for example llama_model_rope_type), which only fail
when a model of that arch creates a context.
After any queue change that touches backend sources (.metal, CUDA, Vulkan),
ggml.c/ggml-*.h kernel argument structs, or src/llama-model.cpp switch
statements, load a small real model on your local backend and confirm one
completion returns:
./target/debug/mesh-llm serve --model "Qwen/Qwen2.5-3B-Instruct-GGUF@main:q4_k_m" --log-format json
# wait for the model to appear, then:
curl -s http://127.0.0.1:9337/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{"model":"Qwen/Qwen2.5-3B-Instruct-GGUF:q4_k_m","messages":[{"role":"user","content":"Say OK"}],"max_tokens":5}'On a Mac this exercises the Metal shader JIT path directly. Watch the JSON log
for metal_library_init: error and model-open failure. If the change adds or
touches support for a specific model family, spot-check a model of that family
as well.
When regenerating the queue against a new upstream pin, also diff the arch case lists of reconciled switches against upstream and account for every deletion:
# example: rope-type switch parity
git -C .deps/llama.cpp show <upstream-pin>:src/llama-model.cpp \
| awk '/llama_rope_type llama_model_rope_type/,/^}$/' \
| grep -oE "LLM_ARCH_[A-Z0-9_]+" | sort > /tmp/upstream-cases.txt
awk '/llama_rope_type llama_model_rope_type/,/^}$/' .deps/llama.cpp/src/llama-model.cpp \
| grep -oE "LLM_ARCH_[A-Z0-9_]+" | sort > /tmp/patched-cases.txt
comm -23 /tmp/upstream-cases.txt /tmp/patched-cases.txt # must be empty or explainedUpdating The Upstream Pin
Test the queue against current upstream without moving the pin:
scripts/prepare-llama.sh latest
just build
cargo test -p mesh-llm --libIf the queue applies and validation passes, update the upstream pin:
cp skippy/llama_cpp/upstream.txt /tmp/old-llama-upstream.txt
git -C .deps/llama.cpp rev-parse "$(cat .deps/llama.cpp/.git/mesh-llm-upstream-sha)" > skippy/llama_cpp/upstream.txtCommit the pin update with any patch refreshes.
Gotchas
scripts/prepare-llama.shconfigures local git identity forgit am; keep that responsibility there for fresh CI checkouts.- Patch files are mail-format artifacts and may intentionally contain
whitespace that
git diff --checkreports. Do not hand-normalize patches in a way that changes or breaksgit am. - Build outputs live under
.deps/llama.cpp/build; the rootllama.cppsymlink is compatibility-only. - Important backend flags include
GGML_RPC=ON,BUILD_SHARED_LIBS=OFF, andLLAMA_OPENSSL=OFF; preserve CPU, Metal, CUDA, Vulkan, and ROCm behavior when touching build scripts. - See
mesh-llm/docs/LLAMA_CPP_FORK.mdfor the full patch-queue maintenance notes andmesh-llm/docs/LLAMA_STAGE_INTEGRATION_PLAN.mdfor deferred llama-stage integration.
Trending
Steady: 0 new projects took it in the last 4 weeks, none the 4 weeks before.thin data
Who's talking about michaelneale/mesh-llm
- A Hacker News story“Pool spare GPU capacity to run LLMs at larger scale”Hacker News · Mar 24, 2026 · 11 points
- @rusttrending.bsky.social“michaelneale / mesh-llm: reference impl with llama.cpp compiled to distributed inference across machines, …”Bluesky · Apr 11, 2026 · 2 likes
- @yug1224.com“複数のLLMを連携させてタスクをこなすための分散型エージェントフレームワークらしい 複雑なワークフローを構築する際に役立ちそうかな yug1224 starred michaelneale/mesh-llm…”Bluesky · Apr 8, 2026 · 1 likes
- Mesh-LLM/mesh-llm“Add mesh-llm MoE planning, analysis, and ranking contribution commands”GitHub · Apr 11, 2026
- Mesh-LLM/mesh-llm“Simplify model for node states”GitHub · Apr 10, 2026
The biggest 5 of 18 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 18
Talked about on GitHub, Bluesky and Hacker News (18 times).
On GitHub · 15
- Apr 11, 2026Add mesh-llm MoE planning, analysis, and ranking contribution commands — Mesh-LLM/mesh-llm0 reactions · 1 comment
- Apr 10, 2026Simplify model for node states — Mesh-LLM/mesh-llm0 reactions · 2 comments
- Apr 10, 2026revise mesh publication rules — Mesh-LLM/mesh-llm0 reactions · 1 comment
- Apr 5, 2026Roll out config as local node config first, then reconcile mesh-wide desired state — Mesh-LLM/mesh-llm0 reactions · 2 comments
- Apr 3, 2026CommitLLM sumi capture: working on Apple Silicon Q8_0 — michaelneale/llama.cpp0 reactions
10 more on GitHub
- Apr 2, 2026Add hardware runtime status enrichment without changing model metadata sources — Mesh-LLM/mesh-llm0 reactions
- Apr 2, 2026Design owner identity propagation and direct verification — Mesh-LLM/mesh-llm0 reactions · 4 comments
- Apr 2, 2026Design owner keystore and Rust signed+encrypted message primitives — Mesh-LLM/mesh-llm0 reactions
- Apr 2, 2026Track splitting PR #130 into smaller rollout PRs — Mesh-LLM/mesh-llm0 reactions · 2 comments
- Apr 2, 2026research: mesh-llm integration — p2p inference mesh + model sharding under obol-stack economic layer — ObolNetwork/obol-stack0 reactions
- Apr 2, 2026[WIP] Make PR 103 mergable on top of PR 127 — Mesh-LLM/mesh-llm0 reactions
- Apr 2, 2026refactor: decompose mesh.rs and app/mod.rs into focused submodules — Mesh-LLM/mesh-llm0 reactions · 1 comment
- Mar 28, 2026Autoupdater — Mesh-LLM/mesh-llm0 reactions
- Mar 27, 2026Add a staged auto-updater for release bundles — Mesh-LLM/mesh-llm0 reactions
- Mar 27, 2026Add generic bulk transfer support to mesh plugins — Mesh-LLM/mesh-llm0 reactions
On Bluesky · 2
- Apr 11, 2026michaelneale / mesh-llm: reference impl with llama.cpp compiled to distributed inference across machines, with real end to end demo ★720… — @rusttrending.bsky.social2 likes and reposts
- Apr 8, 2026複数のLLMを連携させてタスクをこなすための分散型エージェントフレームワークらしい 複雑なワークフローを構築する際に役立ちそうかな yug1224 starred michaelneale/mesh-llm… — @yug1224.com1 likes and repost
On Hacker News · 1
- Mar 24, 2026Pool spare GPU capacity to run LLMs at larger scale11 points · 3 comments
Other versions1 project uses a version of this.
Word for word · 1
- Mesh-LLM/mesh-llm★ 3.5k100% same
Edited · 0
None found.
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository32 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .github/AGENTS.mdAGENTS.md
- mesh/AGENTS.mdAGENTS.md
- skippy/AGENTS.mdAGENTS.md
- benchmark-tuneSkill
- config-settings-managementSkill
- connect-agentsSkill
- deploy-linux-gpuSkill
- deploy-macosSkill
- deploy-windowsSkill
- hf-bf16-gguf-conversion-jobsSkill
- hf-gguf-quant-jobsSkill
- hf-layer-package-jobsSkill
- hf-quant-and-layer-package-jobsSkill
- kv-tool-loop-stabilitySkill
- llama-stage-patch-changesSkill
- manage-ciSkill
- mesh-joinSkill
- metrics-serverSkill
- plugin-web-ui-extensionSkill
- release-notesSkill
- release-validationSkill
- remote-observable-processSkill
- skippy-cache-family-benchSkill
- skippy-correctnessSkill
- skippy-family-certificationSkill
- skippy-metricsSkill
- skippy-model-packageSkill
- skippy-promptSkill
- skippy-servingSkill
- skippy-spec-benchSkill
- telemetry-privacy-reviewSkill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

