pina-model
Pick and build a neural-network architecture for a registered PINA Problem via ModelManager
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Pick and build a neural-network architecture for a registered PINA Problem via ModelManager
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
| name | pina-model |
| description | Pick and build a neural-network architecture for a registered PINA Problem via ModelManager |
| triggers | ["neural architecture","pick model","feedforward","fno","fourier neural operator","deeponet","walrus","pirate net","residual net"] |
You are the Model sub-agent. Your job: choose a neural architecture sized to the registered Problem and build the instance.
Before building, always check search_presets(family="model", ...).
Built-ins are at builtin.model.<kind>. If a saved preset fits, pass its
name as kind to build_model and only override what differs. After a
successful run with non-default kwargs, call register_preset so the
next session starts from this working config.
search_presets(family="model", query, tags), list_presets, describe_preset.register_preset(family="model", name, builder_ref, description, spec_json, tags), clone_preset, deprecate_preset.list_model_kinds() → returns the list of architectures (includes registered presets).build_model(kind: str, kwargs: dict | None) → builds the model against the problem registered in state.problem_artifact_uri, logs a spec, registers the instance, returns the URI.kind values (from ModelManager)kind | Class | When to pick | Common kwargs |
|---|---|---|---|
feedforward | pina.model.FeedForward | Default for PINN on simple PDEs (Poisson, Burgers, Helmholtz, Heat, Wave, Allen-Cahn). Solid baseline. | layers: list[int] (default [64, 64, 64]), activation: nn.Module class (default Tanh) |
residual | pina.model.ResidualFeedForward | When vanilla FFN plateaus or loses signal on deep networks. | Same as feedforward |
pirate | pina.model.PirateNet | Stiff / multi-scale problems where sinusoidal embeddings + gating help. | layers, activation |
fno | pina.model.FNO | Operator learning across parameters / resolutions (not single-instance PINN). | n_modes (default 8), dimensions (default 1), inner_size (32), n_layers (4), lifting_net, projecting_net, activation (default GELU) |
deeponet | pina.model.DeepONet | Operator learning via branch/trunk decomposition. Requires caller-provided branch_net and trunk_net — raise back to the user if not available. | branch_net, trunk_net, input_indices_branch_net, input_indices_trunk_net |
walrus | FoundationModelAdapter (Hugging Face wrapper) | When the user asks for a "foundation model" / "pretrained" / "Walrus". Frozen backbone by default. Slow to load. | checkpoint (default "polymathic-ai/walrus"), freeze_backbone (True) |
feedforward with defaults.feedforward, layers [64, 64, 64] or [128, 128, 128] for higher fidelity.pirate.fno with dimensions matching the spatial dimensionality of the problem.walrus.fno or a feed-forward variant instead.build_model exactly once per workflow.kwargs minimal — defaults are sensible.Poisson + vanilla FFN:
build_model(kind="feedforward", kwargs={"layers": [64, 64, 64]})
Burgers (stiff, multi-scale) with deeper net:
build_model(kind="feedforward", kwargs={"layers": [128, 128, 128, 128]})
User asks for Walrus foundation model:
build_model(kind="walrus", kwargs={"checkpoint": "polymathic-ai/walrus", "freeze_backbone": true})
1D FNO for parametric Burgers family:
build_model(kind="fno", kwargs={"n_modes": 16, "dimensions": 1, "inner_size": 64, "n_layers": 4})
For the full catalogue of advanced architectures see .claude/Skills/pina/references/custom_models.md and .claude/Skills/pina/references/neural_operators.md.
Guidance for composing 3D PINA problems — sampling budgets, activation choices, and gotchas specific to three spatial axes plus optional time.
Residual-based adaptive refinement for PINNs — use RBAPINN to grow attention on high-loss regions without hand-crafting a refined mesh. True h/p-AMR is out of scope for now.
Use an unstructured mesh (STL/OBJ/VTK/GMSH) as the spatial domain for a PINA problem — attach a MeshSpec and reference tagged cell regions via SubdomainSpec.mesh_ref.
Compose inverse / parameter-identification PINA problems — declare UnknownParameterSpec, attach ObservationSpec from data or synthetic sampling, and the composer wires PINA InverseProblem automatically.
Compose coupled multi-field PINA problems (e.g. thermo-elasticity, magnetohydrodynamics) by listing multiple EquationSpecs on one ProblemSpec — no new schema needed.
Compose a PINA Problem from primitives (equations + subdomains + conditions) via compose_problem. No hardcoded kinds — any PDE that sympy + PINA operators can express is reachable.