mlx-bun 0.4.0 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (158) hide show
  1. package/README.md +57 -32
  2. package/docs/README.md +55 -42
  3. package/docs/archive/investigations/benchmark-ledger-through-v0.4.0.md +3617 -0
  4. package/docs/archive/planning/release-notes-v0.5.0.md +37 -0
  5. package/docs/design/batching.md +220 -7
  6. package/docs/design/decode-speed-program.md +121 -66
  7. package/docs/design/generic-model-support.md +116 -0
  8. package/docs/design/kv-cache.md +380 -211
  9. package/docs/design/speculative-decoding.md +165 -26
  10. package/docs/design/turboquant.md +20 -7
  11. package/docs/design/unified-engine-frontier-plan.md +120 -13
  12. package/docs/planning/PRODUCT_ROADMAP.md +5 -6
  13. package/docs/planning/public-readiness-handoff.md +244 -0
  14. package/docs/planning/public-readiness.md +149 -0
  15. package/docs/reference/benchmarks.md +3463 -3489
  16. package/docs/reference/cli.md +62 -1
  17. package/docs/reference/distribution.md +29 -4
  18. package/docs/reference/environment.md +104 -8
  19. package/docs/reference/library-api.md +18 -4
  20. package/docs/reference/memory.md +1 -1
  21. package/docs/reference/models.md +17 -5
  22. package/docs/reference/server-api.md +181 -11
  23. package/docs/reference/server-config.md +232 -105
  24. package/package.json +2 -2
  25. package/src/audio/audiotoolbox.ts +112 -0
  26. package/src/audio/conformer.ts +8 -0
  27. package/src/audio/mic-capture.ts +98 -0
  28. package/src/audio/silero-vad.ts +379 -0
  29. package/src/audio/whisper-decode.ts +774 -0
  30. package/src/audio/whisper-fast.ts +732 -0
  31. package/src/audio/whisper-format.ts +73 -0
  32. package/src/audio/whisper-mel.ts +185 -0
  33. package/src/audio/whisper-timing.ts +274 -0
  34. package/src/audio/whisper-tokenizer.ts +239 -0
  35. package/src/audio/whisper-transcribe.ts +410 -0
  36. package/src/backends/mlx/autoregressive.ts +22 -1
  37. package/src/backends/mlx/batch-group.ts +111 -27
  38. package/src/backends/mlx/cache-layout.ts +3 -3
  39. package/src/backends/mlx/continuation-persistence.ts +5 -4
  40. package/src/backends/mlx/encoder-cache.ts +25 -0
  41. package/src/backends/mlx/fill-append.ts +21 -8
  42. package/src/backends/mlx/fill-group.ts +497 -0
  43. package/src/backends/mlx/gateway-binding.ts +56 -12
  44. package/src/backends/mlx/kv-maintenance.ts +30 -2
  45. package/src/backends/mlx/mixed-iteration.ts +62 -0
  46. package/src/backends/mlx/model-prompt.ts +46 -32
  47. package/src/backends/mlx/model-serving.ts +4 -3
  48. package/src/backends/mlx/paged-cache-codec.ts +27 -0
  49. package/src/backends/mlx/prefill-cohort.ts +15 -4
  50. package/src/backends/mlx/prefill-policy.ts +26 -0
  51. package/src/backends/mlx/prefill-rows.ts +57 -13
  52. package/src/backends/mlx/prompt-input.ts +29 -0
  53. package/src/backends/mlx/qwen-prompt-input.ts +40 -0
  54. package/src/backends/mlx/request-state-policy.ts +18 -5
  55. package/src/backends/mlx/rollback.ts +6 -3
  56. package/src/backends/mlx/serial-executor.ts +16 -7
  57. package/src/backends/mlx/speculative-group.ts +105 -26
  58. package/src/backends/mlx/speculative.ts +24 -7
  59. package/src/backends/mlx/target-layout-capability.ts +1 -1
  60. package/src/backends/mlx/transitioning-kv-rows.ts +8 -0
  61. package/src/cli.ts +322 -0
  62. package/src/contracts/execution.ts +10 -0
  63. package/src/contracts/object-cache.ts +8 -0
  64. package/src/contracts/pi-provider.ts +1 -1
  65. package/src/contracts/pi.ts +3 -1
  66. package/src/contracts/prefix-cache.ts +13 -3
  67. package/src/contracts/scheduling.ts +9 -0
  68. package/src/engine/execution-plan.ts +23 -12
  69. package/src/engine/execution-tasks.ts +44 -0
  70. package/src/engine/namespaced-cache.ts +13 -0
  71. package/src/engine/scheduler.ts +22 -2
  72. package/src/fill/fill-session.ts +14 -3
  73. package/src/generate.ts +28 -22
  74. package/src/grammar.ts +13 -0
  75. package/src/inference/prefill.ts +6 -0
  76. package/src/kv-scheme.ts +22 -0
  77. package/src/kv-store.ts +115 -79
  78. package/src/lab/README.md +5 -1
  79. package/src/lab/paged-kv/paged-attention.ts +117 -0
  80. package/src/lab/paged-kv/paged-kv-rows.ts +33 -5
  81. package/src/lab/paged-kv/paged-kv.ts +108 -42
  82. package/src/md-modules.d.ts +5 -0
  83. package/src/mlx/array.ts +37 -0
  84. package/src/mlx/ffi.ts +19 -0
  85. package/src/mlx/normalized-argmax.ts +116 -0
  86. package/src/mlx/ops.ts +97 -10
  87. package/src/model/batched-turboquant-kv.ts +6 -5
  88. package/src/model/delayed-quantized-kv.ts +3 -3
  89. package/src/model/delayed-rotating-quantized-kv.ts +1 -1
  90. package/src/model/delayed-turboquant-kv.ts +6 -4
  91. package/src/model/factory.ts +26 -0
  92. package/src/model/fingerprint.ts +12 -0
  93. package/src/model/full-prefill-row.ts +1 -1
  94. package/src/model/gemma4-base.ts +25 -6
  95. package/src/model/gemma4.ts +82 -2
  96. package/src/model/kv-attention-view.ts +4 -1
  97. package/src/model/profile.ts +29 -4
  98. package/src/model/quantized-append-attention.ts +31 -0
  99. package/src/model/qwen3-mrope.ts +7 -9
  100. package/src/model/qwen3_5.ts +99 -37
  101. package/src/model/support.ts +8 -0
  102. package/src/model/token-groups.ts +66 -0
  103. package/src/model/trellis-linear.ts +2 -2
  104. package/src/model/turboquant-codec.ts +6 -0
  105. package/src/model/whisper.ts +435 -0
  106. package/src/native/mic_capture.swift +92 -0
  107. package/src/native-pack.ts +6 -5
  108. package/src/pi-web.ts +9 -1
  109. package/src/prompt-cache.ts +265 -43
  110. package/src/runtime-config.ts +1 -5
  111. package/src/safetensors.ts +9 -2
  112. package/src/sampler.ts +5 -4
  113. package/src/serve/audio-routes.ts +323 -0
  114. package/src/serve/chat-request.ts +2 -0
  115. package/src/serve/chat-stage.ts +17 -12
  116. package/src/serve/completion-executor.ts +9 -1
  117. package/src/serve/discovery-routes.ts +17 -1
  118. package/src/serve/generated-token-history.ts +57 -0
  119. package/src/serve/generation-gateway.ts +52 -11
  120. package/src/serve/model-binding.ts +7 -1
  121. package/src/serve/preparation.ts +3 -3
  122. package/src/serve/prompt-response-trace.ts +14 -0
  123. package/src/serve/request-plan.ts +2 -0
  124. package/src/serve/request-prep.ts +38 -21
  125. package/src/serve/transcription-server.ts +64 -0
  126. package/src/serve/transcription-service.ts +502 -0
  127. package/src/server.ts +132 -164
  128. package/src/spec/assistant-rows.ts +1 -0
  129. package/src/spec/deepspec-rows.ts +1 -1
  130. package/src/spec/dflash-source.ts +1 -1
  131. package/src/spec/glm52-mtp-source.ts +1 -0
  132. package/src/spec/ngram-source.ts +27 -5
  133. package/src/spec/projected-draft-rows.ts +2 -2
  134. package/src/spec/qwen-mtp-rows.ts +11 -0
  135. package/src/spec/qwen-mtp-source.ts +3 -0
  136. package/src/spec/serve-loop.ts +5 -3
  137. package/src/spec/source.ts +14 -1
  138. package/src/spec/two-model-rows.ts +1 -0
  139. package/src/spec/two-model.ts +2 -2
  140. package/src/ssd-cache.ts +76 -17
  141. package/src/ssd-durability.ts +20 -22
  142. package/src/storage/host-buffer.ts +24 -0
  143. package/src/storage/kv-writer.ts +83 -0
  144. package/src/storage/kv-writer.worker.js +264 -0
  145. package/src/storage/retention-policy.ts +37 -0
  146. package/src/tiered-prompt-cache.ts +45 -0
  147. package/src/vision/embedder.ts +8 -0
  148. package/src/vision/prompt.ts +101 -65
  149. package/src/vision/qwen3vl-prompt.ts +101 -64
  150. package/src/vision/qwen3vl-tower.ts +11 -0
  151. package/src/vision/siglip.ts +8 -0
  152. package/src/web/app.html +12 -0
  153. package/src/web/app.js +160 -0
  154. package/src/web/src/chat.ts +4 -1
  155. package/src/web/src/composer.ts +3 -0
  156. package/src/web/src/voice.ts +141 -0
  157. package/src/web/sw.js +1 -1
  158. /package/docs/{planning → archive/planning}/release-notes-v0.4.0.md +0 -0
