python313Packages.local-attention: init at 1.11.2
Module for local windowed attention for language modeling https://github.com/lucidrains/local-attention
This commit is contained in:
parent
efbf097c9b
commit
03fe4efc37
48
pkgs/development/python-modules/local-attention/default.nix
Normal file
48
pkgs/development/python-modules/local-attention/default.nix
Normal file
@ -0,0 +1,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 ];
|
||||
};
|
||||
}
|
||||
@ -8645,6 +8645,8 @@ self: super: with self; {
|
||||
|
||||
loca = callPackage ../development/python-modules/loca { };
|
||||
|
||||
local-attention = callPackage ../development/python-modules/local-attention { };
|
||||
|
||||
localimport = callPackage ../development/python-modules/localimport { };
|
||||
|
||||
localstack-client = callPackage ../development/python-modules/localstack-client { };
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user