Skip to content

docs(readme): TurboKV precision known issue on M5 (not reproduced on M6) - #174

Merged
solderzzc merged 2 commits into
mainfrom
docs/turbokv-m5-known-issue
Sep 24, 2026
Merged

solderzzc merged 2 commits into
mainfrom
docs/turbokv-m5-known-issue

Conversation

@solderzzc

Copy link
Copy Markdown
Member

README-only follow-up to #173. It adds a known-issue note for a --turbo-kv precision bug that shows up on the Apple M5 but not on the M6.

What happens

Qwen3.8-27B-4bit (VLM path), temperature 0. The prompt is n numbered lines (Line {i}: the quick brown fox jumps over the lazy dog.), then "How many lines are there? Answer briefly." The model only has to read the last line's index, so the test measures exact long-range recall.

lines (prompt tokens) M5 --turbo-kv M5 off M6 --turbo-kv M6 off
125 (2,036) "125" (2/2) – 3/3 ✓ 3/3 ✓
315 (5,266) "1,000" (2/2) "315" 3/3 ✓ 3/3 ✓
500 (8,411) "14" (2/2) "500" 3/3 ✓ 3/3 ✓
600 (10,111) "1,000" (2/2) – – –
700 (11,811) "1,000" (3/3) "700" (3/3) 3/3 ✓ 3/3 ✓

M5 data: the Mac M5 session, main 318f712. M6 data: this session, main 318f712 + #173. Identical prompt strings and token counts. On the M5 the error starts somewhere between ~2K and ~5K tokens. The likely cause is a GPU-family-dependent path in TurboKV's dequant or attention kernels. The note tells M5 users to avoid --turbo-kv when exact recall matters. The Mac M5 session will file the tracking issue.

🤖 Generated with Claude Code

Reproduced by the M5 session on main 318f712 with Qwen3.8-27B-4bit --vision at
temperature 0. Prompt: n numbered lines ("Line {i}: the quick brown fox jumps
over the lazy dog."), then "How many lines are there? Answer briefly."
With --turbo-kv on M5: 125 lines → "125", 315 → "1,000", 500 → "14",
600 → "1,000", 700 → "1,000" (all repeated 2–3×). Without --turbo-kv it answers
315 / 500 / 700 correctly. On the M6 the same prompts are 24/24 correct in both
modes, 2K–11.8K tokens. Points to a GPU-family-dependent TurboKV kernel path.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…eam-experts

- TurboKV-on-M5 note → tracking issue #175.
- --gpu-layers GPU timeout: reproduced on M5 as well as M6; tracked in #176
  with the fix in SharpAI/mlx-swift#17. CPU-resident MoE layers stay very slow
  after the fix (~0.4 tok/s prefill), so the note points 32 GB users at
  --stream-experts first.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@solderzzc
solderzzc merged commit 57e946d into main Sep 24, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant