--- id: botorch version: "0.18.1" license: MIT license_treatment: permissive maintenance: active --- # botorch — Bayesian Optimization in PyTorch License: permissive · Maintenance: active · Downloads: 828.0K/mo ## What it is and what it does BoTorch is a Bayesian optimization library built on PyTorch that lets researchers and practitioners compose optimization algorithms from modular components: probabilistic models (especially Gaussian Processes via gpytorch), acquisition functions, and optimizers. It leverages PyTorch's autodifferentiation and GPU support to enable efficient Monte Carlo-based acquisition function optimization without restrictive modeling assumptions. The library targets researchers and sophisticated practitioners doing active research on Bayesian optimization algorithms. BoTorch supports advanced probabilistic models including multi-task Gaussian Processes, deep kernel learning, and deep GPs, making it suitable for complex optimization problems that integrate with deep learning architectures. Use it for: - Compose custom Bayesian optimization algorithms from probabilistic models, acquisition functions, and optimizers for research. - Optimize expensive black-box functions using Gaussian Process models with GPU acceleration for large-scale optimization. - Integrate Bayesian optimization into deep learning pipelines using PyTorch's autodifferentiation and GPU support. - Experiment with advanced probabilistic models like multi-task GPs or deep GPs for structured optimization problems. - Build acquisition function variants using the reparameterization trick without restrictive modeling assumptions. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. BoTorch provides a modular, PyTorch-based framework for building Bayesian optimization algorithms with probabilistic models, acquisition functions, and optimizers. Yes, if you are a researcher or sophisticated practitioner actively developing Bayesian optimization algorithms. The library is actively maintained, has low install friction, and offers a modular, extensible interface backed by PyTorch's performance and GPU support. No if you are an end-user seeking a simple optimization tool. The beta status and requirement for Python >= 3.11 and PyTorch >= 2.0.1 reflect active development. ## Install pip install botorch uv add botorch poetry add botorch ## Installing botorch Before you install: Low friction install with a pure-Python wheel. Requires PyTorch >= 2.0.1 and gpytorch >= 1.14 as core dependencies. Actively maintained with recent releases; last commit 2026-08-14 and 3584 repository stars indicate ongoing development. License in practice: MIT licensed under permissive terms, allowing use in commercial and proprietary projects with minimal restrictions. Quickstart: pip install botorch import torch from botorch.models import SingleTaskGP from botorch.fit import fit_gpytorch_mll from gpytorch.mlls import ExactMarginalLogLikelihood train_X = torch.rand(10, 2, dtype=torch.double) train_Y = torch.rand(10, 1, dtype=torch.double) gp = SingleTaskGP(train_X=train_X, train_Y=train_Y) mll = ExactMarginalLogLikelihood(gp.likelihood, gp) fit_gpytorch_mll(mll) Requires Python >= 3.11, PyTorch >= 2.0.1, and gpytorch >= 1.14. Double precision (torch.double) is highly recommended for Gaussian Process models. Verify before relying: - Whether the package's beta status (Development Status :: 4 - Beta) indicates API stability concerns for production use. - Performance characteristics when scaling to large datasets or high-dimensional optimization problems. - Integration patterns and whether direct use versus higher-level tools is appropriate for your use case. ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 828.0K/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags bayesian optimization pytorch, gaussian process optimization, acquisition function optimization, monte carlo bayesian optimization, hyperparameter tuning framework, probabilistic model optimization, gpytorch bayesian optimization, bayesian-optimization, gaussian-processes, pytorch-based [View on SkillFed](https://skillfed.io/packages/botorch) · [View on PyPI](https://pypi.org/project/botorch/)