[go: up one dir, main page]

Skip to content

GPU-accelerated topic modeling via sum-to-one constrained neural Poisson NMF with PyTorch

License

Notifications You must be signed in to change notification settings

nanxstats/tinytopics

Repository files navigation

tinytopics

PyPI version Python versions PyPI Downloads License

Topic modeling via sum-to-one constrained neural Poisson NMF.

Built with PyTorch, runs on both CPUs and GPUs.

Installation

You can install tinytopics from PyPI:

pip3 install tinytopics

Or install the development version from GitHub:

git clone https://github.com/nanxstats/tinytopics.git
cd tinytopics
python3 -m pip install -e .

GPU support

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:

pip3 uninstall torch
pip3 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.

Examples

After tinytopics is installed, try examples from: