blob: 1b1ae04a48e4fd0a27b4f60ae879299d24b60c1a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
{
lib,
buildPythonPackage,
einops,
fetchFromGitHub,
hyper-connections,
pytestCheckHook,
setuptools,
torch,
}:
buildPythonPackage rec {
pname = "local-attention";
version = "1.11.2";
pyproject = true;
src = fetchFromGitHub {
owner = "lucidrains";
repo = "local-attention";
tag = version;
hash = "sha256-2gBPALJAflLf7Y8L5wnNw4fHcvIOKjOncLsebkhrYkU=";
};
postPatch = ''
substituteInPlace setup.py \
--replace-fail "'pytest-runner'," ""
'';
build-system = [ setuptools ];
dependencies = [
einops
hyper-connections
torch
];
nativeCheckInputs = [ pytestCheckHook ];
pythonImportsCheck = [ "local_attention" ];
meta = {
description = "Module for local windowed attention for language modeling";
homepage = "https://github.com/lucidrains/local-attention";
changelog = "https://github.com/lucidrains/local-attention/releases/tag/${src.tag}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ fab ];
};
}
|