Mixed-precision MLX build of
Motif-Technologies/Motif-3
(314.8B total / 13.2B active MoE, MIT) for Apple silicon — the
speed tier companion to
avlp12/Motif-3-Alis-MLX-8bit.
Decode is read-bandwidth-bound at batch 1, so halving the bits nearly halves the per-token
read:
~50 tok/s with MTP self-speculative decoding (k=3) on a single M3 Ultra —
about
+35% over the 8-bit build at matching settings — at a small, measured quality cost (tables below).
Fits a 256 GB Mac with full headroom; a 192 GB M2/M3 Ultra fits with a raised wired limit
and modest context.
Speed stack (all in the
install fork):
single-kernel Sinkhorn for the mHC gates, compiled activation/glue fusions (PolyNorm,
router, mHC mixes, attention epilogue — bit-exact, kill switches
MOTIF_COMPILE_ACT/GLUE=0),
an mHC-transition mega-kernel (one threadgroup per position fuses the 16K rmsnorm, gate
projections, Sinkhorn, premix, and input layernorm — ~7 serial dispatches to 1, +17%;
MOTIF_MHC_TRANS=0),
and vendor-faithful MTP self-speculative decoding (wiring confirmed by Motif in
this discussion) with
correct chained-draft norm handling.
k=3 drafting wins on Apple silicon: batch-1 decode
is latency-bound, so verifying 4 tokens costs only ~1.5x one token — the economics invert
Motif's (compute-bound, vLLM) "1 speculative token is optimal" guidance. Leviathan
rejection-sampling acceptance remains available for k=1 (
MLX_MTP_REJECTION=0 to disable).
Teacher-forced NLL and greedy top-1 agreement against the 8-bit reference on short
KO/EN/code probes (same final-release weights; probe-scale — treat as indicative, not
benchmark-grade. *top-1 measured on the shorter 300-token probe, on which the KO NLL delta
read +9.9% — probe-scale variance; the 1.5k-token probe is the better estimate):
If you want maximum fidelity (e.g. as a distillation teacher), use the
8-bit build. Motif themselves ship a
4-bit
NVFP4 checkpoint for vLLM,
and report the MTP head keeps ≥70% draft acceptance at 4-bit — consistent with what this
build measures.
1pip install git+https://github.com/avlp12/mlx-lm.git@motif3-support
2mlx_lm.generate --model avlp12/Motif-3-Alis-MLX-4.5bpw \
3 --prompt "한국의 전통 건축양식을 요약해줘." --max-tokens 400 --temp 0.7 --mtp --mtp-num-draft-tokens 3
4# OpenAI-compatible server:
5mlx_lm.server --model avlp12/Motif-3-Alis-MLX-4.5bpw --port 8003 --mtp --mtp-num-draft-tokens 3