skillfed

gpytorch

An implementation of Gaussian Processes in Pytorch

gpytorch v1.15.2 1.2M downloads/30d#4,286 on PyPI3,906
Permissive license MIT Active released

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 gpytorch

uv

uv add gpytorch

poetry

poetry add gpytorch

Installing 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

Development Status :: 5 - Production/StableProgramming Language :: Python :: 3

Tags

gaussian process pytorchscalable GP inferenceGPU accelerated gaussian processeskernel matrix linear algebravariational inference deep learning
gaussian-processesgpu-accelerationprobabilistic-ml

More Artificial Intelligence packages

Further reading