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.6.1"; 19 pyproject = true; 20 21 src = fetchFromGitHub { 22 owner = "lucidrains"; 23 repo = "rotary-embedding-torch"; 24 rev = "refs/tags/${version}"; 25 hash = "sha256-/gVBQ9lUzVN/eEtm6qPajw0TZs87JOC7d02qnQ8sdVk="; 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/${version}"; 47 license = licenses.mit; 48 maintainers = teams.tts.members; 49 }; 50}