[project] name = "kvpress" version = "0.5.1" 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", "numpy==1.26.3", "torch>=2.3.1,<3", "transformers>=5.0.0", "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", "jieba>=0.42.1", "fuzzywuzzy>=0.18.0", ] 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", "sentencepiece>=0.2.0,<0.3", "protobuf>=5.27.2,<6", ] [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"]