depot/third_party/nixpkgs/pkgs/development/python-modules/peft/default.nix
Default email f34ce41345 Project import generated by Copybara.
GitOrigin-RevId: b73c2221a46c13557b1b3be9c2070cc42cf01eb3
2024-07-27 08:49:29 +02:00

52 lines
1 KiB
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
pythonOlder,
setuptools,
numpy,
packaging,
psutil,
pyyaml,
torch,
transformers,
accelerate,
}:
buildPythonPackage rec {
pname = "peft";
version = "0.12.0";
format = "pyproject";
disabled = pythonOlder "3.8";
src = fetchFromGitHub {
owner = "huggingface";
repo = pname;
rev = "refs/tags/v${version}";
hash = "sha256-7LYlqWiOPTvQyJgpUZeZ5Wl17RswhYyit0/MaHyN5Ak=";
};
nativeBuildInputs = [ setuptools ];
propagatedBuildInputs = [
numpy
packaging
psutil
pyyaml
torch
transformers
accelerate
];
doCheck = false; # tries to download pretrained models
pythonImportsCheck = [ "peft" ];
meta = with lib; {
homepage = "https://github.com/huggingface/peft";
description = "State-of-the art parameter-efficient fine tuning";
changelog = "https://github.com/huggingface/peft/releases/tag/v${version}";
license = licenses.asl20;
maintainers = with maintainers; [ bcdarwin ];
};
}