Favicon of GPyTorch

GPyTorch

An open-source Python library for Gaussian process models, with GPU-accelerated inference, scalable methods, and PyTorch integration under the MIT license.

Screenshot of GPyTorch website

GPyTorch is an open-source Python library for researchers and developers building Gaussian process models in PyTorch. It runs model inference on your own hardware and can use GPUs to accelerate computation. Its focus is on making Gaussian processes practical at larger scales while leaving room to define custom models. The library uses the MIT license.

Its inference approach is a main reason to choose it. Many Gaussian process implementations rely on Cholesky decomposition; GPyTorch instead performs much of its inference through iterative numerical methods, including preconditioned conjugate gradients. This approach can make better use of GPU computing than Cholesky-based solvers.

For larger models, it includes methods such as SKI/KISS-GP and SKIP, along with LOVE and stochastic Lanczos expansions. It also supports stochastic variational deep kernel learning, which connects Gaussian process modeling with deep learning. PyTorch integration makes it relevant to projects that already use that framework and need Gaussian process methods alongside neural networks.

The model components are modular. Developers can compose existing LinearOperators or supply custom kernel matrix operations to implement scalable Gaussian process methods. The documentation includes worked examples for exploring the library's modeling and inference capabilities.

Similar to GPyTorch