1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 6 # build-system 7 hatchling, 8 9 # dependencies 10 einx, 11 einops, 12 loguru, 13 packaging, 14 torch, 15 16 # tests 17 pytestCheckHook, 18}: 19 20buildPythonPackage rec { 21 pname = "x-transformers"; 22 version = "2.7.6"; 23 pyproject = true; 24 25 src = fetchFromGitHub { 26 owner = "lucidrains"; 27 repo = "x-transformers"; 28 tag = version; 29 hash = "sha256-AC/EyF/W9CM9Kjb94fDMSAxktfdZito/ZGB6lQABYvU="; 30 }; 31 32 build-system = [ hatchling ]; 33 34 dependencies = [ 35 einx 36 einops 37 loguru 38 packaging 39 torch 40 ]; 41 42 nativeCheckInputs = [ pytestCheckHook ]; 43 44 pythonImportsCheck = [ "x_transformers" ]; 45 46 meta = { 47 description = "Concise but fully-featured transformer"; 48 longDescription = '' 49 A simple but complete full-attention transformer with a set of promising experimental features from various papers 50 ''; 51 homepage = "https://github.com/lucidrains/x-transformers"; 52 license = lib.licenses.mit; 53 maintainers = with lib.maintainers; [ ByteSudoer ]; 54 }; 55}