noether.core.schemas.modules.untied

Classes

UntiedLinearConfig

Configuration for a linear layer with per-type (untied) weight banks.

UntiedMixedAttentionConfig

Configuration for multi-head attention with per-type (untied) QKV and output projections.

UntiedMLPConfig

Configuration for an MLP with per-type (untied) weights.

UntiedTransformerBlockConfig

Configuration for a transformer block with per-type (untied) attention and MLP weights.

UntiedPerceiverBlockConfig

Configuration for a perceiver block with per-type (untied) Q/output projections and MLP weights.

Module Contents

class noether.core.schemas.modules.untied.UntiedLinearConfig(/, **data)

Bases: pydantic.BaseModel

Configuration for a linear layer with per-type (untied) weight banks.

Composes a LinearProjectionConfig (shared across types) with a num_types field: each token type gets its own independent weight matrix with the geometry described by the linear projection config.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Parameters:

data (Any)

num_types: int = None

Number of distinct token types, each with its own weight bank.

linear_projection: noether.core.schemas.modules.layers.LinearProjectionConfig

Shared geometry (input/output dims, bias, init) for every per-type weight bank.

class noether.core.schemas.modules.untied.UntiedMixedAttentionConfig(/, **data)

Bases: noether.core.schemas.modules.attention.MixedAttentionConfig

Configuration for multi-head attention with per-type (untied) QKV and output projections.

Extends MixedAttentionConfig with a num_types field: the QKV and output projections are UntiedLinear layers so each token type gets its own projection weights. Attention itself is still computed across all tokens via MixedAttention._process_pattern_batched().

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Parameters:

data (Any)

num_types: int = None

Number of distinct token types, each with its own QKV/output weight bank.

projection_config()

Configuration for the per-type QKV and output projections.

Return type:

UntiedLinearConfig

class noether.core.schemas.modules.untied.UntiedMLPConfig(/, **data)

Bases: pydantic.BaseModel

Configuration for an MLP with per-type (untied) weights.

Composes an MLPConfig (architecture: dims, activation, init) with a num_types field. The untied MLP mirrors MLP’s topology (input -> [hidden]*(num_layers+1) -> output with activations between layers) but uses UntiedLinear for every linear layer.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Parameters:

data (Any)

num_types: int = None

Number of distinct token types.

mlp: noether.core.schemas.modules.mlp.MLPConfig

Underlying MLP architecture (dims, activation, init).

class noether.core.schemas.modules.untied.UntiedTransformerBlockConfig(/, **data)

Bases: pydantic.BaseModel

Configuration for a transformer block with per-type (untied) attention and MLP weights.

Composes a TransformerBlockConfig (shared layout: dims, heads, layer scale, drop path, etc.) with a num_types field. Both sub-layers have per-type weights: UntiedMultiHeadAttention for attention and UntiedMLP for the feed-forward.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Parameters:

data (Any)

num_types: int = None

Number of distinct token types for the untied MLP.

transformer_block: noether.core.schemas.modules.blocks.TransformerBlockConfig

Shared transformer-block layout (dims, heads, layer scale, drop path, etc.).

attention_config()

Configuration for the UntiedMultiHeadAttention sub-layer.

Return type:

UntiedMixedAttentionConfig

untied_mlp_config()

Configuration for the UntiedMLP sub-layer.

Return type:

UntiedMLPConfig

class noether.core.schemas.modules.untied.UntiedPerceiverBlockConfig(/, **data)

Bases: pydantic.BaseModel

Configuration for a perceiver block with per-type (untied) Q/output projections and MLP weights.

Composes a PerceiverBlockConfig (shared layout: dims, heads, layer scale, drop path, etc.) with a num_types field. The Q and output projections in PerceiverAttention become per-type via UntiedLinear, while the KV projection stays shared (it operates on a single geometry encoding). The MLP is also replaced with UntiedMLP.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Parameters:

data (Any)

num_types: int = None

Number of distinct token types for the untied projections.

perceiver_block_config: noether.core.schemas.modules.blocks.PerceiverBlockConfig

Shared perceiver-block layout (dims, heads, kv_dim, layer scale, drop path, etc.).

untied_mlp_config()

Configuration for the UntiedMLP sub-layer.

Return type:

UntiedMLPConfig