blob: 4c09d4cff8d2d89a014089b9d956f2bcf25c2343 (
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
|
{
lib,
buildPythonPackage,
catalogue,
curated-tokenizers,
fetchFromGitHub,
huggingface-hub,
setuptools,
tokenizers,
torch,
}:
buildPythonPackage rec {
pname = "curated-transformers";
version = "2.0.1";
pyproject = true;
src = fetchFromGitHub {
owner = "explosion";
repo = "curated-transformers";
tag = "v${version}";
hash = "sha256-2sedBVpwCppviWix+d3tJFTrLBe+2IBlWnCKgV6MucA=";
};
build-system = [ setuptools ];
dependencies = [
catalogue
curated-tokenizers
huggingface-hub
tokenizers
torch
];
# Unit tests are hard to use, since most tests rely on downloading
# models from Hugging Face Hub.
pythonImportsCheck = [ "curated_transformers" ];
meta = {
description = "PyTorch library of curated Transformer models and their composable components";
homepage = "https://github.com/explosion/curated-transformers";
changelog = "https://github.com/explosion/curated-transformers/releases/tag/v${version}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ danieldk ];
};
}
|