-
Notifications
You must be signed in to change notification settings - Fork 128
Expand file tree
/
Copy pathpyproject.toml
More file actions
93 lines (83 loc) · 2.4 KB
/
pyproject.toml
File metadata and controls
93 lines (83 loc) · 2.4 KB
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
[project]
name = "kvpress"
version = "0.4.2"
description = "Efficiently compress the KV cache of any pretrained transformer"
authors = [
{ name = "Simon Jegou" },
{ name = "Maximilian Jeblick" },
{ name = "Alessio Devoto" },
{ name = "David Austin" },
]
requires-python = ">=3.10"
readme = "README.md"
dependencies = [
"numpy>=2.0.0,<3",
"torch>=2.3.1,<3",
# transformers<4.54 is not supported due to refactoring of the transformers library.
# transformers 4.54-4.55.2 are not compatible with kvpress due to flash attention bugs in transformers
"transformers>=4.56",
"sentencepiece>=0.2.0,<0.3",
"protobuf>=5.27.2,<6",
"datasets>=2.21.0,<3",
"pandas>=2.2.2,<3",
"accelerate>=1.0.0,<2",
"requests>=2.32.3,<3",
"cachetools>=5.5.2,<6",
"fire>=0.6.0,<0.7",
]
[project.optional-dependencies]
eval = [
"rouge>=1.0.1,<2",
"nltk>=3.9.1,<4",
"tqdm>=4.66.4,<5",
"scipy>=1.13.1,<2",
"bert-score>=0.3.13,<0.4",
]
flash-attn = [
"flash-attn"
]
[dependency-groups]
dev = [
"pytest>=7.0.0,<8",
"flake8>=7.0.0,<8",
"isort>=5.13.2,<6",
"black>=24.8.0,<25",
"mypy>=1.13.0,<2",
"pytest-cov>=5.0.0,<6",
"pytest-dependency>=0.6.0,<0.7",
"pytest-html>=4.1.1, <5.0.0",
"types-pyyaml~=6.0",
"ipykernel>=6.29.4,<7",
"bs4>=0.0.2,<0.0.3",
"nvitop>=1.3.2,<2",
"matplotlib>=3.9.0,<4",
]
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.uv]
no-build-isolation-package = ["flash-attn"]
[tool.black]
line-length = 120
target_version = ["py310"]
exclude = "(.eggs|.git|.hg|.mypy_cache|.nox|.tox|venv|.venv|doc-venv|.svn|_build|buck-out|build|dist|notebooks|tools|tmp|bundles)"
[tool.isort]
multi_line_output = 3
include_trailing_comma = true
force_grid_wrap = 0
use_parentheses = true
ensure_newline_before_comments = true
line_length = 120
skip = ["venv", ".venv"]
[tool.mypy]
ignore_missing_imports = true
allow_redefinition = true
strict_optional = false
exclude = "(.eggs|.git|.hg|.mypy_cache|.nox|.tox|venv|.venv|doc-venv|.svn|_build|buck-out|build|dist|notebooks|tools|tmp|tests|bundles|.pytest_cache|reports)"
disable_error_code = ["union-attr", "operator", "call-overload", "arg-type"]
[[tool.mypy.overrides]]
module = "kvpress.presses.base_press"
disable_error_code = ["attr-defined"]
[[tool.mypy.overrides]]
module = "kvpress.pipeline"
disable_error_code = ["attr-defined", "assignment", "override"]