-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
178 lines (166 loc) Β· 5.54 KB
/
pyproject.toml
File metadata and controls
178 lines (166 loc) Β· 5.54 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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
[build-system]
requires = ["setuptools>=68", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "squish"
version = "9.14.0"
description = "Fast compressed model loader and OpenAI-compatible inference server for Apple Silicon"
readme = "README.md"
requires-python = ">=3.10"
license = {text = "BUSL-1.1"}
keywords = ["llm", "inference", "quantization", "apple-silicon", "mlx", "speculative-decoding"]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"License :: Other/Proprietary License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
]
dependencies = [
"mlx>=0.18",
"mlx-lm>=0.19",
"numpy>=1.26",
"safetensors>=0.4",
"fastapi>=0.111",
"uvicorn[standard]>=0.29",
"sse-starlette>=1.8",
"huggingface-hub>=0.23",
"transformers>=4.40",
"zstandard>=0.22",
"rich>=13.0",
"orjson>=3.9",
]
[project.optional-dependencies]
quant = [] # AWQ calibration uses only mlx+numpy (core deps); no extra packages needed.
# Rust quantizer (squish_quant_rs/) must be built separately: maturin build
retrieval = [
"hnswlib>=0.8", # ANNS retrieval attention (Phase 2)
]
llmlingua = [
"llmlingua>=0.2", # LLMLingua-2 prompt compression (Phase 4)
]
grammar = [
"xgrammar>=0.1", # XGrammar structured output engine (Phase B)
]
cache = [
"sqlite-vec>=0.1", # SquishSemanticCache sqlite-vec backend (Phase E3)
]
whatsapp = [] # Meta WhatsApp Cloud API uses stdlib only (hmac + hashlib + urllib)
# signal-cli (Java binary) needed for --signal; no Python packages required
squash = [
# CycloneDX 1.7 ML-BOM generation + schema validation.
"cyclonedx-python-lib>=7.0",
# Ed25519 offline signing (W49 air-gapped mode).
"cryptography>=42.0",
# Optional: OpenSSF Model Signing (keyless via Sigstore Rekor).
# Install separately when signature verification is needed:
# pip install sigstore
]
squash-api = [
"squish[squash]",
"fastapi>=0.111",
"uvicorn[standard]>=0.29",
]
eval = [
"lm-eval>=0.4",
"datasets>=2.18",
"accelerate>=0.29",
"sacrebleu",
"rouge_score",
"nltk",
]
linux = [
# Required for Linux inference paths (torch_ops, compressed_loader_torch, _eval_torch).
# mlx/mlx-lm are Apple-only and intentionally excluded here.
"torch>=2.0",
]
dev = [
"pytest>=8",
"pytest-asyncio>=0.23",
"pytest-timeout>=2.3",
"httpx>=0.27",
"maturin>=1.5",
"ruff>=0.4",
"mypy>=1.10",
"mkdocs-material>=9.5",
"mkdocs-exclude>=1.0",
"cryptography>=42.0", # Ed25519 offline signing (squash W49 tests)
]
[project.urls]
"Homepage" = "https://github.com/wesleyscholl/squish"
"Bug Tracker" = "https://github.com/wesleyscholl/squish/issues"
"Documentation" = "https://wesleyscholl.github.io/squish"
[project.scripts]
squish = "squish.cli:main"
squish-server = "squish.server:main"
squish-convert = "squish.convert:main"
squash = "squish.squash.cli:main"
[tool.setuptools.packages.find]
where = ["."]
include = ["squish*"]
[tool.setuptools]
[tool.ruff]
line-length = 100
target-version = "py310"
[tool.ruff.lint]
select = ["E", "F", "W", "I", "UP", "B"]
ignore = [
"E501", # line-length handled by formatter
"B008", # FastAPI Depends() calls in function args
"E402", # module-level import not at top (guard imports in large files)
"E701", # multiple statements on one line (colon) β intentional compact style
"E702", # multiple statements on one line (compact local-var blocks)
"E741", # ambiguous variable name (l, I used in math/loop contexts)
"B004", # bare raise in except β allowed
"B007", # loop variable not used in body
"B023", # function does not bind loop variable
"B904", # raise without `from` inside except
"B905", # zip without explicit strict= β pre-existing; zip lengths are caller-controlled
"F401", # imported but unused (try/except availability checks)
"F811", # redefinition of unused name (re-export blocks in __init__.py)
"UP037", # remove quotes from type annotations β keep for 3.9 compat guard imports
"F821", # undefined name (forward-reference string annotations)
"F841", # unused local variable β pre-existing; side-effect or debug assignments
"UP035", # deprecated typing imports (dead after UP006/UP045 auto-fix; kept for compat)
"I001", # import sort order β not enforced; try/except stubs use logical not alphabetical order
]
[tool.pytest.ini_options]
testpaths = ["tests"]
pythonpath = [".", "dev/benchmarks"]
addopts = "-q --tb=short --import-mode=importlib"
norecursedirs = ["tests/grammar", "tests/hardware"]
markers = [
"integration: requires live squish serve",
]
[tool.coverage.run]
source = ["squish"]
branch = true
omit = [
"squish/convert.py",
"squish/streaming.py",
"squish/speculative.py",
"squish/squish_lm_eval.py",
"squish/minference_patch.py",
"squish/paged_attention.py",
"squish/prompt_compressor.py",
"squish/vector_index.py",
]
[tool.coverage.report]
skip_empty = true
exclude_lines = [
"pragma: no cover",
"if __name__ == .__main__.:",
"raise NotImplementedError",
"\\.\\.\\.",
"pass",
]
fail_under = 100
[tool.mypy]
python_version = "3.10"
strict = false
warn_unused_ignores = true
ignore_missing_imports = true