nutpie
Sample Stan or PyMC models
Decision gist · record as of 2026-08-14
Yes, if you use Bayesian modeling and want faster sampling with minimal code changes. The package is actively maintained with recent releases, has no known vulnerabilities, and offers pre-built wheels for modern Python versions. Install friction is moderate due to Rust compilation on source builds, but pre-built wheels mitigate this for standard platforms. The MIT license poses no restrictions. Verify that sampling efficiency gains apply to your specific models before adopting as a primary sampler.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python ≥3.12.
- For source builds, a Rust compiler and maturin are needed.
- Stan support requires bridgestan and a C++ compiler.
License · maintenance · safety
MIT (permissive) — MIT license is permissive and imposes no significant restrictions on use, modification, or redistribution in commercial or private projects.
last release 2026-06-30 (45 days) · last repo commit 2026-08-10 · 205 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 305,005 downloads/mo, #7,800 on PyPI
Alternatives
Verify before relying
pip install nutpie
import nutpie
# After defining a model:
compiled_model = nutpie.compile_pymc_model(pymc_model)
trace = nutpie.sample(compiled_model)- Whether the claimed higher effective sample size per gradient evaluation is validated in peer-reviewed benchmarks.
- Performance characteristics and convergence speed relative to standard samplers in real-world hierarchical models.
- Whether the SIMD support feature provides measurable speedup and which models benefit most.
What it is and what it does
nutpie is a Bayesian sampling library that wraps nuts-rs, a Rust implementation of the No-U-Turn Sampler algorithm. It compiles probabilistic models and samples from their posterior distributions, returning results as ArviZ InferenceData objects compatible with standard Bayesian workflows. The package targets users who want faster sampling, particularly for hierarchical and complex models where gradient evaluation is a bottleneck.
The library integrates with existing model ecosystems, accepting model definitions in native syntax and producing compatible output. It supports both blocking and non-blocking sampling modes, allowing interactive control (pause, resume, abort) over long-running inference tasks. Dependencies include data handling (pandas, pyarrow, xarray), statistical output (arviz), and storage (zarr, obstore), reflecting its role as a sampler within existing Bayesian analysis pipelines.
Use it for
- Accelerate sampling for hierarchical models by replacing default samplers without rewriting model code.
- Sample large models where gradient evaluation dominates runtime, using Rust backend for speed.
- Interactively monitor and control long-running Bayesian inference via pause/resume without blocking.
- Combine with arviz for post-sampling diagnostics and visualization of posterior traces.
- Prototype models, then accelerate sampling without changing model definitions.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you use Bayesian modeling and want faster sampling with minimal code changes.
The package is actively maintained with recent releases, has no known vulnerabilities, and offers pre-built wheels for modern Python versions. Install friction is moderate due to Rust compilation on source builds, but pre-built wheels mitigate this for standard platforms. The MIT license poses no restrictions. Verify that sampling efficiency gains apply to your specific models before adopting as a primary sampler.
Install
nutpie on PyPI
Before you install
Medium install friction due to Rust compilation requirement. Pre-built wheels available for Python 3.12–3.14 across macOS, Linux, and Windows reduce friction for standard platforms. Eight runtime dependencies add some complexity but are widely used data and statistical libraries.
Requires Python ≥3.12. For source builds, a Rust compiler and maturin are needed. Stan support requires bridgestan and a C++ compiler.
License in practice
MIT license is permissive and imposes no significant restrictions on use, modification, or redistribution in commercial or private projects.
Quickstart
pip install nutpie
import nutpie
# After defining a model:
compiled_model = nutpie.compile_pymc_model(pymc_model)
trace = nutpie.sample(compiled_model)
Verify before relying
- Whether the claimed higher effective sample size per gradient evaluation is validated in peer-reviewed benchmarks.
- Performance characteristics and convergence speed relative to standard samplers in real-world hierarchical models.
- Whether the SIMD support feature provides measurable speedup and which models benefit most.
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=3.12 |
| Install friction | Medium. Platform-specific wheel |
| Runtime dependencies | 8 packagespyarrowarro3-corepandasplatformdirsxarrayarvizobstorezarr |
| Maintenance | Actively maintained 45 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 305,005 / month, #7,800 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyProgramming Language :: Rust |
Evidence: nutpie-0.16.11-cp312-cp312-macosx_10_12_x86_64.whl; nutpie-0.16.11-cp312-cp312-macosx_11_0_arm64.whl; nutpie-0.16.11-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl; nutpie-0.16.11-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl; nutpie-0.16.11-cp312-cp312-win_amd64.whl; nutpie-0.16.11-cp313-cp313-macosx_10_12_x86_64.whl; nutpie-0.16.11-cp313-cp313-macosx_11_0_arm64.whl; nutpie-0.16.11-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl; nutpie-0.16.11-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl; nutpie-0.16.11-cp313-cp313-win_amd64.whl; nutpie-0.16.11-cp314-cp314-macosx_10_12_x86_64.whl; nutpie-0.16.11-cp314-cp314-macosx_11_0_arm64.whl; nutpie-0.16.11-cp314-cp314-manylinux_2_17_aarch64.manylinux2014_aarch64.whl; nutpie-0.16.11-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl; nutpie-0.16.11-cp314-cp314-win_amd64.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “bayesian sampling nuts”
- nutpienutpie provides a fast NUTS sampler for Bayesian inference on PyMC…
- blackjaxBlackJAX provides a collection of MCMC and other sampling algorithms…
- numpyroNumPyro is a probabilistic programming library that uses JAX for…
Give your agent the search over MCP, or paste the wish link into any chat.
More Scientific/Engineering packages
NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.
pandas provides fast, flexible data structures (Series and DataFrame) for loading, cleaning, transforming, and analyzing labeled or relational data in Python.
scipy provides numerical algorithms for mathematics, science, and engineering—including optimization, integration, linear algebra, Fourier transforms, signal and image processing, and ODE solvers—built on numpy arrays.
scikit-learn provides a comprehensive Python library for supervised and unsupervised machine learning, including classification, regression, clustering, dimensionality reduction, and model evaluation tools built on NumPy and SciPy.
Install it if you need to train, evaluate, or deploy supervised or unsupervised learning models.
dill extends Python's pickle module to serialize and deserialize a much wider range of Python objects, including functions, lambdas, classes, and interpreter sessions, to byte streams for storage or network transmission.
Multiprocess is an enhanced fork of Python's standard multiprocessing library that uses dill for better serialization, allowing you to spawn processes with a threading-like API and share complex objects between them.
Install it if you use multiprocessing and encounter pickle serialization limits with lambdas or complex objects.
See also pymc · pystan · httpstan · pymc-extras · cmdstanpy · emcee · pymc3 · numpyro · pymc-marketing · arviz-base