Model inference

From VectorSpaceLab/AREX-Skill · View interactive version

Model inference is an AI agent skill from the GitHub repository VectorSpaceLab/AREX-Skill. Construct bounded AlphaFold 3 models, choose forward loss or sampling modes, load compatible checkpoints, and inspect confidence, distogram, and ranking outputs.

How to use this skill

Skill file

Model inference

Use this sub-skill after an input has been converted to model-ready tensors, or

use the tiny smoke helper to validate the model contract before allocating a

large run. Start with workflows, then consult the

API contract for exact shapes and

troubleshooting for recovery.

Route by responsibility

masks, representative-atom indices, and output structure conversion to

input-representation.

data-pipeline. This model accepts already prepared

tensors; it does not fetch biological data for you.

loops to training-configuration.

cli-serving.

Operating sequence

  1. Select CPU for contract checks and reduced tests; select CUDA only after the

device, dtype, and memory budget are explicit.

  1. Construct a deliberately reduced Alphafold3 with dimensions and depths

appropriate to the available memory. The constructor's production defaults

are not a smoke configuration.

  1. Validate atom_inputs, atom-pair inputs, token counts, molecule lengths,

masks, and all index offsets before calling forward.

  1. Choose the return mode deliberately: coordinates for inference, or loss and

an optional breakdown when ground-truth positions/labels are supplied.

  1. Add confidence/distogram logits only when they are needed; rank multiple

samples/models with the dedicated scoring classes rather than treating raw

logits as scores.

  1. For a checkpoint, prefer init_and_load when the file was saved by this

package, and verify version, constructor dimensions, device, and strictness

before production inference.

Run the bundled safe check. The examples assume this

sub-skill directory is the current directory; from any other directory, invoke

the linked script by its resolved path because the helper has no current-directory

assumptions:

python scripts/smoke_model.py --help
python scripts/smoke_model.py --mode signature --device cpu
# Only for an explicitly bounded tiny forward:
python scripts/smoke_model.py --mode forward --device cpu --num-sample-steps 2
python scripts/smoke_model.py --mode forward --device cpu --num-sample-steps 2 --with-distogram

The helper never downloads weights, enables PLM/NLM encoders, trains, starts a

server, or uses production-scale defaults. It is a contract probe, not evidence

of useful structural accuracy or production throughput.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.