mstar.engine.resources.attn.ragged.flashinfer#
Cacheless varlen attention through FlashInfer’s ragged prefill wrapper.
Classes
|
Block-causal self-attention: every label in the step is its own layout, each segment attending block-causally within itself. |
|
Cross-attention: each |
|
Self-attention: every label in the step is its own layout, each segment attending within itself. |
- class mstar.engine.resources.attn.ragged.flashinfer.FlashInferRaggedBlockCausalManager(device, dtype, config, block_size)[source]#
Bases:
_FlashInferRaggedBase,RaggedBlockCausalAttnManagerBlock-causal self-attention: every label in the step is its own layout, each segment attending block-causally within itself.
- Parameters:
device (device)
dtype (dtype)
config (RaggedAttentionConfig)
block_size (int)
- plan(step, ctx)[source]#
ret is immutable and opaque to runner; only gives to ctx.plan_results
- Parameters:
step (AttentionStep)
ctx (StepContext)
- wrapper_class#
alias of
RaggedBlockCausalWrapper
- class mstar.engine.resources.attn.ragged.flashinfer.FlashInferRaggedCrossManager(device, dtype, config)[source]#
Bases:
_FlashInferRaggedBase,RaggedCrossAttnManagerCross-attention: each
(q_label, kv_label)pair of the step is one plan, run undercross_label(q_label, kv_label).- Parameters:
device (device)
dtype (dtype)
config (RaggedAttentionConfig)
- wrapper_class#
alias of
RaggedCrossPrefillWrapper
- class mstar.engine.resources.attn.ragged.flashinfer.FlashInferRaggedManager(device, dtype, config)[source]#
Bases:
_FlashInferRaggedBase,RaggedAttnManagerSelf-attention: every label in the step is its own layout, each segment attending within itself.
- Parameters:
device (device)
dtype (dtype)
config (RaggedAttentionConfig)
- plan(step, ctx)[source]#
ret is immutable and opaque to runner; only gives to ctx.plan_results
- Parameters:
step (AttentionStep)
ctx (StepContext)
- wrapper_class#
alias of
RaggedPrefillWrapper