config#
Saved execution policy for GDN training-time numerical emulation.
Classes
GDN chunk-64 policy; unsupported numerical modes fail config validation. |
|
Explicit suffix recurrence; workload supplies per-sequence prefix lengths. |
|
Assign a complete policy to supported modules matching |
|
Anchor refresh and encoded rank-one update policy. |
- class LinearAttentionConfig#
Bases:
ModeloptBaseConfigGDN chunk-64 policy; unsupported numerical modes fail config validation.
state.block_vdefines one dynamic scale per[Dk, block_v]tile of each sequence/head. The initial state and every chunk’s final state are rounded whengdn_state_quantizeris enabled. Outputs use the incoming rounded state. Decode’sint8_hadamard32codec instead fixes scales to one key channel and 32 values;state.block_vremains 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:
ModeloptBaseConfigExplicit 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:
ModeloptBaseConfigAssign 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.
- 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:
ModeloptBaseConfigAnchor 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#