depot/third_party/nixpkgs/pkgs/development/python-modules/peft/default.nix
Default email 472aeafc57 Project import generated by Copybara.
GitOrigin-RevId: c31898adf5a8ed202ce5bea9f347b1c6871f32d1
2024-10-04 18:56:33 +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.13.0";
format = "pyproject";
disabled = pythonOlder "3.8";
src = fetchFromGitHub {
owner = "huggingface";
repo = pname;
rev = "refs/tags/v${version}";
hash = "sha256-LvAZrMEHzaQie641Xk7vsYRdHfq4eRP0Sr8ancRpW58=";
};
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 ];
};
}