Topic modeling via sum-to-one constrained neural Poisson NMF. Built with PyTorch, runs on both CPUs and GPUs.
You can install tinytopics from PyPI:
pip install tinytopics
Or install the development version from GitHub:
git clone https://github.com/nanxstats/tinytopics.git
cd tinytopics
python3 -m pip install -e .
The above will install the CPU version of PyTorch by default. To enable GPU support, follow the PyTorch official guide to install the appropriate PyTorch version.
For example, install PyTorch for Windows with CUDA 12.4:
pip uninstall torch
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu124
To manage the PyTorch dependency under a project context using virtual environments, you might want to set up manual sources. For example, using Rye or using uv.
After tinytopics is installed, try examples from: