Skip to content

Move the Studio MLX pins to mlx 0.32.2 and mlx-vlm 0.7.1 - #11080

Merged
danielhanchen merged 7 commits into
unslothai:mainfrom
Lyxot:feat/mlx-vlm-071-studio
Sep 17, 2026
Merged

danielhanchen merged 7 commits into
unslothai:mainfrom
Lyxot:feat/mlx-vlm-071-studio

Conversation

@Lyxot

@Lyxot Lyxot commented Sep 16, 2026

Copy link
Copy Markdown
Collaborator

Summary

Moves the MLX stack the Studio installer and the MLX self-heal install to mlx 0.32.2 and mlx-vlm 0.7.1, matching the ceiling raise in unsloth-zoo (unslothai/unsloth-zoo#1244). mlx_repair.py's own note already says these pins are kept in sync with unsloth-zoo's darwin dependencies.

before after
mlx ==0.32.1 ==0.32.2
mlx-metal ==0.32.1 ==0.32.2
mlx-vlm >=0.4.4,<0.7.0 >=0.4.4,<=0.7.1
mlx-lm ==0.31.3 unchanged

The two versions have to move together: mlx-vlm 0.7.0 and 0.7.1 require mlx>=0.32.2, so the raised ceiling would admit nothing while mlx stayed at 0.32.1.

This changes which mlx-vlm a real install runs

Resolving the new specification under this platform's own overrides (transformers>=5.5.0,<=5.5.0, anyio<4.14.0, huggingface_hub>=1.23.0,<2.0) selects:

mlx==0.32.2
mlx-metal==0.32.2
mlx-lm==0.31.3
mlx-vlm==0.7.1
transformers==5.5.0

Because the transformers override replaces mlx-vlm's own transformers>=5.14.0 requirement rather than constraining it, the resolver is free to take 0.7.1; previously the <0.7.0 ceiling held it on the 0.6 line. This is a real behaviour change, not a no-op version string.

Ordering requirement, and a residual exposure reviewers should weigh

mlx-vlm 0.7.1 passes cache, cache_index and state_steps to gated_delta_update. An unsloth-zoo without the matching fix raises TypeError there, and Qwen3.5 VLM training cannot start. This should not be merged before unsloth-zoo carries that fix.

Merge order alone does not fully close it, and that is a deliberate, accepted tradeoff rather than an oversight. The MLX self-heal (attempt_mlx_repair) installs only mlx, mlx-lm and mlx-vlm, and the installer's MLX step likewise runs independently of the core phase that installs unsloth-zoo. Either path can therefore upgrade mlx-vlm in an environment that keeps an older unsloth-zoo, and such an environment stays exposed until its zoo is updated. The alternatives considered were holding the ceiling until a zoo release carries the fix, or deriving the bound from the installed zoo's declared requirement instead of a copied literal; the latter remains available as a follow-up if this exposure is judged too wide.

Wheel coverage and the install gates are unchanged

mlx and mlx-metal publish the same wheels at 0.32.1 and 0.32.2 — macosx_14_0, macosx_15_0 and macosx_26_0 on arm64, CPython 3.10 and newer — so _MLX_MIN_PYTHON (3, 10) and _MLX_MIN_MACOS_MAJOR 14 still hold and are deliberately untouched. test_pin_floor_is_revisited_whenever_the_pins_move exists to force that check whenever these pins move, and it passes.

A defect the bump retires

The note explaining the old pin recorded that 0.32.1 was taken with a known defect: it segfaulted at interpreter finalization when a fused Metal custom kernel was the last work a process did. On 0.32.2 the shape unsloth-zoo's tests/_run_then_exit_hard.py documents as exiting 139 exits 0 on three consecutive runs, so the note has been rewritten accordingly.

Deliberately not rewritten

Three version mentions record when a behaviour landed rather than what to install, and remain true:

  • mx.random.state became a read-only sentinel in mlx 0.32.1 (mlx_inference.py, and two tests)
  • 0.32.1 breaking model loading, which is the reason this install pins rather than floors

Validation

tests/studio/install/test_mlx_install.py tests/studio/install/test_dependency_pass_skips.py
  220 passed, 1 skipped, 2 failed

studio/backend/tests/test_mlx_repair.py
  36 passed

studio/backend/tests/test_mlx_inference_backend.py::test_mlx_vlm_every_release_reads_one_models_rate_the_same_way
  5 passed

The two failures are test_a_venv_that_already_has_pip_does_not_reinstall_it and test_a_pip_that_cannot_run_is_bootstrapped_again. They concern pip bootstrapping, not MLX, and fail identically on a clean checkout of the target branch with none of this applied.

The Studio installer pins the MLX stack it installs separately from unsloth-zoo's pyproject, and its own note says to keep the two in sync. unsloth-zoo is raising its ceiling to mlx-vlm 0.7.1 and mlx 0.32.2, so the installer and the self-heal move with it: `mlx` and `mlx-metal` to `==0.32.2`, `mlx-vlm` to `>=0.4.4,<=0.7.1`, `mlx-lm` unchanged.

The two have to move together, because mlx-vlm 0.7.0 and 0.7.1 require `mlx>=0.32.2` and the raised ceiling would otherwise admit nothing. Resolving the new specification under this platform's own overrides selects mlx 0.32.2, mlx-metal 0.32.2, mlx-lm 0.31.3 and mlx-vlm 0.7.1 with transformers held at 5.5.0, so this does change which mlx-vlm a real install runs.

mlx 0.32.1 and 0.32.2 publish the same wheels — macOS 14, 15 and 26 on arm64, CPython 3.10 and newer — so the minimum macOS and Python gates that guard this install are unchanged. 0.32.2 also retires the interpreter-finalization segfault that made 0.32.1 exit 139 when a fused Metal custom kernel was the last work a process did.

Version mentions that record when a behaviour landed rather than what to install — mx.random.state becoming a read-only sentinel in 0.32.1, and 0.32.1 breaking model loading, which is why this install pins rather than floors — are left alone.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 16, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-16T14:44:46.094023Z 4bb1226 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

chatgpt-codex-connector[bot]

This comment was marked as resolved.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Already looking forward to the next diff.

Reviewed commit: a5e55698b7

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

danielhanchen added a commit to danielhanchen/unsloth-staging-2 that referenced this pull request Sep 16, 2026
The self-heal is default-on and unattended, and it installs mlx-vlm without
touching unsloth-zoo. With the ceiling widened to 0.7.1 it could put 0.7.1 next
to a zoo that predates the matching gated_delta_update fix; 0.7.1 passes cache=
unconditionally, so Qwen3.5 VLM training raises TypeError at the first step,
after mlx_stack_available has already cleared the chat-only gate.

Read the range the installed zoo declares for mlx-vlm and pass it alongside ours
so uv intersects the two. With unsloth-zoo 2026.9.3 installed this resolves to
mlx-vlm>=0.4.4,<=0.7.1,<0.7.0,>=0.4.4, and it widens on its own once a zoo
declaring 0.7.1 is installed, so no zoo version is named here. mlx and mlx-lm are
left alone: they are pinned at both ends and intersecting them with a zoo one
patch release behind would empty the range.
@danielhanchen

Copy link
Copy Markdown
Member

@codex security review

chatgpt-codex-connector[bot]

This comment was marked as resolved.

The MLX step runs before the core phase, and install.sh hands off with
SKIP_STUDIO_BASE=1, which skips that phase entirely, so on a fresh Apple Silicon
install the zoo already on disk is the one that stays. The widened ceiling could
therefore leave a pre-fix unsloth-zoo beside mlx-vlm 0.7.1, which is the
TypeError at the first Qwen3.5 VLM training step. The narrowing added to
utils/mlx_repair.py covered only the self-heal; apply the same rule here.
@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Sep 16, 2026
chatgpt-codex-connector[bot]

This comment was marked as resolved.

pre-commit-ci Bot and others added 2 commits September 16, 2026 13:05
_mlx_stack_is_current tested the static range, so an already-installed 0.7.1
beside a zoo declaring <0.7.0 read as current and the step skipped the very
install that would put mlx-vlm back where the zoo can drive it. Use the narrowed
range there, in the closure manifest the audit reads, and in the health
fingerprint, so a zoo change invalidates a recorded verdict.
chatgpt-codex-connector[bot]

This comment was marked as resolved.

pre-commit-ci Bot and others added 2 commits September 16, 2026 14:20
The MLX step runs before the core phase, so it honours the range the OLD zoo
declares. On a normal update that narrowed the stack to 0.6.x and then upgraded
the zoo, leaving the machine there for good: the startup self-heal will not
correct it either, since 0.6.x satisfies _MLX_MIN_VERSIONS, and the next update
can take the dependency fast path.

Compare the declared range after the core phase with the one the step used and
re-resolve only when it moved, so the common update pays a metadata read. The
slot is spent unconditionally on mac arm with torch, including the no-wheel
branch, so the progress denominator stays independent of the host.
@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Sep 16, 2026
@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Sep 16, 2026
@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Sep 16, 2026
@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Sep 16, 2026
@unslothai unslothai deleted a comment from Lyxot Sep 16, 2026
@danielhanchen

Copy link
Copy Markdown
Member

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Nice work!

Reviewed commit: 4bb122643e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@danielhanchen

Copy link
Copy Markdown
Member

unsloth-zoo main still declares mlx==0.32.1 and mlx-vlm 0.4.4 to 0.7.0 in its darwin deps, and the zoo narrowing here only covers mlx-vlm, so an Apple Silicon install would get mlx 0.32.2 next to a zoo pinning 0.32.1. Could you confirm the zoo side lands first, and whether the mlx pin needs the same treatment before I review?

1 similar comment
@danielhanchen

Copy link
Copy Markdown
Member

unsloth-zoo main still declares mlx==0.32.1 and mlx-vlm 0.4.4 to 0.7.0 in its darwin deps, and the zoo narrowing here only covers mlx-vlm, so an Apple Silicon install would get mlx 0.32.2 next to a zoo pinning 0.32.1. Could you confirm the zoo side lands first, and whether the mlx pin needs the same treatment before I review?

@danielhanchen
danielhanchen merged commit fb4fc4f into unslothai:main Sep 17, 2026
13 of 72 checks passed
shaojun pushed a commit to shaojun/unsloth that referenced this pull request Sep 29, 2026
…1080)

