Implement the GLM 5.2 Mojo-Metal backend with isolated sparse-path gates #90
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Goal
Implement GLM 5.2 on the shared Mojo backend for Apple Metal while preserving DS4 behavior and meeting or exceeding DS4Server native Metal.
Blocked by the shared foundation, harness, and DeepSeek work. CUDA is deferred to the optional follow-up.
Scope
Correctness gates
DS4 remains authoritative for token flow, logits, context accounting, Compact KV, indexer decisions, sparse attention, routing, cache transitions, MTP, and checkpoints. Verify Compact KV, indexer, sparse attention, MoE, MTP, and checkpoint transfer separately before the complete model gate.
Performance gates
Compare Mojo-Metal only with DS4Server native Metal on the same Apple hardware. Isolate Compact KV, indexer, sparse attention, routing and experts, complete layers, prefill, first token, stable decode, long context, MTP, memory, and transfers. Every critical component and the complete model must satisfy #85 with no fallback.
Acceptance criteria
Upstream material to reassess
Upstream implementations remain candidates, never replacements for the DS4 oracle.
Binding outcome from #84 (2026-08-31)
#84 stopped product integration on Mojo 1.0.0 because the open compiler/standard-library environment has no host-side Metal
DeviceContext. The workingmax.gpu.hostpath requires MAX plus AsyncRT/KGEN dylibs whose component-specific redistribution permission could not be established.mojo build --emit shared-libalso links@rpath/libKGENCompilerRTShared.dylibfor a trivial export.The GLM port cannot begin on MAX-backed GPU APIs. Sparse/indexed operation inventory may proceed, but implementation depends on the approved shared host/runtime path.
These constraints are acceptance criteria:
uv.lock; do not use nightly or an older release;max,max-core,max-mojo-libs, AsyncRT, or KGEN to the product/build/package closure without an authoritative redistribution grant naming every shipped component;docs/MOJO_SPIKE_84.md;If the runtime grant or open host API changes, update #84 evidence first so this milestone has one source of truth.
Implement the GLM 5.2 Mojo backend with isolated sparse-path parity gatesto Implement the GLM 5.2 Mojo-Metal backend with isolated sparse-path gatesBased on findings in #84, all work on MOJO migration is stopped. Licene-hell.
Project decision: the Mojo backend effort is canceled. All committed spike tooling, dependencies, lockfiles, and documentation were removed in
9a33c61; generated probe state was deleted as well. The independent Apple-silicon/macOS-15 product floor remains. This issue is no longer actionable.