Repository navigation
chore(submodules): bump mlx-swift and mlx-swift-lm to Layr-Labs main - #206
Conversation
mlx-swift: 49d73abc -> 5202134c (+4 commits) - Expose Cmlx product + enable jaccl distributed backend (PR #2) - ParallelFileReader batch_size 32 MiB -> 128 MiB (PR #1) mlx-swift-lm: 8d1cbcd8 -> d164323f (+38 commits) - PR #7: omlx-continuous-batching (BatchedEngine, vLLM-inspired scheduler) - PR #10: MTP speculative decoding (Qwen3.5, Gemma 4, DeepSeek-V4) - PR #19: parallel stacked shard loading - PR #20: Gemma 4 chat templates + tool calls fix API surface used by provider-swift (ModelContainer, LLMModelFactory, BatchGenerator, GenerationBatchResponse, RowSampler, makeRowSampler, LanguageModel, Tokenizer, BatchKVCache, Generation, GenerateStopReason, UserInput, GenerateParameters) is unchanged. All new work in mlx-swift-lm is additive (MTP, DeepSeek-V4, BatchedEngine, parallel shard loading). Notes on the dependency graph: - mlx-swift-lm main switched its mlx-swift dep from path to URL (Layr-Labs/mlx-swift#main). SPM identity resolution gives root-package path deps priority, so libs/mlx-swift remains the source of truth (verified via swift package show-dependencies). - mlx-swift-lm main added hummingbird >= 2.0.0 and swift-transformers >= 1.3.2 for its new mlx-server target. Both compatible with provider-swift's existing pins (hummingbird exact 2.22.0, swift-transformers from 1.3.0). Verification: - swift build: clean (only pre-existing MLX.GPU.* -> Memory.* deprecation warnings; deprecations existed at 49d73abc as well). - swift test: 207 tests / 18 suites pass in 3.1s. Live MLX tests (DARKBLOOM_LIVE_MLX_TESTS=1) still need to be exercised against prod models before merge -- recommended: ContinuousBatchingLiveTests on Qwen3 and a Gemma 4 end-to-end run (chat template + tool-call behavior changed in PR #20). Behavioral note: GenerationBatch.step() now auto-activates an MTP fast path for MTPCapable models at batchSize == 1. No production catalog model implements MTPCapable today, so prod impact is none.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Benchmark ResultsRunner: 1-provider-streaming1 providers, 1 users, 30 requests, concurrency=5, streaming=true
Latency Decomposition
Assertion Report: PASS
1-provider-non-streaming1 providers, 1 users, 20 requests, concurrency=5, streaming=false
Latency Decomposition
Assertion Report: PASS
7-provider-multi-model7 providers, 5 users, 50 requests, concurrency=10, streaming=true
Latency Decomposition
Assertion Report: PASS
3-provider-high-concurrency3 providers, 10 users, 60 requests, concurrency=20, streaming=true
Latency Decomposition
Assertion Report: PASS
1-provider-queue-saturation1 providers, 10 users, 40 requests, concurrency=15, streaming=true
Latency Decomposition
Assertion Report: PASS
3-provider-20-users3 providers, 20 users, 60 requests, concurrency=10, streaming=true
Latency Decomposition
Assertion Report: PASS
1-provider-scaling1 providers, 5 users, 30 requests, concurrency=10, streaming=true
Latency Decomposition
Assertion Report: PASS
3-provider-scaling3 providers, 5 users, 30 requests, concurrency=10, streaming=true
Latency Decomposition
Assertion Report: PASS
5-provider-scaling5 providers, 5 users, 30 requests, concurrency=10, streaming=true
Latency Decomposition
Assertion Report: PASS
3-provider-heavy-100conc-10kb3 providers, 20 users, 100 requests, concurrency=100, streaming=true
Latency Decomposition
Assertion Report: FAIL
|
… MTP (#1282) * perf(mimo): default-on decode kernels and target-only adaptive serial MTP Pin mlx-swift-lm to the stack that enables the exact MiMo short-forward decode kernels by default and adds `CBv2MTPConfig.allowsAdaptiveSerialRounds`. - Forward the three kernel rollbacks (`DARKBLOOM_MIMO_FUSED_DECODE_NORMS`, `DARKBLOOM_MIMO_DECODE_EXPERTS`, `DARKBLOOM_MIMO_DECODE_ROUTER_GEMV`, `0`/`false`/`no`/`off`) to the launchd provider job, so an installed provider can restore the stock path. - Build every native MiMo MTP config through `nativeMiMoMTPConfig`, which keeps adaptive plans target-only under serial-target scoring. Each serial draft column costs one ordinary target forward, so those rounds could only slow decode (25-27 tok/s when the controller locked onto depth 3). MTP stays constructed and active with live assistant history; the rectangular opt-in keeps adaptive depth. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * chore(mimo): pin mlx-swift-lm main 1ee8675a mlx-swift-lm main now contains #206, #207 and #219 (landed through #246) and #245. Pin it instead of the stacked SDK branch commit. The pinned tree is identical to the SDK validated with this stack. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: jonathan308 <5055076+jonathan308@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…for reuse (#1299) * fix(mimo): reuse SSD prefix-cache hits and report cached tokens only for reuse Every native MiMo V2.6 SSD prefix-cache hit was discarded. The bridge stages a checkpoint under a placeholder engine request ID and mints the real ID just before submit; the SDK's native import check compared engine IDs, so each staged checkpoint was refused (`unsupportedConsumer`). The request prefilled its whole prompt again and the coordinator received a skipped lookup. - Pin mlx-swift-lm to the receipt-bound native stage check. - EngineV2RequestUsageSignal: client-facing cached tokens (standalone usage and the provider SSE splice) now count only an actual hit. A matched checkpoint whose adoption failed or was skipped used to report its matched tokens, which hid this bug locally. Coordinator usage already came from the resolved lookup and is unchanged. Tests: the native MiMo complete-prefix gate gains a bridge-level repeat (`testNativeCompletePrefixONReusesThePublishedBoundaryThroughTheBridge`): the second submission of the same prompt must adopt the published boundary with a resolved hit, saved prefill and byte-identical text. The existing gates only checked that the first submission published. PrefixCacheReceiptTests pins the cached-token report for a failed adoption. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * chore(mimo): pin mlx-swift-lm main 1ee8675a mlx-swift-lm main now contains #206, #207 and #219 (landed through #246) and #245. Pin it instead of the stacked SDK branch commit. The pinned tree is identical to the SDK validated with this stack. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: jonathan308 <5055076+jonathan308@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* perf(mimo): default-on decode kernels and target-only adaptive serial MTP Pin mlx-swift-lm to the stack that enables the exact MiMo short-forward decode kernels by default and adds `CBv2MTPConfig.allowsAdaptiveSerialRounds`. - Forward the three kernel rollbacks (`DARKBLOOM_MIMO_FUSED_DECODE_NORMS`, `DARKBLOOM_MIMO_DECODE_EXPERTS`, `DARKBLOOM_MIMO_DECODE_ROUTER_GEMV`, `0`/`false`/`no`/`off`) to the launchd provider job, so an installed provider can restore the stock path. - Build every native MiMo MTP config through `nativeMiMoMTPConfig`, which keeps adaptive plans target-only under serial-target scoring. Each serial draft column costs one ordinary target forward, so those rounds could only slow decode (25-27 tok/s when the controller locked onto depth 3). MTP stays constructed and active with live assistant history; the rectangular opt-in keeps adaptive depth. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * perf(mimo): exact rectangular MTP verification by default Pin mlx-swift-lm to the exact rectangular verification stack (row-exact multi-row affine projection, fused norms inside the scalar-dense verifier, scalar-dense default with a guard against drafting through the bulk trunk). - `nativeMiMoVerificationMode` selects rectangular verification by default. A rollback of `DARKBLOOM_MIMO_RECTANGULAR_VERIFY` or of the SDK's scalar-dense switch selects serial-target scoring; the provider never selects the bulk rectangular trunk, whose reductions differ from serial decode. - The native paged profile keeps serial-target MTP independently of the contiguous default. - LaunchAgent forwards the three verification rollbacks. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * chore(mimo): pin mlx-swift-lm main 1ee8675a mlx-swift-lm main now contains #206, #207 and #219 (landed through #246) and #245. Pin it instead of the stacked SDK branch commit. The pinned tree is identical to the SDK validated with this stack. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: jonathan308 <5055076+jonathan308@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Summary
Bumps the two MLX Swift submodules from old branches to current Layr-Labs main:
mlx-swift highlights (+4)
mlx-swift-lm highlights (+38)
Compatibility
API surface used by provider-swift is unchanged. A sub-agent audit walked every symbol provider-swift consumes from `MLXLLM` and `MLXLMCommon` (`ModelContainer`, `LLMModelFactory.shared.{loadContainer,_load}`, `BatchGenerator`, `GenerationBatchResponse`, `RowSampler`, `makeRowSampler`, `LanguageModel`, `Tokenizer`, `BatchKVCache`, `Generation`, `GenerateStopReason`, `UserInput`, `GenerateParameters`, `SequenceStateMachine`, etc.) and confirmed every signature is preserved on the new commits. All new work in mlx-swift-lm is additive: MTP machinery, DeepSeek-V4, `BatchedEngine`, parallel shard loading, Gemma 4 fixes.
Dependency-graph caveats (both handled)
Behavioral note (no API impact)
`GenerationBatch.step()` now auto-activates an MTP fast path for any model conforming to the new `MTPCapable` protocol when `batchSize == 1`. None of the production catalog models implement `MTPCapable` today, so prod impact is none. Once we ship a Qwen3.5-MTP or Gemma 4-MTP checkpoint, decoded tokens will be MTP-accelerated automatically.
Verification done
Verification still recommended before merge
Out of scope (follow-ups)
Need help on this PR? Tag
@codesmithwith what you need. Autofix is disabled.