@@ -0,0 +1,244 @@
1
+ # Public readiness — handoff (2026-09-11)
2
+
3
+ Task list and verified context for the outreach thread. The scope and
4
+ acceptance criteria for each milestone live in
5
+ [public-readiness.md](public-readiness.md); milestone state lives in
6
+ [PLAN.md](../../PLAN.md#public-readiness). This document says what was
7
+ verified today, what that changes, and what to do next, in order.
8
+
9
+ ## Update after handoff
10
+
11
+ The GPTQ report is filed as [mlx-lm #1878](https://github.com/ml-explore/mlx-lm/issues/1878).
12
+ The issue contains the complete runnable reproduction and proposed fix; the
13
+ local reproduction files have been removed. Independent-reference regression
14
+ coverage and upstream follow-up remain open. Presentation changes and GitHub
15
+ metadata are also complete on this branch. The sections below preserve the
16
+ review handoff as written; their original state labels predate this update.
17
+
18
+ ## What was verified today
19
+
20
+ **The listing target is stalled.** The mlx-framework.org "community" section
21
+ is a single link to [discussion #654](https://github.com/ml-explore/mlx/discussions/654);
22
+ there is no separate curated page. The pinned list in #654 was last edited
23
+ 2025-10-17. Every comment since March 2026 (at least 20, including two
24
+ projects named `mlx-serve`, `mlx-node`, `atlas`, `squish`, `mlx-chronos`,
25
+ `mlx-tsfm`) has no maintainer reply and none were added. Only `awni` or an
26
+ ml-explore member with write access can edit that post.
27
+
28
+ **Awni Hannun no longer maintains MLX.** He left Apple in February 2026 (last
29
+ `ml-explore/mlx` commit 2026-02-24) and is at Anthropic. He still comments on
30
+ mlx-lm issues occasionally (last seen 2026-08-24) but is not the person who
31
+ will act on a listing request. Named successors: Angelos Katharopoulos
32
+ (`angeloskath`), Cheng Zhao (`zcbenz`), Jagrit Digani (`jagrit06`),
33
+ Anastasiia Filippova (`nastya236`), Ronan Collobert. Recent mlx-lm committers:
34
+ `michalk8`, `zcbenz`, `angeloskath`.
35
+
36
+ **The GPTQ bug is live upstream and unreported.** `mlx_lm/quant/gptq.py`
37
+ on `main` (1b3594b, 2026-09-09) still contains both defects at lines 126–127:
38
+ the `k : k + j` window that propagates past the block edge, and
39
+ `err[..., k : k + 1]` indexing a group-local buffer with a global column
40
+ index (a silent no-op for every block after the first). Issue search for
41
+ `gptq` in ml-explore/mlx-lm returns only perf/memory reports (#1094, #1098,
42
+ #1122). The reproduction is included in [mlx-lm #1878](https://github.com/ml-explore/mlx-lm/issues/1878).
43
+
44
+ **The category is crowded.** Already in the #654 thread: `mlx-serve`
45
+ (ddalcu, Zig, no Python, Gemma 4 + Qwen 3.x, MTP, TurboQuant KV, OpenAI +
46
+ Anthropic APIs), `mlx-serve` (raspoli), `mlx-node` (Node.js inference and
47
+ training APIs), `mlx-omni-server`, `squish`. "No Python OpenAI-compatible
48
+ server" is not a differentiator. "TypeScript library" needs a comparison
49
+ with `mlx-node` before it is claimed as one.
50
+
51
+ **Other places a project actually gets listed.** `raullenchai/awesome-mlx`
52
+ (466 stars, last push 2026-04-11) accepts PRs. `igurss/mlx-chronos` (last
53
+ push 2026-08-22) is a benchmark suite and leaderboard for MLX inference
54
+ engines with reproducible JSON submissions.
55
+
56
+ ## What this changes
57
+
58
+ - A #654 comment is the last step and should be expected to sit. The
59
+ outcomes that are actually reachable, in order of value: a merged or
60
+ acknowledged upstream fix; a Show-and-tell post that a current maintainer
61
+ replies to; an `awesome-mlx` PR; an `mlx-chronos` submission; and, if any
62
+ of those produce a conversation with a maintainer, the listing ask goes in
63
+ that thread rather than into the #654 pile.
64
+ - Outreach copy should not be written for Awni. It should be written for
65
+ `angeloskath`/`zcbenz`-style readers: correctness first, measured numbers
66
+ with machine labels, an upstream contribution in hand, no digs at mlx-lm.
67
+ - The first-impression fixes matter more, not less: a maintainer visit will
68
+ be rare and there is one chance at it.
69
+
70
+ ## State of the work (working tree, this branch)
71
+
72
+ Done or in flight in the uncommitted diff on `chore/public-readiness`:
73
+
74
+ - `docs/planning/public-readiness.md` rewritten as P0–P5; PLAN block updated.
75
+ - `docs/reference/benchmarks.md` restructured: parity table first, latest
76
+ h2h second; campaign ledger moved to
77
+ `docs/archive/investigations/benchmark-ledger-through-v0.4.0.md`.
78
+ - README lead paragraph narrowed to library + server; STATUS/PLAN link
79
+ removed from the README table.
80
+ - `lab/repro/mlx-lm-gptq-block-indexing/repro.py` written (CPU-only, no
81
+ weights; asserts the installed source matches, runs original vs corrected).
82
+ - `docs/reference/models.md` edited (roster/evidence reconciliation, partial).
83
+
84
+ Not started: oracle setup script and lock (P2), package ownership map (P3),
85
+ tarball/first-run/library-consumer verification and GitHub metadata (P4),
86
+ every outreach draft (P5).
87
+
88
+ ## Tasks, in order
89
+
90
+ Each task names its owner: **agent** (can be done in a session), **Josh**
91
+ (needs approval, an account, a server, or a download). Session rules apply:
92
+ no long-running servers or multi-GB downloads from a session.
93
+
94
+ ### T1 — Upstream GPTQ report (P0) — agent drafts, Josh submits
95
+
96
+ Filed 2026-09-11 as [mlx-lm #1878](https://github.com/ml-explore/mlx-lm/issues/1878)
97
+ (both defects, CPU-only fixture, observed result on 0.31.3 and upstream
98
+ `e5962529`, proposed two-line patch). Recorded in
99
+ [turboquant.md](../design/turboquant.md) and `scripts/turboquant/tq-gptq.py`.
100
+
101
+ Fix open as [mlx-lm PR #1880](https://github.com/ml-explore/mlx-lm/pull/1880)
102
+ from `joshuarossi/mlx-lm:fix-gptq-block-indexing` (`d4d38d9`): the two-line
103
+ change in `mlx_lm/quant/gptq.py` plus `tests/test_gptq.py`, which compares
104
+ `gptq_quantize` against a column-by-column reference (paper form, no lazy
105
+ block update) over four groups, with a single-group control. On upstream
106
+ `e596252` the multi-group test fails (max abs dequantized diff 0.38) and the
107
+ control passes; on the branch both pass. black 25.1.0 / isort 6.0.0 / ruff
108
+ 0.16.6 clean. The issue body was rewritten in Josh's words and the PR
109
+ description discloses AI-drafted code, per mlx-lm's CONTRIBUTING.md.
110
+
111
+ Remaining: **follow up.** Check the PR for maintainer questions every few
112
+ days; answer with test output, not prose (Josh writes the replies; the
113
+ policy covers comments too). Record the outcome (merged, changed,
114
+ declined) in turboquant.md.
115
+
116
+ Acceptance: any maintainer question answered; outcome recorded.
117
+
118
+ ### T2 — Finish the internal-voice scrub (P1) — agent
119
+
120
+ Current counts in public entry points (`rg -c "Josh"`): STATUS.md 4,
121
+ `docs/reference/environment.md` 3. `benchmarks.md` is clean after the
122
+ restructure; check the archive ledger is linked, not rendered by the site.
123
+ Also grep the website source and every `docs/reference/*.md` for
124
+ `authorized`, `diagnostic mode`, `machine policy`, `Josh requested`,
125
+ `per Josh` and rewrite as technical conditions (keep the CPU/swap/memory
126
+ facts, drop the approval framing). Do not touch `PLAN.md`/design docs for
127
+ this; they are internal by design and no longer linked from the README.
128
+
129
+ Acceptance: the greps return zero in README, STATUS, CONTRIBUTING,
130
+ `docs/reference/*`, `website/src/**`; `bun scripts/check-hygiene.ts` passes.
131
+
132
+ ### T3 — Fix the site claims (P1) — agent
133
+
134
+ `website/src/content/docs/index.mdx` "Why it's different" and the numbers
135
+ table:
136
+
137
+ - "Fastest to first token … of any stack tested" → "vs `mlx_lm.server` and
138
+ optiq serve" and state that it is server overhead at warm cache, not
139
+ model speed.
140
+ - Remove "no segfaults on exit".
141
+ - "bit-exact to the Python reference" → "bit-exact logits vs mlx-lm on the
142
+ validated configurations (link to the parity table)".
143
+ - Reduce the eight feature cards to library, server/API, correctness,
144
+ measured performance; fold memory/curves/training/diffusion into one
145
+ "also in the box" line.
146
+ - First-run model: the site shows `MiniCPM5-1B` (index.mdx:24,
147
+ quickstart.md:16, installation.mdx:81); `DEFAULT_REPO_ID` in `src/fit.ts:88`
148
+ is the 7 GB e4b. Pick one and make code, README and site agree.
149
+
150
+ Acceptance: `bun run --cwd website build` passes; a narrow-viewport check
151
+ of the landing page; `tests/docs-surface.test.ts` passes.
152
+
153
+ ### T4 — Roster vs parity evidence (P1) — agent
154
+
155
+ `models.md` labels Qwen3.5-4B, Qwen3.8-27B and eleven Tier-0 archs L1;
156
+ the parity table in `benchmarks.md` lists four Gemma/MiniCPM rows. For each
157
+ L1 row, either add the artifact + test file to the parity table (the Qwen
158
+ oracle cases and universal goldens exist under `tests/parity/` and
159
+ `scripts/oracle/gen-universal-golden.py`) or mark the row "family-supported,
160
+ artifact-unvalidated" in the roster. No row may claim L1 without a named
161
+ test.
162
+
163
+ Acceptance: every L1 in `models.md` resolves to a row in `benchmarks.md §1`.
164
+
165
+ ### T5 — Reproducible oracle (P2) — agent builds, Josh runs the clean check
166
+
167
+ 1. Add a new `setup.sh` under `scripts/oracle/` (plus a committed lock, pip
168
+ freeze or `uv` lock) that recreates the pinned venv anywhere and prints
169
+ the `MLX_BUN_ORACLE_VENV=` line. Until the file exists, do not write its
170
+ full path into a live doc: hygiene check 7 fails on script paths that do
171
+ not exist, and `public-readiness.md` P2 currently trips it. Pins come from
172
+ [environment.md](../reference/environment.md) (mlx 0.32.2, mlx-metal
173
+ 0.32.2, mlx-lm 0.31.3, Python 3.13.5).
174
+ 2. Document one command chain that ends in a real pass, not a skip:
175
+ setup → `mlx-bun get MiniCPM5` (sub-GB) → regen the MiniCPM goldens with
176
+ `scripts/regen/minicpm5.ts` → `bun test tests/parity/minicpm5-parity.test.ts`.
177
+ Make the test fail loudly when goldens or venv are missing.
178
+ 3. Explain, in that section, machine-layered goldens and the fast-SDPA
179
+ dispatch boundary (L ≥ 16) so a reader on another Mac knows why their
180
+ binary goldens differ from the tracked manifest.
181
+ 4. Josh: run the chain on the other dev box from a clean checkout and record
182
+ wall time. Do not print a duration in docs until this run supports it.
183
+
184
+ Acceptance: the chain passes on a machine that never had Josh's venv path.
185
+
186
+ ### T6 — Package ownership map (P3) — agent
187
+
188
+ Produce the dependency map the milestone asks for
189
+ (`reports/public-readiness/` already has source-import and dry-run
190
+ reports): which `src/` roots the `mlx-bun`, `mlx-bun/engine`, `mlx-bun/client`
191
+ exports reach, which runtime deps and native assets each needs, and what
192
+ the CLI/server/app layers add. Recommend keep-as-is or extract, with the
193
+ reason. Compare against `mlx-node`'s packaging while doing it, since that is
194
+ the closest JS-side comparison and the pitch depends on the difference.
195
+
196
+ Acceptance: the map and decision recorded in engine architecture §12.15;
197
+ no code move unless justified in that record.
198
+
199
+ ### T7 — Candidate, tarball, metadata (P4) — agent prepares, Josh verifies
200
+
201
+ - `bun pm pack --dry-run` and inspect: no `reports/`, `runs/`, goldens
202
+ blobs, or research output; `bin`, `src`, `docs` present.
203
+ - GitHub repo settings (currently empty): description, homepage
204
+ `https://mlx-bun.dev`, topics `mlx apple-silicon bun llm metal
205
+ openai-compatible`. `gh repo edit joshuarossi/mlx-bun --description ...
206
+ --homepage ... --add-topic ...`.
207
+ - Josh, on a clean user account or fresh machine: `curl … | sh`, first
208
+ `mlx-bun serve`, browser chat, one streaming request, one `openai` SDK
209
+ call, one library consumer importing `mlx-bun/engine`. Record what broke.
210
+
211
+ Acceptance: as written in public-readiness.md P4.
212
+
213
+ ### T8 — Outreach drafts (P5) — agent drafts, Josh posts
214
+
215
+ Write all four before posting any, so they agree:
216
+
217
+ 1. **Discord intro** (MLX Community, verify channel first): three
218
+ sentences, the parity command from T5, one ask ("does the TypeScript
219
+ integration make sense to you; what would you want from the library
220
+ API"). No numbers without a machine label.
221
+ 2. **Show and tell** post on ml-explore/mlx: what it is, how to reproduce
222
+ the parity claim, the h2h table with losses, the upstream GPTQ PR link,
223
+ known limits, the model roster. This is the artifact a maintainer might
224
+ actually read.
225
+ 3. **awesome-mlx PR** and an **mlx-chronos** submission (check the
226
+ submission format in that repo; our `bench-serve.ts` output may map to
227
+ it).
228
+ 4. **#654 comment**: the one-line sentence already drafted in
229
+ public-readiness.md P5.
230
+
231
+ Post order: T1's upstream PR → Discord → Show and tell → awesome-mlx /
232
+ chronos → #654. If a maintainer replies anywhere, ask for the #654 add in
233
+ that reply.
234
+
235
+ ## Do not
236
+
237
+ - Do not write copy aimed at Awni or predict Apple's reaction.
238
+ - Do not compare against mlx-lm without the machine, artifact and settings
239
+ on the same line as the number.
240
+ - Do not claim family-wide bit-exactness; claim it per validated artifact.
241
+ - Do not start servers or multi-GB downloads from a session for T5/T7.
242
+ - Do not touch `PLAN.md`, `public-readiness.md`, `benchmarks.md`, `README.md`
243
+ or `models.md` in this tree without checking `git status` first; another
244
+ session was editing them on 2026-09-11.
@@ -0,0 +1,149 @@
1
+ # Preparing mlx-bun for the MLX community
2
+
3
+ Success means that a curious developer can understand the project, reproduce
4
+ its numerical claims, and build something with it. The listing is a discovery
5
+ link; the repository and working examples have to earn further attention.
6
+
7
+ The public pitch is MLX inference as a TypeScript/Bun library, with a signed
8
+ executable serving OpenAI/Anthropic-compatible APIs. Correctness claims name
9
+ the tested artifact and configuration. Specialized kernels, quantization,
10
+ and reusable cache state support that product; ancillary applications do not
11
+ need equal space in the introduction.
12
+
13
+ Open milestones live in [PLAN.md](../../PLAN.md#public-readiness).
14
+ Numbers belong in [benchmarks.md](../reference/benchmarks.md), with historical
15
+ experiments in its linked ledger. Package decisions belong in the
16
+ [engine architecture](../design/unified-engine-frontier-plan.md#1215-package-boundaries-before-community-outreach).
17
+
18
+ ## P0. Contribute the GPTQ finding upstream
19
+
20
+ Check the reported indexing errors against a pinned upstream revision and
21
+ search existing issues and pull requests before filing. Produce a minimal
22
+ CPU-only reproduction that needs no model download. Demonstrate both the
23
+ out-of-block update window and the global index into a block-local error
24
+ buffer; a one-line fix is not enough. Keep the report about the numerical bug,
25
+ with a proposed patch and a useful regression test.
26
+
27
+ Acceptance: the reproduction runs against the cited revision, a reviewed
28
+ issue or pull request is submitted when authorized, and the discussion is
29
+ followed up. Upstream acceptance is not required to proceed with community
30
+ feedback. Submitted as [mlx-lm #1878](https://github.com/ml-explore/mlx-lm/issues/1878) with the complete CPU-only
31
+ reproduction, observed results and proposed two-line correction. Follow-up
32
+ and an independent-reference regression test remain open.
33
+
34
+ ## P1. Make the first visit clear and credible
35
+
36
+ Remove session-specific instructions, personal approvals, and handoff prose
37
+ from README, STATUS, model/configuration references, benchmarks, and pages
38
+ rendered by the website. Preserve observed CPU, swap, memory, artifact, and
39
+ sampling conditions as technical facts. Do not turn diagnostic measurements
40
+ into controlled experiments by removing their qualifications.
41
+
42
+ The benchmark reference should open with its parity summary, then the latest
43
+ standard head-to-head with wins and losses, then reproduction instructions.
44
+ Move historical campaign details into a linked ledger and preserve old
45
+ section links. Map every roster row claiming L1 to a concrete artifact and
46
+ test, or explicitly describe the remaining evidence gap. Family support does
47
+ not establish parity for every checkpoint or modality.
48
+
49
+ Lead the README and site with the library and server. Link to contribution
50
+ instructions instead of internal work tracking from the main README. Keep
51
+ secondary applications in a short, separate line. Distinguish the first-run
52
+ starter from the preferred model used once suitable weights are available.
53
+
54
+ Acceptance: the public wording agrees with the implementation; no personal
55
+ approval language remains in these public entry points; local links and the
56
+ website build pass; desktop and narrow-screen presentation are reviewed.
57
+ The claims about numerical agreement remain bounded by recorded evidence.
58
+
59
+ ## P2. Make correctness independently reproducible
60
+
61
+ Implemented: [pinned setup and MiniCPM comparison](../reference/environment.md#reproduce-the-minicpm5-logit-comparison).
62
+ A clean source export, new oracle environment and empty model cache pass on
63
+ M1 Max with 100 exact vectors and tokens. Missing inputs fail explicitly.
64
+ Complete per-roster artifact/run provenance remains open.
65
+
66
+ Provide `setup.sh` under `scripts/oracle/` and a committed dependency lock for the
67
+ reference environment. Select it through `MLX_BUN_ORACLE_VENV`; no contributor
68
+ should need the maintainer's directory layout. Pin the native MLX/Metal build,
69
+ Python dependencies, model revision, tokenizer/template inputs, and oracle
70
+ fixture-generation command. Explain the machine-specific fixtures and the
71
+ attention-dispatch boundary that makes another Mac's binary goldens unsuitable.
72
+
73
+ Publish a small-model recipe ending in the MiniCPM parity test. It must create
74
+ fixtures from the Python oracle and fail clearly on missing inputs, rather
75
+ than reporting skipped tests as success. Measure the setup and test duration;
76
+ do not promise ten minutes until a clean-machine run supports it. Explain
77
+ what is compared before sampling and which execution shapes are tested.
78
+
79
+ Acceptance: a clean checkout can install the pinned reference, obtain the
80
+ specified artifact, regenerate its own oracle fixtures, and run a documented
81
+ logit comparison. Publish enough provenance for each summary table row to be
82
+ traceable. Existing accepted checks do not need wholesale reruns; this work
83
+ checks whether an outsider can reproduce them.
84
+
85
+ ## P3. Settle package ownership
86
+
87
+ Map imports, public APIs, dependencies, native assets, builds, tests and
88
+ release packaging. Distinguish the reusable engine from HTTP/CLI assembly
89
+ and applications. Decide whether workspaces improve independent installation
90
+ and development enough to introduce them before outreach.
91
+
92
+ Keep `mlx-bun`, `mlx-bun/engine`, and `mlx-bun/client` imports compatible.
93
+ Preserve in-process execution, specialized kernels, tensor ownership and the
94
+ self-contained executable. Interfaces do not each need their own package.
95
+ No package extraction should add transport hops or copies in the decode path.
96
+
97
+ Acceptance: record and implement justified pre-outreach moves, or document
98
+ which internal moves can safely follow later. Test an installed consumer and
99
+ bundled assets when extraction changes them. Postponing the decision without
100
+ a dependency map does not complete this milestone.
101
+
102
+ ## P4. Verify the candidate and its presentation
103
+
104
+ Inspect the npm tarball and release bundle. Keep runtime assets complete and
105
+ exclude accidental research output. Check first-run chat, streaming, model
106
+ selection, a small library consumer, and actionable errors against the
107
+ candidate artifact. Reuse release and benchmark evidence where code and
108
+ configuration have not changed. Default memory guidance remains advisory.
109
+
110
+ Prepare a short demonstration and evidence bundle. Set an accurate GitHub
111
+ repository description, homepage and topics: `mlx`, `apple-silicon`, `bun`,
112
+ `llm`, `metal`. Verify that the intended release is easy to find; use the
113
+ available GitHub release/highlight controls without promising a nonexistent
114
+ pinning feature. Include straightforward issue reporting and contributor setup.
115
+
116
+ Acceptance: the installed candidate and demo work as documented, repository
117
+ metadata matches the pitch, and every public performance claim points to its
118
+ machine and workload. Persistent servers and large downloads follow the
119
+ repository's existing session rules.
120
+
121
+ ## P5. Engage, then request the listing
122
+
123
+ Order: upstream GPTQ report, Discord introduction, GitHub Show and tell,
124
+ then the community-project comment. Verify current venue instructions before
125
+ posting. The [MLX Community Discord invite](https://discord.gg/wXk8tEqAcG)
126
+ is a starting point to verify, not evidence about audience size or reception.
127
+
128
+ Ask for feedback on the library integration and reproducible correctness
129
+ comparison. Credit MLX, mlx-c, mlx-lm and mlx-optiq accurately. Treat rotation
130
+ and trellis findings as a separate technical discussion with their quality
131
+ tradeoffs; do not imply that all quantization methods preserve L1 numerics.
132
+
133
+ The [Show and tell category](https://github.com/ml-explore/mlx/discussions/categories/show-and-tell)
134
+ provides a durable, searchable introduction containing the example,
135
+ reproduction steps, known limits and upstream contribution. Incorporate
136
+ Discord feedback before preparing that post. Then follow the instructions in
137
+ [community-project discussion #654](https://github.com/ml-explore/mlx/discussions/654).
138
+
139
+ Draft listing sentence, for review:
140
+
141
+ > [mlx-bun](https://github.com/joshuarossi/mlx-bun) brings MLX inference to TypeScript/Bun applications and ships a signed executable serving OpenAI/Anthropic-compatible APIs on Apple Silicon, with bit-exact logit tests against mlx-lm for validated configurations.
142
+
143
+ The listing sentence deliberately omits an unqualified family-wide parity
144
+ claim. Add the reproducible example and coverage link to the Show-and-tell
145
+ post, where readers can inspect the precise scope.
146
+
147
+ Acceptance: review the concrete drafts, post when authorized, triage feedback,
148
+ and submit the listing comment. Website placement and maintainer enthusiasm
149
+ are external outcomes, not completion promises. Hacker News comes later.