fa5436e0a7
GitOrigin-RevId: e8057b67ebf307f01bdcc8fba94d94f75039d1f6
52 lines
1 KiB
Nix
52 lines
1 KiB
Nix
{
|
|
lib,
|
|
buildPythonPackage,
|
|
fetchFromGitHub,
|
|
pythonOlder,
|
|
setuptools,
|
|
numpy,
|
|
packaging,
|
|
psutil,
|
|
pyyaml,
|
|
torch,
|
|
transformers,
|
|
accelerate,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "peft";
|
|
version = "0.11.1";
|
|
format = "pyproject";
|
|
|
|
disabled = pythonOlder "3.8";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "huggingface";
|
|
repo = pname;
|
|
rev = "refs/tags/v${version}";
|
|
hash = "sha256-FV/S/N9wA+rUos/uQIzvPWmWCIFi8wi2Tt6jMzvYfYQ=";
|
|
};
|
|
|
|
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 ];
|
|
};
|
|
}
|