UI はローカライズ済みです。スキルの紹介と説明文書は選択した言語へ AI が自動翻訳し、コード・コマンド・パス・専門用語は原文のままです。原作者の文書が優先されます。
スキルを探す
開発・技術 · SKILL.md

svi-autoguides

svi-autoguides

Fit and debug NumPyro stochastic variational inference workflows with ELBOs, manual guides, autoguides, optimizers, and enumeration choices.

Independent GitHub snapshot · Automated classification · Original documentation governs

スキルの説明

GitHub

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/ and distribution support issues through ../distributions-transforms/.
  2. Choose a guide path. Use a manual guide for custom variational families or constraints; use 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 for Trace_ELBO, TraceMeanField_ELBO, TraceGraph_ELBO, TraceEnum_ELBO, RenyiELBO, and discrete enumeration.
  4. Run SVI. Use 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 is a small synthetic SVI check adapted from NumPyro's minimal example.
  7. Triage failures. Use 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

Bundled materials

保存したスキル