Implement the complete DeepSeek Mojo-Metal backend with performance parity #87
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 the complete DeepSeek Mojo backend on Apple Metal while preserving exact DS4 semantics and meeting or exceeding the existing DS4Server Metal backend.
Blocked by #84 through #86. CUDA support is a later optional issue and is not part of this definition of done.
Scope
Correctness gates
DS4 token processing, context accounting, cache and index behavior, checkpoint semantics, logits, argmax, sampled tokens, and complete greedy output remain unchanged. Prefill plus decode and incremental decode produce equivalent state. Checkpoints cross-load where state remains backend neutral. Every operation closes its #85 coverage entry with real shapes and quantized bytes.
Performance gates
Mojo-Metal must meet or exceed DS4Server native Metal on the same Apple hardware for critical operations, complete layers, prefill, time to first token, stable decode, p95 latency, memory, transfers, and relevant cold start. Long context, streaming, steering, and MTP are measured independently and cannot inherit a green baseline.
Acceptance criteria
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 DeepSeek port cannot begin on MAX-backed GPU APIs. Preserve native Metal as the oracle and production implementation until the shared foundation is unblocked and accepted.
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 complete DeepSeek Mojo backend with native performance parityto Implement the complete DeepSeek Mojo-Metal backend with performance parityBased 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.