mstar.engine.resources.attn.ragged.config#
What a model declares about cacheless (ragged) attention.
Kept free of the manager and its kernels, like the other resources’ configs, so a submodule can declare a step without pulling FlashInfer in behind it.
Classes
|
Varlen self-attention over segments packed into one forward, with no KV cache: the whole layout is this step's, and nothing carries to the next. |
|
- class mstar.engine.resources.attn.ragged.config.RaggedAttentionConfig(num_qo_heads, num_kv_heads, head_dim, sm_scale=None, max_segments_per_request=1, max_tokens_per_request=None, flashinfer_backend='auto')[source]#
Bases:
objectVarlen self-attention over segments packed into one forward, with no KV cache: the whole layout is this step’s, and nothing carries to the next.
Head counts are pre-sharding; the engine narrows them to the rank’s slice at build, as it does for a
KVConfig.- Parameters:
- class mstar.engine.resources.attn.ragged.config.RaggedAttentionSpec(resource_key: str, nodes: set[str], config: mstar.engine.resources.attn.ragged.config.RaggedAttentionConfig)[source]#
Bases:
NodeResourceSpec- Parameters:
resource_key (str)
config (RaggedAttentionConfig)
- apply_yaml_overrides(flashinfer_backend=None, max_segments_per_request=None, max_tokens_per_request=None)[source]#
Which kernel to run is the deployment’s call as much as the model’s — an image that cannot build FA3 pins FA2 here.
The two ceilings are here rather than on the model because they size CUDA-graph buckets, which is a deployment’s memory/coverage trade.
- config: RaggedAttentionConfig#