Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
49 lines (43 loc) · 2.08 KB
/
Copy pathpyproject.toml
File metadata and controls
49 lines (43 loc) · 2.08 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
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "flashtopic"
version = "0.6.0"
description = "Fast GPU topic modeling + debiased prevalence scoring for large text corpora"
readme = "README.md"
requires-python = ">=3.11"
license = { text = "Apache-2.0" }
authors = [{ name = "Ulysses Pascal" }]
keywords = ["topic-modeling", "kmeans", "prevalence", "nlp", "clustering"]
# Core: portable, no GPU and no torch. A clustering backend is installed via an
# extra below (one of [mlx] / [cuda] / [cpu]) — the loader errors clearly if none.
dependencies = [
"numpy>=1.26",
"scipy>=1.11",
"scikit-learn>=1.4", # metrics + kneed elbow; NOT used for clustering
"kneed>=0.8",
"spacy>=3.7", # sentence segmentation + NER (model downloaded separately)
"rapidfuzz>=3.0", # entity alias clustering (flashtopic.aliases)
"model2vec>=0.8.1", # default embedder (potion-retrieval-32M, CPU, static)
"pandas>=2.0,<3.0",
"openai>=1.0", # OpenRouter-compatible client
"pydantic>=2.0",
"python-dotenv>=1.0",
]
[project.optional-dependencies]
mlx = ["mlx>=0.20", "mlx-lm>=0.20", "flash-kmeans-mlx"] # Apple Silicon: cosine flash-kmeans + Qwen embeddings
cuda = ["flash-kmeans"] # NVIDIA/Triton flash-kmeans
st = ["sentence-transformers>=3"] # transformer embedders (pulls torch; MPS/CUDA/CPU probed). Keep OUT of torch-free API images.
cpu = ["fastkmeans"] # portable torch fallback (runs anywhere torch does)
trf = ["spacy[transformers]"] # transformer NER runtime; also `python -m spacy download en_core_web_trf`
duckdb = ["duckdb>=1.0"] # optional DuckDBStore (FLOAT[] + list_cosine_similarity)
dev = ["pytest>=8.0", "ruff>=0.4"]
[project.scripts]
flashtopic = "flashtopic.cli:main"
[tool.hatch.build.targets.wheel]
packages = ["src/flashtopic"]
[tool.pytest.ini_options]
pythonpath = ["src"]
testpaths = ["tests"]
markers = ["slow: longer simulations (coverage checks)"]