Skip to content

Commit 91773cb

Browse files
authored
Relax dependencies (#200)
1 parent 6f0a9da commit 91773cb

File tree

2 files changed

+11
-8
lines changed

2 files changed

+11
-8
lines changed

kvpress/presses/kvzap_press.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,14 @@
1212

1313

1414
class KVzapConfig(PretrainedConfig):
15-
model_type: str = "kvzap"
16-
input_dim: int
17-
output_dim: int
18-
hidden_dim: Optional[int] = None
19-
n_modules: int
15+
model_type = "kvzap"
16+
17+
def __init__(self, *, input_dim: int, output_dim: int, n_modules: int, hidden_dim: Optional[int] = None, **kwargs):
18+
super().__init__(**kwargs)
19+
self.input_dim = input_dim
20+
self.output_dim = output_dim
21+
self.hidden_dim = hidden_dim
22+
self.n_modules = n_modules
2023

2124

2225
class KVzapModel(PreTrainedModel):

pyproject.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "kvpress"
3-
version = "0.5.1"
3+
version = "0.5.2"
44
description = "Efficiently compress the KV cache of any pretrained transformer"
55
authors = [
66
{ name = "Simon Jegou" },
@@ -13,8 +13,8 @@ readme = "README.md"
1313
dependencies = [
1414
"numpy>=2.0.0,<3",
1515
"torch>=2.3.1,<3",
16-
"transformers>=5.0.0",
17-
"datasets>=2.21.0,<3",
16+
"transformers>=4.56.0",
17+
"datasets>=2.21.0",
1818
"pandas>=2.2.2,<3",
1919
"accelerate>=1.0.0,<2",
2020
"requests>=2.32.3,<3",

0 commit comments

Comments
 (0)