1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5
6 # build-system
7 setuptools,
8 wheel,
9
10 # dependencies
11 beartype,
12 einops,
13 torch,
14}:
15
16buildPythonPackage rec {
17 pname = "rotary-embedding-torch";
18 version = "0.8.9";
19 pyproject = true;
20
21 src = fetchFromGitHub {
22 owner = "lucidrains";
23 repo = "rotary-embedding-torch";
24 tag = version;
25 hash = "sha256-mPiOtEmRtn73KGoYMum80q0iETJa9zZW9KIWL8O0dnM=";
26 };
27
28 nativeBuildInputs = [
29 setuptools
30 wheel
31 ];
32
33 propagatedBuildInputs = [
34 beartype
35 einops
36 torch
37 ];
38
39 pythonImportsCheck = [ "rotary_embedding_torch" ];
40
41 doCheck = false; # no tests
42
43 meta = with lib; {
44 description = "Implementation of Rotary Embeddings, from the Roformer paper, in Pytorch";
45 homepage = "https://github.com/lucidrains/rotary-embedding-torch";
46 changelog = "https://github.com/lucidrains/rotary-embedding-torch/releases/tag/${src.tag}";
47 license = licenses.mit;
48 teams = [ teams.tts ];
49 };
50}