config#

Saved execution policy for GDN/KDA state QAT.

Classes

LinearAttentionConfig

One execution policy shared by the chunked prefix and recurrent suffix.

LinearAttentionPolicyEntry

Assign a complete policy to supported modules matching module_name.

class LinearAttentionConfig#

Bases: ModeloptBaseConfig

One execution policy shared by the chunked prefix and recurrent suffix.

serving uses native forward arithmetic with a differentiable adjoint; fla is the disabled/default path. vllm targets vLLM 0.30.0’s Triton prefill and single-token, non-speculative decode with BF16 operands and FP32 recurrent storage. Deployment must explicitly select Triton prefill (gdn_prefill_backend="triton") and enable packed recurrent decode (VLLM_ENABLE_FLA_PACKED_RECURRENT_DECODE=1). Mixed prefill/decode batches and automatic FlashInfer/CuTe dispatch are outside this profile. KDA uses the standalone FLA/Triton API, with no model-level serving guarantee. vllm_kimi_k3 explicitly selects vLLM’s Kimi-K3 Triton kernels (also used by Kimi-Linear in vLLM 0.30), raw projections and that model package’s dependencies. These targets are saved in ModelOpt/Megatron policy metadata, not HF export; they do not configure or validate a remote server. Kimi serving must set both kda_prefill_backend and kda_decode_backend to triton; the supported gate is unbounded softplus. Fresh prefill has no internal state QDQ; incoming continuation state and the handoff to a nonempty suffix use the selected checkpoint encoding.

TensorQuantizer enables QDQ and owns its format and grouping. state_block_v controls grouping only for legacy per-tile quantizers.

backend: Literal['fla', 'serving']#
model_config = {'extra': 'forbid', 'validate_assignment': True}#

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

precision: Literal['vllm', 'vllm_kimi_k3']#
state_block_v: Literal[16, 32, 64, 128]#
class LinearAttentionPolicyEntry#

Bases: ModeloptBaseConfig

Assign a complete policy to supported modules matching module_name.

Rules apply in order: the last match wins, without merging fields. Unmatched rules are ignored locally, as with quant_cfg, so a shared recipe can be applied independently to pipeline stages and virtual-pipeline chunks.

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#