push sheeet
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s

This commit is contained in:
Dark Steveneq
2025-10-09 14:15:47 +02:00
commit 646b892680
49168 changed files with 5897842 additions and 0 deletions

View File

@@ -0,0 +1,87 @@
{
lib,
buildPythonPackage,
fetchFromGitHub,
# build-system
setuptools,
# dependencies
jinja2,
mlx,
numpy,
protobuf,
pyyaml,
transformers,
# tests
lm-eval,
sentencepiece,
pytestCheckHook,
writableTmpDirAsHomeHook,
}:
buildPythonPackage rec {
pname = "mlx-lm";
version = "0.26.3";
pyproject = true;
src = fetchFromGitHub {
owner = "ml-explore";
repo = "mlx-lm";
tag = "v${version}";
hash = "sha256-O4wW7wvIqSeBv01LoUCHm0/CgcRc5RfFHjvwyccp6UM=";
};
build-system = [
setuptools
];
dependencies = [
jinja2
mlx
numpy
protobuf
pyyaml
transformers
];
nativeCheckInputs = [
lm-eval
pytestCheckHook
sentencepiece
writableTmpDirAsHomeHook
];
pythonImportsCheck = [
"mlx_lm"
];
disabledTestPaths = [
# Requires network access to huggingface.co
"tests/test_datsets.py"
"tests/test_generate.py"
"tests/test_server.py"
"tests/test_tokenizers.py"
"tests/test_utils.py::TestUtils::test_convert"
"tests/test_utils.py::TestUtils::test_load"
"tests/test_utils_load_model.py"
"tests/test_prompt_cache.py::TestPromptCache::test_cache_to_quantized"
"tests/test_prompt_cache.py::TestPromptCache::test_cache_with_generate"
"tests/test_prompt_cache.py::TestPromptCache::test_trim_cache_with_generate"
# RuntimeError: [metal_kernel] No GPU back-end.
"tests/test_losses.py"
"tests/test_models.py::TestModels::test_bitnet"
];
meta = {
description = "Run LLMs with MLX";
homepage = "https://github.com/ml-explore/mlx-lm";
changelog = "https://github.com/ml-explore/mlx-lm/releases/tag/v${version}";
license = lib.licenses.mit;
platforms = [
"aarch64-darwin"
];
maintainers = with lib.maintainers; [ ferrine ];
};
}