2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
|
|
|
|
# build-system
|
|
|
|
setuptools,
|
|
|
|
wheel,
|
|
|
|
|
|
|
|
# dependencies
|
|
|
|
beartype,
|
|
|
|
einops,
|
|
|
|
torch,
|
2023-10-09 19:29:22 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "rotary-embedding-torch";
|
2024-06-05 15:53:02 +00:00
|
|
|
version = "0.6.1";
|
2023-10-09 19:29:22 +00:00
|
|
|
pyproject = true;
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "lucidrains";
|
|
|
|
repo = "rotary-embedding-torch";
|
2024-01-02 11:29:13 +00:00
|
|
|
rev = "refs/tags/${version}";
|
2024-06-05 15:53:02 +00:00
|
|
|
hash = "sha256-/gVBQ9lUzVN/eEtm6qPajw0TZs87JOC7d02qnQ8sdVk=";
|
2023-10-09 19:29:22 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools
|
|
|
|
wheel
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
2024-01-25 14:12:00 +00:00
|
|
|
beartype
|
2023-10-09 19:29:22 +00:00
|
|
|
einops
|
|
|
|
torch
|
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "rotary_embedding_torch" ];
|
2023-10-09 19:29:22 +00:00
|
|
|
|
|
|
|
doCheck = false; # no tests
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Implementation of Rotary Embeddings, from the Roformer paper, in Pytorch";
|
|
|
|
homepage = "https://github.com/lucidrains/rotary-embedding-torch";
|
2024-01-25 14:12:00 +00:00
|
|
|
changelog = "https://github.com/lucidrains/rotary-embedding-torch/releases/tag/${version}";
|
2023-10-09 19:29:22 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = teams.tts.members;
|
|
|
|
};
|
|
|
|
}
|