- add FlashAttnBackend (ATTN_BACKEND.FLASH) using flash_attn_func with KV-cache gather + GQA, mirroring TorchNativeBackend - add flash_attn_available() probe gated on compute capability plus a real-kernel smoke test, cached at first use - lazy-import flash-attn via importlib so it stays an optional dependency, raising clear errors when unusable - add 'flash' optional extra (flash-attn>=2.6) and export the new backend
51 lines
1.2 KiB
TOML
51 lines
1.2 KiB
TOML
[build-system]
|
|
requires = ["setuptools>=64", "wheel"]
|
|
build-backend = "setuptools.build_meta"
|
|
|
|
[project]
|
|
dynamic = ["version"]
|
|
name = "astrai"
|
|
readme = "README.md"
|
|
requires-python = ">=3.12"
|
|
dependencies = [
|
|
"numpy==2.4.4",
|
|
"torch==2.11.0",
|
|
"tokenizers==0.21.4",
|
|
"tqdm==4.67.1",
|
|
"safetensors==0.5.3",
|
|
"huggingface-hub==0.34.3",
|
|
"jinja2>=3.0.0",
|
|
"pydantic>=2.0",
|
|
"fastapi",
|
|
"uvicorn[standard]",
|
|
"click>=8.0",
|
|
"pyyaml>=6.0",
|
|
]
|
|
keywords = ["nlp", "datasets", "language-models", "machine-learning"]
|
|
license = { text = "Apache-2.0" }
|
|
classifiers = [
|
|
"Programming Language :: Python :: 3",
|
|
"License :: OSI Approved :: Apache Software License",
|
|
"Operating System :: OS Independent",
|
|
]
|
|
urls = { Homepage = "https://github.com/ViperEkura/AstrAI" }
|
|
|
|
[project.optional-dependencies]
|
|
dev = ["pytest==9.0.2", "ruff", "httpx2"]
|
|
flash = ["flash-attn>=2.6"]
|
|
|
|
[tool.setuptools.packages.find]
|
|
where = ["."]
|
|
|
|
[tool.setuptools.dynamic]
|
|
version = { attr = "astrai.__version__" }
|
|
|
|
[tool.ruff]
|
|
target-version = "py312"
|
|
|
|
[tool.ruff.format]
|
|
quote-style = "double"
|
|
indent-style = "space"
|
|
skip-magic-trailing-comma = false
|
|
line-ending = "auto"
|
|
exclude = ["*.md", "*.json", "*.yml", "*.yaml"] |