2023-10-09 19:29:22 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
|
|
|
|
# build-system
|
|
|
|
, setuptools
|
|
|
|
, wheel
|
|
|
|
|
|
|
|
# dependencies
|
2024-01-25 14:12:00 +00:00
|
|
|
, beartype
|
2023-10-09 19:29:22 +00:00
|
|
|
, einops
|
|
|
|
, torch
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "rotary-embedding-torch";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "0.5.3";
|
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-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-CCz/va5oydgU1JRDHKooRezbDbeGZHtD8Zy6fWJ2uRg=";
|
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
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"rotary_embedding_torch"
|
|
|
|
];
|
|
|
|
|
|
|
|
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;
|
|
|
|
};
|
|
|
|
}
|