gpytorch
An implementation of Gaussian Processes in Pytorch
What it is and what it does
GPyTorch is a Gaussian process library built on PyTorch that shifts GP inference away from Cholesky-based solvers toward preconditioned conjugate gradient and matrix-vector multiplication techniques. This design choice enables both GPU acceleration and modular composition of inference methods through its linear_operator interface. The library implements recent algorithmic advances in scalable GPs and integrates naturally with deep learning workflows, making it suitable for practitioners who need flexible, GPU-friendly GP models alongside neural network components.
The package depends on scipy, scikit-learn, mpmath, and linear_operator for its core functionality. It targets modern Python versions (3.10+) and PyTorch 2.0+, reflecting a focus on current-generation tooling. Installation is straightforward via pip or conda, and the library is actively maintained with regular releases.
Use it for:
- Building scalable Gaussian process models for regression or classification on large datasets with GPU acceleration.
- Integrating Gaussian processes into deep learning pipelines using PyTorch's autograd and GPU infrastructure.
- Implementing custom GP inference methods by composing linear_operator for specialized kernel structures.
- Applying state-of-the-art variational inference or stochastic approximation techniques to reduce computational cost.
- Prototyping and experimenting with advanced GP algorithms without reimplementing inference from scratch.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
GPyTorch is a PyTorch-based Gaussian process library that enables scalable GP inference using numerical linear algebra techniques and GPU acceleration via matrix-vector multiplication operations.
Yes. GPyTorch is actively maintained, has no known vulnerabilities, installs with low friction, and is licensed permissively under MIT. It is well-suited for anyone building Gaussian process models in PyTorch, especially when GPU acceleration or integration with deep learning is desired. The library's modular design and algorithmic breadth make it a strong choice for both research and production use.
Install
gpytorch on PyPI
pip
pip install gpytorchuv
uv add gpytorchpoetry
poetry add gpytorchInstalling gpytorch
Before you install
Low friction installation with a pure Python wheel. The package is actively maintained with a recent release and depends on well-established libraries (scipy, scikit-learn, mpmath, linear_operator), all of which install without compilation barriers.
License in practice
MIT license is permissive; you can use, modify, and distribute GPyTorch with minimal restrictions, making it suitable for both open-source and commercial projects.
Quickstart
pip install gpytorch
import gpytorch
# Create a simple GP model by subclassing and composing kernels
model = gpytorch.models.ExactGP(train_x, train_y, likelihood)
model.mean_module = gpytorch.means.ConstantMean()
model.covar_module = gpytorch.kernels.ScaleKernel(gpytorch.kernels.RBFKernel())
Requires Python >= 3.10 and PyTorch >= 2.0; GPU support is optional but recommended for scalability.
Verify before relying
- Whether GPU acceleration is automatic or requires explicit configuration for typical workflows.
- Performance characteristics and scalability limits for different dataset sizes and kernel types.
- Availability and maturity of implementations for all advertised algorithmic advances (SKI/KISS-GP, LOVE, SKIP, stochastic variational, deep kernel learning).
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 4 — mpmath, scikit-learn, scipy, linear_operator |
| Maintenance | actively maintained — 167 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 1,159,768/month — #4,286 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: gpytorch-1.15.2-py3-none-any.whl
Tags
More Artificial Intelligence packages
LiteLLM provides a unified Python interface to…
permissive · top 100 on PyPI
huggingface-hubClient library and CLI tool for downloading,…
permissive · top 100 on PyPI
langchainLangChain provides a framework for building…
permissive · top 1,000 on PyPI
hf-xethf-xet provides chunk-based deduplication and…
permissive · top 1,000 on PyPI
tokenizersTokenizers converts raw text into token…
permissive · top 1,000 on PyPI
transformersTransformers provides a unified framework for…
permissive · top 1,000 on PyPI
botorchBoTorch provides a modular, PyTorch-based…
permissive · top 5,000 on PyPI
gsplatgsplat is a CUDA-accelerated Python library for…
unclear · top 15,000 on PyPI
nvidia-cublasProvides NVIDIA CUBLAS native runtime libraries…
unclear · top 1,000 on PyPI
zukoZuko implements normalizing flows in PyTorch as…
permissive · top 15,000 on PyPI
torchsdeSolves stochastic differential equations (SDEs)…
permissive · top 5,000 on PyPI
nvidia-cusolverProvides CUDA solver native runtime libraries…
unclear · top 1,000 on PyPI
nvidia-cusparseProvides NVIDIA CUSPARSE native runtime…
unclear · top 1,000 on PyPI
nvidia-cusolver-cu11Provides NVIDIA CUDA solver native runtime…
unclear · top 5,000 on PyPI
nvidia-cusolver-cu12Provides CUDA solver native runtime libraries…
unclear · top 1,000 on PyPI
nvidia-cublas-cu11Provides NVIDIA CUBLAS native runtime libraries…
unclear · top 5,000 on PyPI