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.
Python agentaichatgptdeepseekfine-tuninggemmaimage-generationllamallmllmsopenaipythonqwenreinforcement-learningself-hostedstable-diffusiontext-to-speechttsuiunsloth
Move the Unsloth Studio MLX pins to mlx-vlm 0.7.9 (#14307)
Long Yixing3511e95ca345
diff --git a/studio/backend/tests/test_mlx_inference_backend.py b/studio/backend/tests/test_mlx_inference_backend.pyindex fd41f91092c..94e0d6528ff 100644--- a/studio/backend/tests/test_mlx_inference_backend.py+++ b/studio/backend/tests/test_mlx_inference_backend.py@@ -9676,7 +9676,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.8``, which spans both shapes: releases with no resolver+ Studio pins ``mlx-vlm>=0.4.4,<=0.7.9``, which spans both shapes: releases with no resolverand, from 0.7.0, releases that have one. Reading the rate only through the resolver leftevery install on the older shape sampling at the library default instead of the rate thecheckpoint asked for.diff --git a/studio/backend/tests/test_mlx_repair.py b/studio/backend/tests/test_mlx_repair.pyindex 62a51feb7c5..bcb2bafc2d4 100644--- a/studio/backend/tests/test_mlx_repair.py+++ b/studio/backend/tests/test_mlx_repair.py@@ -62,7 +62,7 @@ def test_uv_cmd_targets_this_interpreter_with_mlx_packages(monkeypatch):# 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.8" in cmd+ assert "mlx-vlm>=0.4.4,<=0.7.9" in cmd# Pinned, not floored: see _MLX_INSTALL_SPECS.assert "mlx==0.32.4" in cmdassert "mlx-lm>=0.31.3,<=0.32.2" in cmddiff --git a/studio/backend/utils/mlx_repair.py b/studio/backend/utils/mlx_repair.pyindex 195bb9ff673..9ab1fbaed73 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.8 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 (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._MLX_INSTALL_SPECS = {"mlx": "==0.32.4","mlx-lm": ">=0.31.3,<=0.32.2",- "mlx-vlm": ">=0.4.4,<=0.7.8",+ "mlx-vlm": ">=0.4.4,<=0.7.9",}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.pyindex ee6efbff094..c06a21cfff9 100644--- a/studio/install_python_stack.py+++ b/studio/install_python_stack.py@@ -9657,7 +9657,7 @@ def _build_pip_cmd(args: tuple[str, ...]) -> list[str]:# By canonical project name: `--upgrade-package mlx` beside `mlx==0.32.3` is one project,# and pip refuses 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.8) needs the+ # _requirement_name stops at "==" and "@"; a range (mlx-vlm>=0.4.4,<=0.7.9) needs the# rest.return _canonical_package_name(re.split(r"[<>=!~;\[ ]", _requirement_name(requirement), maxsplit = 1)[0]@@ -10813,7 +10813,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.8"+_MLX_VLM_SPEC = "mlx-vlm>=0.4.4,<=0.7.9"# 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.pyindex 224f6f4f779..23650053ce1 100644--- a/tests/studio/install/test_dependency_pass_skips.py+++ b/tests/studio/install/test_dependency_pass_skips.py@@ -991,12 +991,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.8",+ "mlx-vlm>=0.4.4,<=0.7.9",))assert "--upgrade" in cmd and "--upgrade-package" not in cmdassert 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.8" in cmd+ assert "mlx==0.32.3" in cmd and "mlx-vlm>=0.4.4,<=0.7.9" in cmddef 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.pyindex 41c3fc65e1a..cd5e6d8d72a 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.8",+ "mlx-vlm": ">=0.4.4,<=0.7.9",}assert (stack._MLX_MIN_PYTHON, stack._MLX_MIN_MACOS_MAJOR) == ((3, 10), 14)