Skip to content
Back to skills

Svi Autoguides

ASecurity

"Fit and debug NumPyro stochastic variational inference workflows

  • 247 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added September 8, 2026
documentationgo

Security analysis

A100/100

Pro scans all 6 files and shows the line behind each finding

Scanned September 8, 2026

npx -y skills add VectorSpaceLab/AREX-Skill --skill svi-autoguides --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Svi Autoguides?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Svi Autoguides
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vectorspacelab-svi-autoguides/badge)](https://www.skillsdirectory.com/skills/vectorspacelab-svi-autoguides)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: svi-autoguides
description: "Fit and debug NumPyro stochastic variational inference workflows
  with ELBOs, manual guides, autoguides, optimizers, and enumeration choices."
disable-model-invocation: true
metadata:
  disco-role: operating
license: Apache 2.0
---

# svi-autoguides

Use this sub-skill when the task is to fit a NumPyro model with stochastic variational inference (SVI), write or repair a guide, choose an ELBO, use automatic guides, inspect learned parameters and losses, handle discrete latent variables in SVI, or turn SVI results into posterior/predictive samples.

## Quick workflow

1. **Confirm model and guide signatures.** Model/guide primitive and shape issues route through [../modeling-primitives/](../modeling-primitives/) and distribution support issues through [../distributions-transforms/](../distributions-transforms/).
2. **Choose a guide path.** Use a manual guide for custom variational families or constraints; use [references/autoguide-reference.md](references/autoguide-reference.md) for `AutoNormal`, `AutoDelta`, normal-family autoguides, Laplace, flow guides, DAIS, and guide lists.
3. **Choose an ELBO.** Use [references/elbo-and-enumeration.md](references/elbo-and-enumeration.md) for `Trace_ELBO`, `TraceMeanField_ELBO`, `TraceGraph_ELBO`, `TraceEnum_ELBO`, `RenyiELBO`, and discrete enumeration.
4. **Run SVI.** Use [references/svi-workflows.md](references/svi-workflows.md) for `SVI.init`, `update`, `run`, `get_params`, `evaluate`, optimizer selection, and posterior predictive use.
5. **Validate losses and params.** Check finite losses, constrained parameter values, expected keys, and posterior predictive shapes.
6. **Run the bundled smoke.** [scripts/svi_smoke.py](scripts/svi_smoke.py) is a small synthetic SVI check adapted from NumPyro's minimal example.
7. **Triage failures.** Use [references/troubleshooting.md](references/troubleshooting.md) for NaN losses, invalid guide values, wrong ELBO for discrete sites, missing `optax`/`funsor`, and local-latent guide limitations.

## Prefer this sub-skill for

- `SVI(model, guide, optim, loss)` setup and update loops.
- `Trace_ELBO`, `TraceMeanField_ELBO`, `TraceGraph_ELBO`, `TraceEnum_ELBO`, or `RenyiELBO` decisions.
- `numpyro.param` constraints in guides.
- `AutoNormal`, `AutoDiagonalNormal`, `AutoMultivariateNormal`, `AutoLowRankMultivariateNormal`, `AutoDelta`, `AutoGuideList`, `AutoLaplaceApproximation`, `AutoIAFNormal`, `AutoBNAFNormal`, `AutoDAIS`, `AutoSemiDAIS`, and `AutoSurrogateLikelihoodDAIS`.
- Discrete enumeration with `config_enumerate`, `infer={"enumerate": "parallel"}`, and `TraceEnum_ELBO`.
- Optimizer selection with `numpyro.optim` or optional Optax optimizers.

## Route elsewhere when

- The task is MCMC/NUTS/HMC, chain diagnostics, divergences, or posterior samples from MCMC: use [../mcmc-diagnostics/](../mcmc-diagnostics/).
- The task is a core model/handler/plate trace before fitting: use [../modeling-primitives/](../modeling-primitives/).
- The task is distribution constructor/support/transform shape semantics: use [../distributions-transforms/](../distributions-transforms/).
- The task is SteinVI/SVGD/ASVGD, Funsor internals, neural module wrappers, nested sampling, HSGP, or TFP: use [../advanced-contrib/](../advanced-contrib/).

## Bundled materials

- [SVI workflows](references/svi-workflows.md) covers manual guides, loops, params, losses, and predictive use.
- [Autoguide reference](references/autoguide-reference.md) maps guide families to task signals and caveats.
- [ELBO and enumeration](references/elbo-and-enumeration.md) explains loss selection and discrete latent handling.
- [Troubleshooting](references/troubleshooting.md) gives symptom-to-fix guidance.
- [SVI smoke script](scripts/svi_smoke.py) validates a tiny synthetic variational fit.

Files in this skill

  • SKILL.md3.7 KB
  • references/autoguide-reference.md4.2 KB
  • references/elbo-and-enumeration.md4.2 KB
  • references/svi-workflows.md4.6 KB
  • references/troubleshooting.md3.7 KB
  • scripts/svi_smoke.py3.9 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.