From 886f05ec8373e2246ebf34724149e2eb5899b095 Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Wed, 1 Apr 2026 16:46:20 +0000 Subject: [PATCH 1/3] python3Packages.mlx-lm: skip failing test Context: https://github.com/ml-explore/mlx/pull/3230 Reported upstream: https://github.com/ml-explore/mlx-lm/issues/1089 --- pkgs/development/python-modules/mlx-lm/default.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkgs/development/python-modules/mlx-lm/default.nix b/pkgs/development/python-modules/mlx-lm/default.nix index f46a8786a06d..d86518623c1f 100644 --- a/pkgs/development/python-modules/mlx-lm/default.nix +++ b/pkgs/development/python-modules/mlx-lm/default.nix @@ -79,6 +79,12 @@ buildPythonPackage (finalAttrs: { "tests/test_models.py::TestModels::test_gated_delta_masked" ]; + disabledTests = [ + # ValueError: [rope] dims must be positive but got 0 + # Reported upstream: https://github.com/ml-explore/mlx-lm/issues/1089 + "test_all_models" + ]; + meta = { description = "Run LLMs with MLX"; homepage = "https://github.com/ml-explore/mlx-lm"; From e195735749ce44a997776bd5f94c799f4e0e3f14 Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Sun, 29 Mar 2026 22:00:46 +0000 Subject: [PATCH 2/3] python3Packages.mlx: 0.30.5 -> 0.31.1 Diff: https://github.com/ml-explore/mlx/compare/v0.30.5...v0.31.1 Changelog: https://github.com/ml-explore/mlx/releases/tag/v0.31.1 --- pkgs/development/python-modules/mlx/default.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/mlx/default.nix b/pkgs/development/python-modules/mlx/default.nix index 3e72fc401a41..6cdc7cb6e6c9 100644 --- a/pkgs/development/python-modules/mlx/default.nix +++ b/pkgs/development/python-modules/mlx/default.nix @@ -33,6 +33,7 @@ let gguf-tools = fetchFromGitHub { owner = "antirez"; repo = "gguf-tools"; + # Tag from https://github.com/ml-explore/mlx/blob/v0.31.1/mlx/io/CMakeLists.txt#L14 rev = "8fa6eb65236618e28fd7710a0fba565f7faa1848"; hash = "sha256-15FvyPOFqTOr5vdWQoPnZz+mYH919++EtghjozDlnSA="; }; @@ -40,14 +41,14 @@ let in buildPythonPackage (finalAttrs: { pname = "mlx"; - version = "0.30.5"; + version = "0.31.1"; pyproject = true; src = fetchFromGitHub { owner = "ml-explore"; repo = "mlx"; tag = "v${finalAttrs.version}"; - hash = "sha256-SV/3MXt+SuJ69XfLfXycold6KgtXSM7OE0KwMSNw+eE="; + hash = "sha256-PiNk/MdMw9Vpat2KuslBTyaFuK+mJ4UvwJqBnysvvUU="; }; patches = [ From ceba8441e1a03f60830abfd02d5aa92ed846838f Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Sun, 29 Mar 2026 22:05:35 +0000 Subject: [PATCH 3/3] python3Packages.mlx-vlm: 0.3.9 -> 0.4.2, switch to finalAttrs Diff: https://github.com/Blaizzy/mlx-vlm/compare/v0.3.9...v0.4.2 Changelog: https://github.com/Blaizzy/mlx-vlm/releases/tag/v0.4.2 --- .../python-modules/mlx-vlm/default.nix | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/pkgs/development/python-modules/mlx-vlm/default.nix b/pkgs/development/python-modules/mlx-vlm/default.nix index 9a5f6d6bc133..9319be349917 100644 --- a/pkgs/development/python-modules/mlx-vlm/default.nix +++ b/pkgs/development/python-modules/mlx-vlm/default.nix @@ -9,13 +9,13 @@ # dependencies datasets, fastapi, + miniaudio, mlx, mlx-lm, numpy, opencv-python, pillow, requests, - soundfile, tqdm, transformers, uvicorn, @@ -26,35 +26,32 @@ rich, }: -buildPythonPackage rec { +buildPythonPackage (finalAttrs: { pname = "mlx-vlm"; - version = "0.3.9"; + version = "0.4.2"; pyproject = true; src = fetchFromGitHub { owner = "Blaizzy"; repo = "mlx-vlm"; - tag = "v${version}"; - hash = "sha256-L+llrfFo4C++JZ3GjpZi16wMZNXtKrYh3pxhZ5N1n/4="; + tag = "v${finalAttrs.version}"; + hash = "sha256-GmeMcANmztICfYR9Ca5wQfLOugOlK1mt5j3q616n6TQ="; }; build-system = [ setuptools ]; - pythonRelaxDeps = [ - "opencv-python" - ]; dependencies = [ datasets fastapi + miniaudio mlx mlx-lm numpy opencv-python pillow requests - soundfile tqdm transformers uvicorn @@ -91,11 +88,11 @@ buildPythonPackage rec { meta = { description = "Inference and fine-tuning of Vision Language Models (VLMs) on your Mac using MLX"; homepage = "https://github.com/Blaizzy/mlx-vlm"; - changelog = "https://github.com/Blaizzy/mlx-vlm/releases/tag/${src.tag}"; + changelog = "https://github.com/Blaizzy/mlx-vlm/releases/tag/${finalAttrs.src.tag}"; license = lib.licenses.mit; maintainers = with lib.maintainers; [ GaetanLepage ]; platforms = [ "aarch64-darwin" ]; }; -} +})