config#

Saved execution policy for GDN training-time numerical emulation.

Classes

LinearAttentionConfig

GDN chunk-64 policy; unsupported numerical modes fail config validation.

LinearAttentionDecodeConfig

Explicit suffix recurrence; workload supplies per-sequence prefix lengths.

LinearAttentionPolicyEntry

Assign a complete policy to supported modules matching module_name.

LinearAttentionReplayConfig

Anchor refresh and encoded rank-one update policy.

class LinearAttentionConfig#

Bases: ModeloptBaseConfig

GDN chunk-64 policy; unsupported numerical modes fail config validation.

state.block_v defines one dynamic scale per [Dk, block_v] tile of each sequence/head. The initial state and every chunk’s final state are rounded when gdn_state_quantizer is enabled. Outputs use the incoming rounded state. Decode’s int8_hadamard32 codec instead fixes scales to one key channel and 32 values; state.block_v remains the execution tile width.

backend: Literal['fla', 'matmul']#
chunk_size: Literal[64]#
decode: LinearAttentionDecodeConfig | None#
model_config = {'extra': 'forbid', 'validate_assignment': True}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

schema_version: Literal[1]#
solve: _SolveConfig#
state: _StateConfig#
class LinearAttentionDecodeConfig#

Bases: ModeloptBaseConfig

Explicit suffix recurrence; workload supplies per-sequence prefix lengths.

decay_log_step: float | None#
implementation: Literal['torch', 'triton']#
mode: Literal['token', 'replay']#
model_config = {'extra': 'forbid', 'validate_assignment': True}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

prefill_state_qdq: bool#
quantize_initial: bool#
readout: Literal['working', 'stored']#
replay: LinearAttentionReplayConfig | None#
state_codec: Literal['tile', 'int8_hadamard32']#
class LinearAttentionPolicyEntry#

Bases: ModeloptBaseConfig

Assign a complete policy to supported modules matching module_name.

Rules apply in order: the last match wins, without merging nested fields. A rule must match at least one supported linear-attention module.

cfg: LinearAttentionConfig#
model_config = {'extra': 'forbid', 'validate_assignment': True}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

module_name: str#
class LinearAttentionReplayConfig#

Bases: ModeloptBaseConfig

Anchor refresh and encoded rank-one update policy.

encoding: Literal['once', 'reencode']#
factor_qdq: bool#
model_config = {'extra': 'forbid', 'validate_assignment': True}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

window: int#