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