AGENT SKILL

advanced-contrib

Route and use optional NumPyro contrib workflows while keeping dependency and core-API boundaries explicit.

License 许可
Apache-2.0
最近更新
2026-09-03
Stars
★ 351
Forks
27

01 前言 Front Matter

name
advanced-contrib
license
Apache 2.0
metadata
{ "disco-role": "operating" }
description
Route and use optional NumPyro contrib workflows while keeping dependency and core-API boundaries explicit.
disable-model-invocation
true

02 资源文件 5

03 SKILL.md 正文

advanced-contrib

Use this sub-skill when a NumPyro task explicitly involves optional or experimental numpyro.contrib.* workflows rather than always-installed core modeling, distributions, MCMC, or SVI.

Triggers

Load this sub-skill for requests involving:

  • numpyro.contrib.funsor enumeration helpers: config_enumerate, infer_discrete, markov, enum handlers, or exact marginalization of discrete latent variables.
  • Hilbert-space Gaussian process approximations in numpyro.contrib.hsgp.
  • numpyro.contrib.nested_sampling.NestedSampler and nested sampling through jaxns.
  • numpyro.contrib.einstein particle/Stein inference: SteinVI, SVGD, ASVGD, Stein kernels, or MixtureGuidePredictive.
  • numpyro.contrib.module wrappers for Flax Linen, Flax NNX, or Equinox modules.
  • TensorFlow Probability integration through numpyro.contrib.tfp or direct TFP JAX substrate distributions in NumPyro models.
  • Stochastic-support inference: DCC, SDVI, or branch sites marked with infer={"branching": True}.

First routing decision

  1. If the request is plain sample, param, plate, handlers, module, mutable, scan, or cond, route to modeling-primitives.
  2. If it is native numpyro.distributions, constraints, transforms, support, shapes, or TFP distribution fallback selection, route to distributions-transforms and return here only for TFP-specific caveats.
  3. If it is ordinary MCMC, NUTS, HMC, diagnostics, chain methods, or discrete HMC Gibbs, route to mcmc-diagnostics and return here only for NestedSampler or TFP MCMC kernels.
  4. If it is ordinary SVI, ELBO choice, autoguides, optimizers, or predictive use, route to svi-autoguides and return here only for SteinVI/SVGD/ASVGD or SDVI.
  5. If the task names contrib, an optional dependency, or one of the APIs above, stay in this sub-skill and check optional dependencies before coding.

Required workflow

  • Treat contrib features as optional. A missing optional dependency is not evidence that core NumPyro is broken.
  • Before suggesting or executing contrib code in a minimal environment, run or adapt scripts/check_optional_dependencies.py:
    • python scripts/check_optional_dependencies.py --pretty
    • python scripts/check_optional_dependencies.py --require nested_sampling
    • python scripts/check_optional_dependencies.py --require module_flax
  • Keep examples bounded: tiny synthetic data, CPU-safe sample counts, no downloads, no plotting unless the task explicitly asks for plots and plotting dependencies are present.
  • Prefer native NumPyro APIs for core tasks; use contrib only when it adds a capability not covered by the sibling sub-skills.

Reference map

04 同仓库更多 Skills

VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-triton-opt

Make a single PassNet Triton kernel fast AND numerically faithful: performance model (when a replacement can win at all), block/grid/warp tuning, autotune policy, launch overhead, and per-op numeric recipes to pass the dtype baseline tolerances. Use when a pass matches and is correct but speedup below expected, or when correctness fails by small numeric margins.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-solve

END-TO-END playbook for solving one PassNet sample: analyze the computation graphs, decide the optimization strategy (what to fuse, what to replace, what to leave alone), drive the iteration loop, and maximize the sample score. This is the ENTRY skill — invoke it first for any PassNet optimization task; it tells you when to use passnet-pattern-fusion, passnet-triton-opt and passnet-feedback.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-skill

PassNet GPU kernel optimization via compiler passes. Design and implement Triton-based optimization passes, create pass files under ./pass_dir/, self-evaluate with pass_evaluator, and iterate to maximize GPU speedup.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-pattern-fusion

Author PassNet pass files: write patterns that actually MATCH the FX graph, pick fusion regions (which ops to absorb into one Triton kernel), and structure multi-pass submissions with the mandatory shared-dispatch architecture. Use when creating or fixing pattern()/replacement_args()/replacement_func() files, when a pass "failed to match", or when deciding how to fuse multiple kernels/ops.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-orchestrate

Round/batch planning and decision support for PassNet graph optimization. Use for multi-sample triage, worker allocation, eval-budget policy, and post-eval keep/revert decisions. For solving one concrete sample end to end, use passnet-solve as the entry skill; consult this skill only when you need broader planning or a specific decision gate.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-feedback

Fast, deterministic feedback for PassNet work: pre-flight pattern/match verification WITHOUT burning a GPU evaluation, per-node bottleneck analysis of a sample's graphs, and eval-log parsing into per-variant status + estimated score + failure classification. Use BEFORE every GPU evaluation (check_pattern), at the START of a sample (analyze_graph), and AFTER every evaluation (parse_eval_log).

★ 351