Skip to content

v0.0.9

Latest

Choose a tag to compare

@github-actions github-actions released this 05 Dec 06:42
· 1 commit to main since this release

Highlights

256 commits since v0.0.8 — bringing full Qwen4-35B-A3B-4bit support with single-CB native Metal DFlash2, default-on Apple ANE + GPU heterogeneous long-context prefill, and major Qwen3.8-27B throughput & agent-serving upgrades on Apple Silicon.

1. Qwen4-35B-A3B-4bit + Single-CB Native Metal DFlash2 (New Flagship)

  • Low-RSS Off-GPU PLE Streaming: 11.5 GB Per-Layer Embedding tables stream directly from disk via 12-thread CPU pread (overlapped with layer 0), keeping peak server RSS at 8.42 GB on a 48 GB M4 Pro.
  • Single-CB 8-bit Native Metal DFlash2 (M4 Pro 48 GB, temp=0.0, artifacts/qwen4_p6_20261205/):
    • Short math: 119.99 tok/s decode (107.20 client e2e)
    • Short code: 104.78 tok/s decode (96.25 client e2e)
    • Short prose: 69.86 tok/s decode (66.07 client e2e)
  • Warm 8K Prefix Cache & Quantized KV: 8K prefix hit drops TTFT from 10.49 s cold to 0.237 s (38,738 tok/s effective). Optional DMLX_QWEN4_KV_BITS=8 cuts 10-layer QSA KV cache RAM by −46.88%.
  • Multimodal Vision + DFlash2: mtpPrefillVision wires vision prefill directly into DFlash2 speculative decoding.

2. Apple ANE + GPU Heterogeneous Long-Context Prefill (Default On)

  • Offloads 30-layer GDN in_proj_all and 40-layer Shared Expert to the Apple Neural Engine in parallel with GPU 256-expert top-8 routed MoE:
    • Pure GPU baseline (v3): 793.71 tok/s (2K) · 768.26 tok/s (8K)
    • ANE GDN in_proj_all (v4): 859.35 tok/s (2K) · 831.13 tok/s (8K)
    • ANE 40-layer Shared Expert (v5): 883.28 tok/s (2K) · 870.86 tok/s (8K, +13.4%)
  • Protected by hardware & self-test guards with automatic GPU fallback (DMLX_ANE=0 to disable).

3. Qwen3.8-27B-4bit + Agent-Ready Serving

  • 4-case core GMean: 44.50 tok/s at 17.30 GB peak RSS (ctx2k_greedy 52.48 · short_greedy 46.98 · short_sampled 40.34 · ctx8k_sampled 39.44, artifacts/autoresearch_qwen38_20261203/).
  • Agent-grade server: OpenAI Chat Completions & Anthropic Messages streaming tool calls, reasoning/content split, disk-persisted prefix snapshots, load-time LoRA adapter merge, system-wide OOM memory guard, and dmlx connect for Claude Code / Codex / aider / Cline.

Quick Install (macOS arm64)

curl -fsSL https://raw.githubusercontent.com/zouyee/dmlx/main/scripts/install.sh | bash
dmlx doctor

# Serve Qwen4-35B-A3B with DFlash2 (ANE prefill enabled by default)
DMLX_QWEN4_DFLASH2_DIR=/path/to/Qwen4-35B-A3B-Dflash2 \
  dmlx serve --model /path/to/Qwen4-35B-A3B-4bit --mlx --speculative-mtp 7 --port 8080

Caveats: Benchmarks measured on a single Apple M4 Pro (48 GB) with fixed suites (Qwen4 at temp=0.0). Prose speculative acceptance (69.86 tok/s) still trails math/code.

Full Changelog: v0.0.8...v0.0.9