Skip to content

Add native GLM-5.2 sparse execution - #9

Closed
i386 wants to merge 4 commits into
mainfrom
glm-5.2
Closed

Add native GLM-5.2 sparse execution#9
i386 wants to merge 4 commits into
mainfrom
glm-5.2

Conversation

@i386

@i386 i386 commented Jul 14, 2026

Copy link
Copy Markdown

Overview

Add native GLM-5.2 sparse execution to the Mesh-LLM llama.cpp fork, based directly on the llama.cpp revision pinned by mesh-llm.

The branch is intentionally organized as four reviewable commits:

  1. Add GLM-5.2 IndexShare schedule metadata across GGUF conversion, loading, validation, and saving.
  2. Implement native Full/Shared GLM-DSA behavior, NORM RoPE, compressed KV storage, and index reuse.
  3. Add F16/F32/BF16 and quantized Q8_0, Q5_1, Q5_0, Q4_1, Q4_0, and IQ4_NL GGML_OP_LIGHTNING_INDEXER execution on Metal.
  4. Add compact selected-KV sparse decode through Flash Attention, plus correctness and regression tests.

This branch contains no Skippy ABI, staged-runtime hooks, stage sidebands, mesh scheduling, or Skippy-specific configuration. Those integration concerns remain owned by mesh-llm. Native MTP performance work is not claimed by this change.

Additional information

Base revision: 99f3dc32296f825fec94f202da1e9fede1e78cf9

Validation performed on Apple Metal:

  • Clean release build completed successfully.
  • Focused Metal Lightning Indexer parity passed 108/108 cases across dense and quantized cache types.
  • Q4_0 Lightning Indexer at a 4K KV length measured 2,863.90 us on CPU versus 240.48 us on Metal, or 11.91x faster for the isolated operation.
  • Quantized Metal matmul regression matrix passed 1,810/1,810.
  • Greedy replay passed 256/256 tokens at 2K, 32K, and 128K contexts.
  • Downstream two-node GLM-5.2 integration loaded the real Q4_0 kernel on both stages and completed an OpenAI-compatible 128K smoke. Short-context end-to-end throughput remained effectively neutral, so no whole-model speedup is claimed here.

Requirements

  • I have read and agree with the contributing guidelines
  • AI usage disclosure: YES. Codex was used to transplant and separate the native GLM changes, remove staged-runtime coupling, and run the documented validation. The submitter remains responsible for reviewing all changes.

@coderabbitai

coderabbitai Bot commented Jul 14, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: f52dc72d-3595-42eb-8757-3da69785e68a

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch glm-5.2

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 added 2 commits July 15, 2026 12:10
…ing, validation, and saving

Assisted-by: Codex
…KV storage, and index reuse

Assisted-by: Codex
@i386
i386 force-pushed the glm-5.2 branch 2 times, most recently from 173bd30 to 11d227a Compare July 16, 2026 17:16
@i386 i386 changed the title Add native GLM-5.2 DSA and MTP execution Add native GLM-5.2 sparse execution Jul 16, 2026
@i386 i386 closed this Jul 27, 2026
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