Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
167 lines (157 loc) · 5.23 KB
/
Copy pathpyproject.toml
File metadata and controls
167 lines (157 loc) · 5.23 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
[build-system]
requires = ["setuptools>=68", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "quantllm"
version = "2.2.0.dev"
description = "Ultra-fast LLM quantization, fine-tuning, and deployment with one line of code"
readme = "README.md"
license = {text = "MIT"}
authors = [
{name = "Dark Coder", email = "codewithdark90@gmail.com"},
]
requires-python = ">=3.10"
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Science/Research",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Topic :: Software Development :: Libraries :: Python Modules",
]
keywords = [
"llm", "quantization", "gguf", "transformers", "pytorch",
"fine-tuning", "lora", "inference", "llama", "mistral",
"machine-learning", "deep-learning", "nlp",
]
dependencies = [
"torch>=2.0.0",
"transformers>=4.46.0", # Trainer(processing_class=...)
"datasets>=2.14.0",
"accelerate>=0.24.0",
"peft>=0.12.0",
"bitsandbytes>=0.43.0; platform_system != 'Darwin'",
"scipy>=1.10.0",
"scikit-learn>=1.3.0",
"tqdm>=4.65.0",
"numpy>=1.24.0",
"sentencepiece>=0.1.99",
"protobuf>=3.20.0",
"einops>=0.7.0",
"psutil>=5.9.0",
"huggingface-hub>=0.19.0",
"gguf>=0.10.0",
]
[project.optional-dependencies]
gguf = ["gguf>=0.10.0"]
onnx = [
"onnx>=1.14.0",
"onnxruntime>=1.16.0",
# ONNX Runtime export lives in optimum-onnx; it caps transformers<4.58 for now
"optimum-onnx[onnxruntime]>=0.1.0",
"onnxscript>=0.1.0",
]
mlx = ["mlx>=0.1.0", "mlx-lm>=0.1.0"]
triton = ["triton>=2.1.0"]
flash = ["flash-attn>=2.3.0"]
# NOTE: the former `hub` extra pointed at a git URL (hf-lifecycle), which PyPI
# rejects on upload. Install it manually if needed:
# pip install "hf-lifecycle @ git+https://github.com/codewithdark-git/huggingface-lifecycle.git"
full = [
"gguf>=0.10.0",
"onnx>=1.14.0",
"onnxruntime>=1.16.0",
"optimum-onnx[onnxruntime]>=0.1.0",
"onnxscript>=0.1.0",
"triton>=2.1.0",
"wandb>=0.15.0",
"tensorboard>=2.14.0",
"evaluate>=0.4.0",
"flash-attn>=2.3.0",
"rich>=13.0.0",
]
server = ["fastapi>=0.100.0", "uvicorn>=0.23.0", "pydantic>=2.0.0"]
bench = ["pandas>=1.5.0"]
dev = [
"pytest>=7.4.0",
"pytest-cov>=4.1.0",
"httpx>=0.24.0",
"black>=23.0.0",
"isort>=5.12.0",
"flake8>=6.1.0",
"mypy>=1.8.0",
"sphinx>=7.0.0",
"sphinx-rtd-theme>=1.3.0",
"sphinx-copybutton>=0.5.2",
"myst-parser>=2.0.0",
]
[project.urls]
Homepage = "https://github.com/codewithdark-git/QuantLLM"
Documentation = "https://quantllm.readthedocs.io/"
"Bug Tracker" = "https://github.com/codewithdark-git/QuantLLM/issues"
Sponsor = "https://github.com/sponsors/codewithdark-git"
[project.scripts]
quantllm = "quantllm.cli:main"
[tool.setuptools.packages.find]
exclude = ["tests", "tests.*", "docs", "examples"]
[tool.ruff]
line-length = 120
target-version = "py310"
extend-exclude = [
"build",
"dist",
".venv",
"examples/output",
"docs/_build",
]
[tool.ruff.lint]
# Minimal "blocker" ruleset enforced on every push. The codebase predates
# ruff, so we deliberately start small -- this catches genuine bugs (syntax
# errors, undefined names, broken comparisons) without producing a giant
# reformatting diff. Stricter rules can be opted-in incrementally.
select = [
"E9", # pycodestyle runtime errors (syntax, indentation)
"F63", # invalid `is` comparisons / `not in` issues
"F7", # syntax errors in expressions
"F82", # undefined names actually used
"F811", # redefinition of unused name
"F821", # undefined-name reference
"F823", # local variable referenced before assignment
# NOTE: F841 (unused local) is intentionally NOT enabled yet. The existing
# codebase has several intentional unused-binding patterns (progress
# tasks, documenting intent, etc.) and fixing them is out of scope.
"B006", # mutable default arguments (genuine bug class)
"B017", # ``assertRaises(Exception)`` -- masks real failures
]
ignore = [
"E501", # line length: not enforced strictly
"E402", # module-level import not at top of file
"E741", # ambiguous variable names
]
[tool.ruff.lint.per-file-ignores]
"tests/*" = ["F401", "F811", "F841"]
"quantllm/__init__.py" = ["F401", "E402"]
"quantllm/core/__init__.py" = ["F401"]
# mypy is configured in mypy.ini (single source of truth).
[tool.pytest.ini_options]
minversion = "7.0"
testpaths = ["tests"]
addopts = "-ra --strict-markers"
markers = [
"integration: marks tests as integration tests requiring GPU",
"gpu: end-to-end tests under tests/gpu (need CUDA; run via scripts/modal_gpu_tests.py)",
"slow: marks tests as slow",
"large_model: marks tests requiring large models",
"stress: marks tests as stress/performance tests",
"timeout: marks tests with a timeout",
]
filterwarnings = [
"ignore::DeprecationWarning",
"ignore::FutureWarning",
]