equinox
Operating skill for the Equinox JAX neural-network and PyTree library.
- License 许可
- Apache-2.0
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- equinox
- license
- Apache 2.0
- metadata
- { "disco-role": "operating" }
- description
- Operating skill for the Equinox JAX neural-network and PyTree library.
- disable-model-invocation
- true
02 资源文件 5
- 参考文档references/api-reference.md7.4 KB
- 参考文档references/repo-provenance.md1.7 KB
- 参考文档references/repo-routing-metadata.json442 B
- 参考文档references/troubleshooting.md6.8 KB
- 脚本scripts/smoke.py7.6 KB
03 SKILL.md 正文
Equinox
Equinox is a JAX library for building models as PyTrees, applying filtered JAX transformations, and using reusable neural-network layers, stateful modules, and advanced debugging utilities.
Use this skill when the user mentions:
equinox,eqx,eqx.Module, orequinox.nn- filtered transforms such as
filter_jit,filter_grad,filter_vmap, orfilter_pmap - model surgery, PyTree partitioning, serialization, or runtime errors
Sequential,MLP,BatchNorm,State,Shared, orinference_modeequinox.internalhelpers such asnoinline,while_loop, orscan
Quick start
Install the public package with:
pip install equinox
For a local checkout or a health check, run the bundled scripts/smoke.py
from the generated skill root (the directory containing this SKILL.md). Set
EQUINOX_SKILL_ROOT to that absolute directory and keep it as the command
working directory:
cd "$EQUINOX_SKILL_ROOT" && python scripts/smoke.py --mode all
If you need multi-device CPU coverage for pmap or sharding checks, add
--two-cpu-devices to the smoke script.
Route map
sub-skills/module-and-trees
Use for eqx.Module, field declarations, abstract attributes, PyTree filtering,
tree_at, tree_equal, tree_check, apply_updates, Partial, and model
surgery.
sub-skills/filtered-transformations
Use for filter_jit, filter_grad, filter_vmap, filter_pmap, filter_eval_shape,
filter_make_jaxpr, custom filtered AD, checkpointing, callbacks, and sharding
behavior.
sub-skills/nn-and-state
Use for equinox.nn layers, Sequential, Lambda, MLP, BatchNorm,
State, StateIndex, Shared, and inference-mode workflows.
sub-skills/diagnostics-and-serialization
Use for tree_serialise_leaves, tree_deserialise_leaves, runtime errors,
debug tools, pretty printing, enumerations, progress meters, and package
troubleshooting.
sub-skills/internal-advanced
Use only for advanced or downstream-library work with equinox.internal,
including noinline, while_loop, scan, nontraceable, finalise_jaxpr,
and primitive authoring helpers.
How to choose
- If the task is about model shape, PyTree composition, or field semantics,
start with
module-and-trees. - If the task is about JAX transforms crossing model boundaries, start with
filtered-transformations. - If the task is about built-in layers, training loops, or stateful modules,
start with
nn-and-state. - If the task is about debugging, serialization, or runtime checks, start with
diagnostics-and-serialization. - If the task explicitly names
equinox.internalor an advanced helper that is not part of the everyday public API, start withinternal-advanced.
Reading order
- Read the sub-skill that matches the dominant workflow.
- Use the linked reference file in that sub-skill for API details, examples, and troubleshooting.
- Use
references/api-reference.mdwhen you need a cross-skill API index. - Use
references/troubleshooting.mdwhen the issue looks like install/import, backend, optional dependency, or mixed-leaf JAX behavior. Readreferences/repo-provenance.mdbefore relying on version-sensitive guidance.
Common signals
- A plain
jax.jitorjax.gradcall fails because a model contains non-array leaves: route tofiltered-transformations. - A module definition fails because fields or abstract attributes are missing:
route to
module-and-trees. - A layer needs
stateoraxis_name, orSequentialhas a stateful layer: route tonn-and-state. - A runtime error, serialization round-trip, or debug trace is the focus:
route to
diagnostics-and-serialization. - A user asks about
noinline,while_loop,scan, or other semi-public helpers: route tointernal-advanced.
Notes
- Equinox is intentionally PyTree-first: models, helper wrappers, and advanced utilities all depend on ordinary JAX semantics rather than a separate runtime.
- There is no repo CLI. Treat library installation, import checks, and API inspection as the primary entry points.
- Prefer the bundled references over source checkout links so the skill stays usable after the repository is no longer present.
04 同仓库更多 Skills
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.
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.
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.
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.
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.
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).