tinytopics
¶
Topic modeling via sum-to-one constrained neural Poisson NMF. Built with PyTorch, runs on both CPUs and GPUs.
Installation¶
Using pip¶
You can install tinytopics from PyPI:
Or install the development version from GitHub:
Install PyTorch with GPU support¶
The above will likely install the CPU version of PyTorch by default. To install PyTorch with GPU support, follow the official guide.
For example, install PyTorch for Windows with CUDA 12.6:
pip uninstall torch
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu126
Install alternative PyTorch versions¶
For users stuck with older PyTorch or NumPy versions, for instance, in HPC
cluster settings, a workaround is to skip installing the dependencies with
--no-deps
and install specific versions of all dependencies manually:
Use tinytopics in a project¶
To have a more hassle-free package management experience, it is recommended to use tinytopics as a dependency under a project context using virtual environments.
You should probably set up a manual source/index for PyTorch. As examples, check out the official guidelines when using Rye or using uv.
Examples¶
After tinytopics is installed, try examples from: