chore(libs): inherit upstream MLX — bump mlx-swift / mlx-swift-lm pins to combined inherited+instrumented heads#459
Conversation
…nted heads Adopts the combined heads of the two fork inheritance PRs, which now also carry the d-inference#451 measurement-only instrumentation (each branch merged its fork's `main`): libs/mlx-swift 3c50ad69 -> e20ea3dd (Layr-Labs/mlx-swift#7) libs/mlx-swift-lm 2b4b0d8d -> 48313a08 (Layr-Labs/mlx-swift-lm#50) Both moves are a clean forward: the old master pin is a strict ancestor of the new head (`git merge-base --is-ancestor` passes), so no EvalProbe / EngineCore instrumentation is reverted. Re-validated: provider-swift builds clean, 1064 tests / 74 suites green, live GPT-OSS-20B + Gemma-4-26B (batched, VLM, tool-calling) produce coherent output. Co-authored-by: Cursor <cursoragent@cursor.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
ethenotethan
left a comment
There was a problem hiding this comment.
Automated Code Review — Layr-Labs/d-inference#
Verdict: COMMENT
Security — ✅ No issues found
Performance — ✅ No issues found
Type_diligence — ✅ No issues found
Additive_complexity — ✅ No issues found
✅ All four passes clean. No issues found.
🤖 Automated review by Centaur · DAR-186
|
No threat-model-covered files were changed; however, the updated submodules touch the innermost trust boundary (TB-007) and warrant a brief inspection note. Trust boundaries touched
Threat relevanceNeither file is listed in the threat model, so no T-xxx finding changes state. That said:
New attack surface not covered by an existing threatThe submodule diff itself is not included here, so the following flags are conditional on what the bump actually changes:
RecommendationAdd 🔐 Threat model: |
Summary
Capstone of the "inherit upstream MLX" effort. Bumps the two d-inference submodule pins to the combined heads of the fork inheritance PRs, which now also carry the measurement-only instrumentation that landed on
mastervia d-inference#451:master)libs/mlx-swift3c50ad69e20ea3ddlibs/mlx-swift-lm2b4b0d8d48313a08Why this isn't a naive pin bump
masteralready advanced both pins past the bases the inheritance branches were cut from (via #451's EvalProbe / EngineCore instrumentation), so the two histories diverged:libs/mlx-swift:master=ac67822+ 3 EvalProbe commits (3c50ad69); branch =ac67822+ 2 inheritance commits.libs/mlx-swift-lm:master=8a9bc7c+ 1 EngineCore idle-clear marker (2b4b0d8d); branch =8a9bc7c+ 29 inheritance commits.A straight bump to the old branch heads would have reverted the instrumentation. Instead, each inheritance branch merged its fork's
main(which carries the instrumentation), producing a head that is a strict superset of the master pin:Both checks pass → no instrumentation is reverted. This is a clean forward move that layers the inherited upstream fixes on top of everything already on
master.The merges were conflict-free:
MLXArray.swiftauto-merged — EvalProbe bracketseval()(theirs); the inheritance fix wrapsdescription/tostringinevalLock(ours) — disjoint regions.EngineCore.swiftchanged (theirs); none of the 29 inheritance commits touch it. All crown jewels preserved (continuous batching, DAR-325 KV fix, KV-quant, MTP, batched Gemma4, fast-follow fp32 gated-delta dedupe).Re-validation (against the combined tree)
swift buildclean formlx-swift,mlx-swift-lm, andprovider-swift.provider-swiftswift test: 1064 tests / 74 suites passed, 0 failures (9 live-MLX tests are env-gated and self-skip).mlx-community/gpt-oss-20b-MXFP4-Q8,compile()path): coherent —Average speed = 60 mi ÷ 1.5 h = **40 mph**, reasoning_tokens=78 / completion=114.mlx-community/gemma-4-26b-a4b-it-8bit): batched B=2 vs single-stream parity, arithmetic7*8 = 56, and a clean multi-turn tool callrun_terminal(command: cat hello.txt).mlx-community/gemma-4-26B-A4B-it-qat-4bit): mixed-length batched decode with no degenerate repetition — coherent.Before / After
flowchart TB subgraph Before["BEFORE - master @ 80ce2574"] direction TB M0["d-inference master"] -->|gitlink| S0a["libs/mlx-swift @ 3c50ad69<br/>(ac67822 + EvalProbe x3, #451)"] M0 -->|gitlink| S0b["libs/mlx-swift-lm @ 2b4b0d8d<br/>(8a9bc7c + EngineCore marker, #451)"] S0a --> B0["provider-swift builds/serves<br/>instrumentation ONLY<br/>(no inherited upstream fixes)"] S0b --> B0 end subgraph After["AFTER - this PR @ 772ff499"] direction TB M1["d-inference master + 1 commit"] -->|gitlink| S1a["libs/mlx-swift @ e20ea3dd<br/>= merge(branch #7 + main)<br/>EvalProbe AND evalLock/compile fixes"] M1 -->|gitlink| S1b["libs/mlx-swift-lm @ 48313a08<br/>= merge(branch #50 + main)<br/>EngineCore marker AND 29 inherited fixes"] S1a --> B1["provider-swift builds/serves<br/>instrumentation AND inherited fixes<br/>1064/74 green - live GPT-OSS + Gemma4 coherent"] S1b --> B1 end Before -.->|"2 gitlink moves only<br/>strict superset - nothing reverted"| AfterWhat this PR changes
Exactly two gitlink updates (160000 mode) — no source changes:
Merge ordering
This superproject pin depends on the two fork PRs. Land mlx-swift#7 and mlx-swift-lm#50 first (in a way that keeps
e20ea3dd/48313a08reachable on each fork'smain). If either fork PR squash-merges to a new SHA, re-point the corresponding gitlink here before merging this PR.Three-PR set: this PR + mlx-swift#7 + mlx-swift-lm#50.
Need help on this PR? Tag
/codesmithwith what you need. Autofix is disabled.