Skip to content

Local UI to run and train LLMs and diffusion models. Supports GGUF, MLX, Qwen3.8, DeepSeek-V4.1, MiniMax-H3, Gemma 4, FLUX and more.

Move the Unsloth Studio MLX pins to mlx-vlm 0.7.11 (#15861)

Long Yixing3cc31f7b739e
diff --git a/studio/backend/tests/test_mlx_inference_backend.py b/studio/backend/tests/test_mlx_inference_backend.py
index 57d07b2cfdb..7d324651b06 100644
--- a/studio/backend/tests/test_mlx_inference_backend.py
+++ b/studio/backend/tests/test_mlx_inference_backend.py
@@ -10577,7 +10577,7 @@ def test_mlx_vlm_every_release_reads_one_models_rate_the_same_way(
):
"""A model's declared rate must not depend on which mlx-vlm is installed.
- Studio pins ``mlx-vlm>=0.4.4,<=0.7.9``, which spans both shapes: releases with no resolver
+ Studio's mlx-vlm range spans both shapes: releases with no resolver
and, from 0.7.0, releases that have one. Reading the rate only through the resolver left
every install on the older shape sampling at the library default instead of the rate the
checkpoint asked for.
diff --git a/studio/backend/tests/test_mlx_repair.py b/studio/backend/tests/test_mlx_repair.py
index 197fc2d8f83..b10e8dff43d 100644
--- a/studio/backend/tests/test_mlx_repair.py
+++ b/studio/backend/tests/test_mlx_repair.py
@@ -53,10 +53,7 @@ def test_uv_cmd_targets_this_interpreter_with_mlx_packages(monkeypatch):
assert cmd is not None
assert cmd[:5] == ["/usr/bin/uv", "pip", "install", "--python", sys.executable]
assert set(mr.MLX_PACKAGES) <= set(cmd)
- # mlx-vlm keeps a floor so the resolver cannot backtrack to an old one that
- # imports but breaks VLM Train/Export, and a ceiling so this unattended
- # install cannot cross a major line on its own.
- assert "mlx-vlm>=0.4.4,<=0.7.9" in cmd
+ assert "mlx-vlm>=0.4.4,<=0.7.11" in cmd
# Pinned, not floored: see _MLX_INSTALL_SPECS.
assert "mlx==0.32.4" in cmd
assert "mlx-lm>=0.31.3,<=0.32.2" in cmd
diff --git a/studio/backend/utils/mlx_repair.py b/studio/backend/utils/mlx_repair.py
index 92d5695993e..69ebf8a2e40 100644
--- a/studio/backend/utils/mlx_repair.py
+++ b/studio/backend/utils/mlx_repair.py
@@ -30,11 +30,11 @@ _UNRESOLVED_PYTHON_MARKER = "No virtual environment or system Python installatio
_MLX_MIN_VERSIONS = {"mlx": "0.22.0", "mlx-lm": "0.31.2", "mlx-vlm": "0.4.4"}
_MLX_PACKAGE_NAMES = tuple(_MLX_MIN_VERSIONS)
_MLX_RUNTIME_IMPORTS = ("mlx.core", "mlx_lm", "mlx_lm.sample_utils", "mlx_vlm")
-# What the self-heal INSTALLS (the floors above judge a stack already there). Pinned, not floored: this install is unattended and mlx breaks in patch releases (0.32.1, unslothai/unsloth#9466). Keep in sync with unsloth-zoo's darwin deps. mlx 0.32.4 rather than mlx-vlm's 0.32.2 floor: 0.32.2's GQA-8 decode kernel read the first sequence's KV for every batch row (mlx#4431). mlx-vlm stays a range: 0.7.9 under the installer's transformers override, 0.6.4 under the plain cap. mlx-lm is a range too: 0.32 requires Python 3.11, so Python 3.10 resolves 0.31.3.
+# What the self-heal INSTALLS; keep in sync with unsloth-zoo's darwin deps. mlx pinned: it breaks in patch releases (unslothai/unsloth#9466), and 0.32.2's GQA-8 decode read row 0's KV for every batch row (mlx#4431). mlx-vlm is a range (the transformers override decides how high it resolves); mlx-lm too: 0.32 needs Python 3.11.
_MLX_INSTALL_SPECS = {
"mlx": "==0.32.4",
"mlx-lm": ">=0.31.3,<=0.32.2",
- "mlx-vlm": ">=0.4.4,<=0.7.9",
+ "mlx-vlm": ">=0.4.4,<=0.7.11",
}
MLX_PACKAGES = tuple(f"{name}{spec}" for name, spec in _MLX_INSTALL_SPECS.items())
diff --git a/studio/install_python_stack.py b/studio/install_python_stack.py
index 21d6d7879b9..c0d41032c4d 100644
--- a/studio/install_python_stack.py
+++ b/studio/install_python_stack.py
@@ -9138,8 +9138,7 @@ def _build_pip_cmd(args: tuple[str, ...]) -> list[str]:
# By canonical project name: pip refuses `--upgrade-package mlx` beside `mlx==0.32.3` as a double
# requirement where uv does not.
def _project(requirement: str) -> str:
- # _requirement_name stops at "==" and "@"; a range (mlx-vlm>=0.4.4,<=0.7.9) needs the
- # rest.
+ # _requirement_name stops at "==" and "@", not at a range specifier.
return _canonical_package_name(
re.split(r"[<>=!~;\[ ]", _requirement_name(requirement), maxsplit = 1)[0]
)
@@ -10267,7 +10266,7 @@ def _has_working_git() -> bool:
_MLX_PINS: tuple[str, ...] = ("mlx==0.32.4", "mlx-metal==0.32.4")
# A range, like mlx-vlm: 0.32 requires Python 3.11, so Python 3.10 resolves 0.31.3.
_MLX_LM_SPEC = "mlx-lm>=0.31.3,<=0.32.2"
-_MLX_VLM_SPEC = "mlx-vlm>=0.4.4,<=0.7.9"
+_MLX_VLM_SPEC = "mlx-vlm>=0.4.4,<=0.7.11"
# Exact: llguidance.mlx / llguidance.hf are the API grammar_constraint.py binds to.
_LLGUIDANCE_PIN = "llguidance==1.8.0"
_MLX_NAMES: tuple[str, ...] = tuple(spec.partition("==")[0] for spec in _MLX_PINS) + (
diff --git a/tests/studio/install/test_dependency_pass_skips.py b/tests/studio/install/test_dependency_pass_skips.py
index afd8b0c2e4b..b617661d00f 100644
--- a/tests/studio/install/test_dependency_pass_skips.py
+++ b/tests/studio/install/test_dependency_pass_skips.py
@@ -994,12 +994,12 @@ def test_the_pip_fallback_never_names_one_project_twice() -> None:
"--upgrade-package",
"mlx-vlm",
"mlx==0.32.3",
- "mlx-vlm>=0.4.4,<=0.7.9",
+ "mlx-vlm>=0.4.4,<=0.7.11",
)
)
assert "--upgrade" in cmd and "--upgrade-package" not in cmd
assert cmd.count("mlx") == 0 and cmd.count("mlx-vlm") == 0
- assert "mlx==0.32.3" in cmd and "mlx-vlm>=0.4.4,<=0.7.9" in cmd
+ assert "mlx==0.32.3" in cmd and "mlx-vlm>=0.4.4,<=0.7.11" in cmd
def test_a_package_named_only_by_the_flag_is_still_passed() -> None:
diff --git a/tests/studio/install/test_mlx_install.py b/tests/studio/install/test_mlx_install.py
index 0d864b7c5d2..d4df4fdfdcc 100644
--- a/tests/studio/install/test_mlx_install.py
+++ b/tests/studio/install/test_mlx_install.py
@@ -316,7 +316,7 @@ def test_pin_floor_is_revisited_whenever_the_pins_move():
assert _repair_specs() == {
"mlx": "==0.32.4",
"mlx-lm": ">=0.31.3,<=0.32.2",
- "mlx-vlm": ">=0.4.4,<=0.7.9",
+ "mlx-vlm": ">=0.4.4,<=0.7.11",
}
assert (stack._MLX_MIN_PYTHON, stack._MLX_MIN_MACOS_MAJOR) == ((3, 10), 14)