Repository navigation
Description
Both edge0-8b and edge0-35b load fine — LoRA and prerouter install cleanly, generation runs to completion and reports a token count — but what comes out the other end is incoherent, mixed-language noise instead of a real answer. Nowhere near the benchmark numbers in the README (91.5 HumanEval / 70.1 MMLU-Pro for edge0-8b, for example).
Environment: MacBook Neo, Apple A18 Pro chip, macOS 27.0. I hit this on the beta build (26A5421a) and it's identical after updating to the public release (26A428), so it's not a beta quirk. Python 3.12.14 via Homebrew. Fresh clone, pip install -e '.[dev,fetch]' (pulls in mlx==0.30.4, mlx-metal==0.30.4, mlx-lm==0.31.0 as pinned). Both models pulled with scripts/fetch_models.py --tier all — no .incomplete files left over, shard sizes match what's on HF.
Repro:
export EDGE0_8B_MODEL=/path/to/models/edge0-8b
edge0 demo edge0-8b --max-new 30 --prompt "Hello! Write one short sentence about the seaside."
gives me:
[lora] applied=153 not_found=0 skipped=0 scale=2.0
[edge0-8b] prerouter installed: 16 heads, start=7, K=8
[edge0-8b] built in 0.8s
# 30 tokens in 22.278s
user : Hello! Write one short sentence about the seaside.
edge0: ! sharper impacting工作者在图AvecAw quen asian-img平米 axes성这首歌Whole。作为 triang telchina考试pons光纤ząd洞天_ENTER的新闻知识 endpointolated直气
Same with the built-in Chinese demo prompt. Same with --no-lora --no-prerouter (plain int4 base, no adapters), so it's not an adapter problem. And it happens on edge0-35b too, just a different flavor of garbage (repeated ```python fences mixed into the noise), so it's not tied to one model either.
A few things I checked along the way: the download isn't corrupt (verified shard sizes against HF after the fact). LoRA/prerouter both report clean installs. Basic MLX ops work fine — mx.default_device() gives Device(gpu, 0) and a plain matmul on GPU comes back correct, so Metal itself isn't broken.
I also tried bumping mlx/mlx-metal to 0.31.2 and then 0.32.2, keeping mlx-lm pinned at 0.31.0 like the README says to. Both make it worse — outright crash instead of garbage:
File ".../edge0/streaming/layer.py", line 1310, in __call__
unique = sorted(set(int(v) for v in flat.tolist()))
^^^^^^^^^^^^^
RuntimeError: There is no Stream(gpu, 4) in current thread.
Looks like the streaming/expert-offload code depends on some MLX Stream behavior that changed after 0.30.4 — maybe the same category of issue the README already calls out for mlx-lm.
Any idea if this is a known incompatibility with this chip, or is there a setting I'm missing to get real output out of either tier? Can dig up more logs if useful.
Activity
[-]Coherent-looking load but garbage/incoherent generation on both edge0-8b and edge0-35b (Apple A18 Pro / macOS 27)[/-][+]Garbled/incoherent output from edge0-8b and edge0-35b on Apple A18 Pro (MacBook Neo), macOS 27[/+]linyubupa commentedon Sep 11, 2026
Thanks for the detailed report — this one is on us, and it's not your machine, your download, or your chip being "unsupported". You're hitting a known MLX correctness bug on A18-class GPUs, and our pinned MLX version sits exactly in the broken window.
Root cause: MLX used the NAX (tensor-core) kernel path on A18 Pro when it shouldn't
MLX gates its Neural-Accelerator (NAX) matmul kernels behind a GPU check in
mlx/backend/metal/device.h:A18 Pro reports phone architecture (
'p') withgen == 17, so the oldgen >= 17check let it into the NAX path even though that generation does not satisfy the kernel's assumptions. The result is deterministically wrong numerics — no NaN, no exception, generation runs to completion. That matches your symptoms exactly:gather_qmm→ NAX steel GEMM;--no-lora --no-prerouterstill broken — the int4 base itself is all NAX matmuls;A second NAX kernel bug (
shortoverflow in the GEMM tile bounds, producing wrong edge tiles) was fixed in the same window.Version timeline (this is why our pin hurts you)
pyproject.tomlpinsmlx==0.30.4was released two days before the gating fix and seven days before the overflow fix, so our pin forces every A18-class user onto the broken NAX path. Our own benchmarks were all run on M4 Pro, which is why we never saw it.Your
mlxupgrade crash is a second, unrelated bug — oursRuntimeError: There is no Stream(gpu, 4) in current threadatstreaming/layer.py:1310has nothing to do with your chip. mlx 0.31.2 made default streams thread-local (#3281, #3405), and our streaming layer buildsmx.arrays onThreadPoolExecutorworker threads (_buildvia the load/prefetch pools insrc/edge0/streaming/layer.py) before the main thread evaluates them.Stream(gpu, 4)is simply the 5th thread to touch MLX — i.e. one of our pool threads. This is the same class of breakage mlx-lm hit in ml-explore/mlx-lm#1181 and #1256.So upgrading does remove the NAX bug — it just can't get past our threading bug yet.
What we're doing
mlx==0.30.6/mlx-metal==0.30.6, keepingmlx-lm==0.31.0), re-running the slow test suite,scripts/e2e_smoke.pyandscripts/verify_alignment.pybefore publishing it.Streamcrash.gather_qmmcompared against CPU — so a silently-wrong kernel path fails loudly at load instead of producing garbage tokens.If you want to unblock yourself right now
0.30.6 contains both NAX fixes and predates the thread-local stream change, so it should give you the correct output and avoid the
Streamcrash. If you can confirm that on your A18 Pro, it would help us validate the interim pin — and thanks again for the clean environment details and the--no-lora --no-prerouterdatapoint, they saved us a lot of time.References
fix(deps): pin mlx 0.30.6 and document the A18 NAX mis-gating
fix(deps): pin mlx 0.30.6 and document the A18 NAX mis-gating
msdyatt commentedon Sep 11, 2026
Confirmed - 0.30.6 for both mlx and mlx-metal (kept mlx-lm at 0.31.0) fixes it on my A18 Pro. Real output now, on both tiers.
edge0-8b:
edge0-35b:
35b left a stray
<think>tag or two before the actual sentence, but that seems like a separate display thing, not the numerics bug.No crashes on my end either. Thanks for tracking this down so quickly - that's about as clear a root-cause writeup as I've seen on a GitHub issue.
docs: add CONTRIBUTING guide