Repository navigation
bump mlx-swift to 0.31.6 -- .4 was missing new API that the current code calls - #484
Merged
Merged
Conversation
Contributor
|
Whenever this is going to merge, maybe cutting a release of this library as well ? |
Member
Author
We are having some reviewer load issues -- hopefully two of my coworkers will be available soon. If you wanted, you could make a PR with this same content and I could approve it. I would like to cut a tag for mlx-swift-lm, maybe next week -- we are doing some final checks for MLX Foundation Models. The MaterializedArray (waiting on reviewers) and update to mlx/mlx-c/mlx-swift (working through some build issues) should come soon too. |
ctymoszek
approved these changes
Aug 13, 2026
spokvulcan
added a commit
to spokvulcan/mlx-swift-lm
that referenced
this pull request
Oct 3, 2026
spokvulcan/mlx-swift pin-tesseract 6058402 -> 2d1bd1b: mlx-swift's MLXLogger shim and its OSLog fix (ml-explore#484, ml-explore#493) backported verbatim, which upstream ml-explore#535 uses in MLXLMCommon and MLXFoundationModels. No Cmlx change.
spokvulcan
added a commit
to spokvulcan/mlx-swift-lm
that referenced
this pull request
Oct 27, 2026
spokvulcan/mlx-swift pin-tesseract 6058402 -> 2d1bd1b: mlx-swift's MLXLogger shim and its OSLog fix (ml-explore#484, ml-explore#493) backported verbatim, which upstream ml-explore#535 uses in MLXLMCommon and MLXFoundationModels. No Cmlx change.
div0-space
pushed a commit
to LibraxisAI/mlx-swift-lm
that referenced
this pull request
Nov 29, 2026
…rts; shards 7 and 9 back on 4x24 (ml-explore#469) (ml-explore#484) * Format two checkpoint test files before changing them The pull request lint formats every Swift file a change touches. Qwen35PagedCompleteCheckpointTests and Qwen4NativeCheckpointEngineTests were never formatted, so this commit only runs swift format on them (Xcode 27.2, .swift-format) and the next commit's edits stay readable. No test changes. * Tests: drain checkpoint publication callbacks before zero-ledger asserts (ml-explore#469) On 4-vCPU runners, tests that read the admission ledger right after a request's final event found about 2.3 MiB still reserved. That residue is exactly one complete-checkpoint manifest permit, CBv2CheckpointManifestMemory.reservationBytes(position:) = 2,359,296 + 16 * position at chunk 128, for the last checkpoint each test published (c, 5c, 6c and 7c give the four values in the issue). The engine keeps its contract. A plain submit delivers the terminal after publication. The request's admission reservation and KV are released before the terminal. The export's manifest, though, is owned by whoever holds the export: the store's donate callback and the capture queue's callback. Both can still be running when the terminal arrives. PR ekryski#173 decided this ("The manifest correctly retains its host-memory permit until its final owner returns") and pinned it in CBv2CompleteCheckpointEngineTests. It added CompleteCheckpointFixtureStore.finishPublicationCallbacks(engine:) as the barrier. Neither the retirement acknowledgement nor shutdown waits for a store-held export, which is why NemotronH35BackendParityTests failed even after shutdown. The tests named in ml-explore#469, and later tests written the same way, skipped that barrier. They now drain it before asserting zero: - HistoricalWindowCheckpointEngineTests: a new assertPagedReleased helper at every paged zero-ledger site (lines 215, 248, 391 and their siblings). The preempted-donor and slot-cap runs also drain the store queue, not only the capture queue. - Qwen35CardDefaultCheckpointTests.released takes the store (line 221). - NemotronH35BackendParityTests.run (line 561). - The same pattern in CBv2NonSpeculatingRowCheckpointSupport, Qwen35PagedCompleteCheckpointTests, Qwen4NativeCheckpointEngineTests, CBv2ContiguousHistoricalCheckpointTests, CBv2QuantizedPrefixCapabilityTests and CBv2WindowedStepRetirementTests. New deterministic test, testStoreHeldExportKeepsOnlyItsManifestPermitAfterTheTerminal. The fixture's completionGate holds the store callback after completion. The terminal then arrives with the KV retired and exactly the manifest permit charged, and the helper drains it to zero. It reproduces the 4-vCPU timing without sleeps. CI: with the cause fixed, the test-12x32 job and the plan's SHARDS_12X32 list are removed, as the workflow comment asked. Shards 7 and 9 run in `test` on 4x24 like the others. test-runner-sizes.py and FORKDIFF.md (Job sizes) are updated to match. No library code changes. No assertion is loosened.
div0-space
pushed a commit
to LibraxisAI/mlx-swift-lm
that referenced
this pull request
Nov 29, 2026
…ore#484 (ml-explore#486) Since ml-explore#483, shard 12 is no longer the long pole: its "Run the shard" took 179 to 286 s in the four green runs after ml-explore#484. The map still had a fixed spread. From each test's median duration in runs 44893935896, 44894087555, 44895265796 and 44900253828 (ml-explore#484's tests, every shard on 4x24), each shard's tests plus its measured overhead ("Run the shard" minus its tests) came to 171 to 284 s: shard 1 284, shard 9 264, shard 4 244, against 177 and 171 for shards 10 and 11. 14 whole units (118 tests, 182 s) move. Each move takes a unit from the slowest shard to the shard that leaves the lower of the two maxima, until no move shortens the slowest shard. Shards 1 to 11 now come to 221 or 222 s. Shard 12 keeps ml-explore#478's long MTP penalty test alone. That one test (median 174 s, 150 to 242 s) is close to the mean test time per shard (192 s) and cannot be split, so the gemma-quoted-number- enabled extra pass moves from shard 12 to shard 3. There it runs after the unit group, which also runs before the Metal library is staged. No group moves otherwise, and the units with the ml-explore#469 fixes stay in their shards. estimated_seconds is now the predicted median "Run the shard": the balanced load. Every test still runs exactly once: `test_shards.py check` passes with the test lists of the four runs and of run 44890382382. The rest run selects 0 tests. Groups, extra passes, settings, the 12 native shards, runners and timeouts do not change.
div0-space
pushed a commit
to LibraxisAI/mlx-swift-lm
that referenced
this pull request
Nov 29, 2026
* ci: run the Fork Tests on 16 shards With 12 shards the run ends with its slowest shard, usually one on a slow Mac. Since ml-explore#486 the map is balanced, so more shards are what is left: each one holds fewer seconds of tests, and a slow Mac stretches fewer of them. From each test's median duration in six green runs (44893935896, 44894087555, 44895265796, 44900253828, 44890382382 and 44903171085) plus each shard's measured overhead ("Run the shard" minus its tests), main's map comes to 195 to 243 s per shard. Shards 13 to 16 are new, each one run of units. 27 whole units (258 tests) move, each from the slowest shard to the shard that leaves the lower of the two maxima, until no move shortens the slowest shard. Shards 1 to 11 and 13 to 16 now come to 168 to 170 s. Shard 12 keeps ml-explore#478's long MTP penalty test alone (195 s predicted; one test of about 174 s that cannot be split). No group or extra pass moves, the gemma pass stays in shard 3 after the unit group, and the units with the ml-explore#469 fixes stay in their shards. The hosted audio shard is now shard 17; the workflow reads its number from the map. Every test still runs exactly once: `test_shards.py check` passes with the test lists of all eight green runs since ml-explore#484. The tests that change shard are exactly the 258 tests of the moved units, and every extra pass, the rest run and the hosted shard select the same tests as before. Runners, timeouts and settings do not change. Each run asks for four more 4x24 Macs, which also wait for the build: about +24 Mac-minutes, +96 vCPU-minutes (about $0.10) per run. * ci: run the Fork Tests on 14 shards instead of 16 The independent review of the 16-shard map found the shards competing with their own build for Macs. Each shard is queued 8-9 s after Build, waits for the products while holding a macOS slot, and the plane places jobs one at a time with no priority for the 12x32 build. In run 44919944896 (16 shards) Build started 129 s after it was queued, after all 16 of its shards, against 33-56 s in the nine 12-shard runs with no other Fork Tests run active. In a concurrent burst of six 12-shard runs the builds waited up to 190 s while later runs' shards took Macs. Fourteen shards (the same planner and inputs as the 16-shard map) keep most of the gain: the simulated slowest step drops from a p50 of 307 s (12 shards) to 273 s (16: 246 s), and a leave-one-out over the eight green runs gives -36 s at the median. Shards are predicted at 191-192 s; shard 12 still runs ml-explore#478's 174 s penalty test alone (195 s). Two more 4x24 Macs per run instead of four: about +12 Mac-minutes, +48 vCPU-minutes ($0.05) per run. `test_shards.py check` passes on the test lists of all nine runs; the groups, the hosted tests, shard 12 and the ml-explore#469 units are unchanged from main. The hosted audio shard is shard 15.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposed changes
Update mlx-swift dependency to indicate 0.31.6 -- this was required per calls to dtype. It worked without this if you pulls fresh dependencies but should indicate the minimum.
Checklist
Put an
xin the boxes that apply.pre-commit run --all-filesto format my code / installed pre-commit prior to committing changes