* build(studio): move the MLX pins to mlx 0.32.2 and mlx-vlm 0.7.1

The Studio installer pins the MLX stack it installs separately from unsloth-zoo's pyproject, and its own note says to keep the two in sync. unsloth-zoo is raising its ceiling to mlx-vlm 0.7.1 and mlx 0.32.2, so the installer and the self-heal move with it: `mlx` and `mlx-metal` to `==0.32.2`, `mlx-vlm` to `>=0.4.4,<=0.7.1`, `mlx-lm` unchanged.

The two have to move together, because mlx-vlm 0.7.0 and 0.7.1 require `mlx>=0.32.2` and the raised ceiling would otherwise admit nothing. Resolving the new specification under this platform's own overrides selects mlx 0.32.2, mlx-metal 0.32.2, mlx-lm 0.31.3 and mlx-vlm 0.7.1 with transformers held at 5.5.0, so this does change which mlx-vlm a real install runs.

mlx 0.32.1 and 0.32.2 publish the same wheels — macOS 14, 15 and 26 on arm64, CPython 3.10 and newer — so the minimum macOS and Python gates that guard this install are unchanged. 0.32.2 also retires the interpreter-finalization segfault that made 0.32.1 exit 139 when a fused Metal custom kernel was the last work a process did.

Version mentions that record when a behaviour landed rather than what to install — mx.random.state becoming a read-only sentinel in 0.32.1, and 0.32.1 breaking model loading, which is why this install pins rather than floors — are left alone.

