mstar.engine.resources.attn.ragged.base#
The cacheless attention resource: the spec-time factory.
Sibling of attn.base’s AttentionManager, for attention that is not
backed by a KV cache, e.g., an encoder tower attending within variable-length
segments of one packed forward. There is nothing to page, nothing to advance,
and nothing to carry between steps: the resource holds only planned wrappers.
Functions
|
Ragged counterpart of |
Classes
Cacheless block-causal self-attention within each span; see |
|
Cacheless cross-attention between two spans of each request; see |
- class mstar.engine.resources.attn.ragged.base.RaggedAttnManager[source]#
Bases:
AttentionResource- classmethod build(spec, info)[source]#
- Parameters:
spec (RaggedAttentionSpec)
info (EngineResourceInfo)
- class mstar.engine.resources.attn.ragged.base.RaggedBlockCausalAttnManager[source]#
Bases:
AttentionResourceCacheless block-causal self-attention within each span; see
RaggedBlockCausalAttentionSpec.- classmethod build(spec, info)[source]#
- Parameters:
info (EngineResourceInfo)
- class mstar.engine.resources.attn.ragged.base.RaggedCrossAttnManager[source]#
Bases:
AttentionResourceCacheless cross-attention between two spans of each request; see
RaggedCrossAttentionSpec.- classmethod build(spec, info)[source]#
- Parameters:
spec (RaggedCrossAttentionSpec)
info (EngineResourceInfo)
- mstar.engine.resources.attn.ragged.base.resolve_ragged_attn_backend(backend, device)[source]#
Ragged counterpart of
attn.base.resolve_attn_backend.- Parameters:
backend (RaggedAttnBackend)
device (device)
- Return type: