计划执行与检查节点
executing-plans
按既定实施计划完成工作,保持过程检查和反馈。
numpyro【效率与协作】Route NumPyro probabilistic programming tasks across modeling primitives, distributions, MCMC diagnostics, SVI/autoguides, JAX backends, and optional contrib workflows.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Use this repo skill when a task involves NumPyro, the JAX-backed probabilistic programming package: writing models with Pyro-like primitives, choosing distributions and transforms, running MCMC or SVI, diagnosing posterior geometry, configuring JAX CPU/GPU/TPU execution, or deciding whether an optional numpyro.contrib workflow is needed.
numpyro>=3.11pip install numpyro
pip install 'numpyro[cpu]'
pip install 'numpyro[cuda12]' -f https://storage.googleapis.com/jax-releases/jax_cuda_releases.html
pip install 'numpyro[cuda13]' -f https://storage.googleapis.com/jax-releases/jax_cuda_releases.html
import jax
import numpyro
import numpyro.distributions as dist
print(numpyro.__version__, jax.default_backend(), jax.devices())
For a stronger environment diagnostic, run scripts/check_numpyro_environment.py. For a concise API/signature probe, run scripts/api_quick_probe.py.
| User task or signal | Read |
|---|---|
Write a model, inspect sample/param sites, condition/seed/trace, fix plate placement, use effect handlers, render or inspect model relations, handle JAX-compatible control flow. | modeling-primitives |
Choose or debug distributions, constraints, batch_shape/event_shape, to_event, Independent, TransformedDistribution, transforms, support validation, finite log_prob. | distributions-transforms |
Run NUTS/HMC/MCMC, choose kernels, collect extra fields, interpret divergences/ESS/r_hat, run posterior predictive or log likelihood, configure chains/devices/x64. | mcmc-diagnostics |
| Fit SVI, write a guide, choose ELBOs, use autoguides, debug guide parameters/losses, use discrete enumeration with SVI. | svi-autoguides |
| Use optional contrib areas: Funsor enumeration helpers, HSGP, nested sampling, SteinVI/SVGD, Flax/NNX/Equinox module wrappers, TFP wrappers, stochastic-support inference. | advanced-contrib |
python scripts/check_numpyro_environment.py --pretty checks core imports, JAX backend, and selected optional dependencies without requiring the source repo.python scripts/api_quick_probe.py --pretty prints key public signatures for primitives, inference classes, autoguides, and utilities.