* Do not self-heal onto an mlx-vlm the installed unsloth-zoo excludes

The self-heal is default-on and unattended, and it installs mlx-vlm without
touching unsloth-zoo. With the ceiling widened to 0.7.1 it could put 0.7.1 next
to a zoo that predates the matching gated_delta_update fix; 0.7.1 passes cache=
unconditionally, so Qwen3.5 VLM training raises TypeError at the first step,
after mlx_stack_available has already cleared the chat-only gate.

Read the range the installed zoo declares for mlx-vlm and pass it alongside ours
so uv intersects the two. With unsloth-zoo 2026.9.3 installed this resolves to
mlx-vlm>=0.4.4,<=0.7.1,<0.7.0,>=0.4.4, and it widens on its own once a zoo
declaring 0.7.1 is installed, so no zoo version is named here. mlx and mlx-lm are
left alone: they are pinned at both ends and intersecting them with a zoo one
patch release behind would empty the range.

* Intersect the installer's mlx-vlm range with the installed zoo too

The MLX step runs before the core phase, and install.sh hands off with
SKIP_STUDIO_BASE=1, which skips that phase entirely, so on a fresh Apple Silicon
install the zoo already on disk is the one that stays. The widened ceiling could
therefore leave a pre-fix unsloth-zoo beside mlx-vlm 0.7.1, which is the
TypeError at the first Qwen3.5 VLM training step. The narrowing added to
utils/mlx_repair.py covered only the self-heal; apply the same rule here.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Consult the installed zoo range in the skip predicate too

_mlx_stack_is_current tested the static range, so an already-installed 0.7.1
beside a zoo declaring <0.7.0 read as current and the step skipped the very
install that would put mlx-vlm back where the zoo can drive it. Use the narrowed
range there, in the closure manifest the audit reads, and in the health
fingerprint, so a zoo change invalidates a recorded verdict.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Re-resolve MLX after the core phase moves unsloth-zoo

The MLX step runs before the core phase, so it honours the range the OLD zoo
declares. On a normal update that narrowed the stack to 0.6.x and then upgraded
the zoo, leaving the machine there for good: the startup self-heal will not
correct it either, since 0.6.x satisfies _MLX_MIN_VERSIONS, and the next update
can take the dependency fast path.

Compare the declared range after the core phase with the one the step used and
re-resolve only when it moved, so the common update pays a metadata read. The
slot is spent unconditionally on mac arm with torch, including the no-wheel
branch, so the progress denominator stays independent of the host.

---------

Co-authored-by: danielhanchen <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants