lol
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

python312Packages.unsloth-zoo: init at 2025.4.1

Co-authored-by: Gaétan Lepage <33058747+GaetanLepage@users.noreply.github.com>
Co-authored-by: OTABI Tomoya <tomoya.otabi@gmail.com>

authored by

Hugo Herter
Gaétan Lepage
OTABI Tomoya
and committed by
Gaetan Lepage
81b8490b 4dfea7e0

+106
+86
pkgs/development/python-modules/unsloth-zoo/default.nix
··· 1 + { 2 + lib, 3 + buildPythonPackage, 4 + fetchPypi, 5 + 6 + # build-system 7 + setuptools, 8 + setuptools-scm, 9 + 10 + # dependencies 11 + accelerate, 12 + cut-cross-entropy, 13 + datasets, 14 + hf-transfer, 15 + huggingface-hub, 16 + packaging, 17 + peft, 18 + psutil, 19 + sentencepiece, 20 + torch, 21 + tqdm, 22 + transformers, 23 + trl, 24 + tyro, 25 + }: 26 + 27 + buildPythonPackage rec { 28 + pname = "unsloth-zoo"; 29 + version = "2025.4.1"; 30 + pyproject = true; 31 + 32 + # no tags on GitHub 33 + src = fetchPypi { 34 + pname = "unsloth_zoo"; 35 + inherit version; 36 + hash = "sha256-mRs/NMCNJWT52S7mtbQI332IQR6+/IaL29XmtMOz3fE="; 37 + }; 38 + 39 + # pyproject.toml requires an obsolete version of protobuf, 40 + # but it is not used. 41 + # Upstream issue: https://github.com/unslothai/unsloth-zoo/pull/68 42 + pythonRelaxDeps = [ 43 + "protobuf" 44 + ]; 45 + 46 + patches = [ 47 + # Avoid circular dependency in Nix, since `unsloth` depends on `unsloth-zoo`. 48 + ./dont-require-unsloth.patch 49 + ]; 50 + 51 + build-system = [ 52 + setuptools 53 + setuptools-scm 54 + ]; 55 + 56 + dependencies = [ 57 + accelerate 58 + cut-cross-entropy 59 + datasets 60 + hf-transfer 61 + huggingface-hub 62 + packaging 63 + peft 64 + psutil 65 + sentencepiece 66 + torch 67 + tqdm 68 + transformers 69 + trl 70 + tyro 71 + ]; 72 + 73 + # No tests 74 + doCheck = false; 75 + 76 + pythonImportsCheck = [ 77 + "unsloth_zoo" 78 + ]; 79 + 80 + meta = { 81 + description = "Utils for Unsloth"; 82 + homepage = "https://github.com/unslothai/unsloth_zoo"; 83 + license = lib.licenses.mit; 84 + maintainers = with lib.maintainers; [ hoh ]; 85 + }; 86 + }
+18
pkgs/development/python-modules/unsloth-zoo/dont-require-unsloth.patch
··· 1 + diff --git a/unsloth_zoo/__init__.py b/unsloth_zoo/__init__.py 2 + --- a/unsloth_zoo/__init__.py 3 + +++ b/unsloth_zoo/__init__.py 4 + @@ -17,14 +17,10 @@ 5 + __version__ = "2025.3.17" 6 + 7 + from importlib.util import find_spec 8 + -if find_spec("unsloth") is None: 9 + - raise ImportError("Please install Unsloth via `pip install unsloth`!") 10 + pass 11 + del find_spec 12 + 13 + import os 14 + -if not ("UNSLOTH_IS_PRESENT" in os.environ): 15 + - raise ImportError("Please install Unsloth via `pip install unsloth`!") 16 + pass 17 + 18 + try:
+2
pkgs/top-level/python-packages.nix
··· 18433 18433 18434 18434 unrpa = callPackage ../development/python-modules/unrpa { }; 18435 18435 18436 + unsloth-zoo = callPackage ../development/python-modules/unsloth-zoo { }; 18437 + 18436 18438 unstructured = callPackage ../development/python-modules/unstructured { }; 18437 18439 18438 18440 unstructured-api-tools = callPackage ../development/python-modules/unstructured-api-tools { };