API reference

Model profiles

Signatures, parameters, return contracts, and source for model profiles.

Overview

Named profiles provide fixed architecture recipes. Construction returns an untrained model. Mamba profiles use AxoMamba; GRU profiles use AxoTemporalModel with a GRU temporal core. Preserve the backend and saved model kind when loading weights.

Source revision: caef7be03abd. Public export index.

AxoSimModelProfile

axosim.model_family.AxoSimModelProfile(profile_id: str, public_name: str, family: ModelFamily, model_dim: int, state_dim: int, num_layers: int, head_dim: int, mamba_update_normalization: Literal['none', 'fixed_rms'] = 'none')

Source

Stable recipe for one trained-model capacity point.

Parameters

profile_id str
required. Exact key in AXOSIM_MODEL_PROFILES, such as axosim-gru-small.
public_name str
required. Reader-facing name associated with the exact profile ID.
family ModelFamily
required. Temporal model family selected by the named profile.
model_dim int
required. Temporal hidden-feature width.
state_dim int
required. Temporal state width.
num_layers int
required. Number of temporal layers.
head_dim int
required. Configured head width of the backbone.
mamba_update_normalization Literal['none', 'fixed_rms']
default='none'. Normalize residual updates when the supported fixed_rms mode is selected.

Attributes

Constructor fields are retained as read-only attributes.

AXOSIM_MODEL_PROFILES

axosim.model_family.AXOSIM_MODEL_PROFILES: Mapping[str, AxoSimModelProfile]

Source

Read-only mapping from exact profile IDs to architecture recipes. Use create_axosim_profile to construct a model from an entry.

create_axosim_profile

axosim.model_family.create_axosim_profile(profile_id: str, *, base_config: AxoMambaConfig | None=None, use_pytorch_fallback: bool=False) -> nn.Module

Source

Build one named GRU or Mamba profile from the common AxoSim shell.

profile_id must exist in AXOSIM_MODEL_PROFILES. A Mamba profile returns an AxoMamba or fallback backbone; a GRU profile returns AxoTemporalModel with a GRU core. Weights are newly initialized, not downloaded.

Parameters

profile_id str
required. Exact key in AXOSIM_MODEL_PROFILES, such as axosim-gru-small.
base_config AxoMambaConfig | None
keyword-only, default=None. Common backbone configuration whose capacity fields are replaced by the selected profile.
use_pytorch_fallback bool
keyword-only, default=False. Construct the CPU/test-compatible backend. Its checkpoint format differs from the fused backend.

Returns

model nn.Module
Newly initialized Mamba backbone or GRU AxoTemporalModel for the requested profile; no weights are downloaded.

Examples

Construct an untrained, CPU-compatible GRU profile for an interface check.

from axosim import create_axosim_profile

model = create_axosim_profile(
    'axosim-gru-small', use_pytorch_fallback=True
)
print(type(model).__name__)
AxoTemporalModel

Search guides, examples, and API signatures.