Class RaggedContiguousAttention
java.lang.Object
smile.llm.attention.RaggedContiguousAttention
Ragged contiguous self-attention over packed
[N, H, D] Q/K/V tensors.
Used when FlashInfer ragged is unavailable (torch_native backend or older
libsmile_torch without smile_flashinfer_ragged_attention).
-
Method Summary
-
Method Details
-
forward
Runs non-causal (or causal) self-attention independently within eachindptrsegment.- Parameters:
query-[N, H, D]NHDkey-[N, H, D]value-[N, H, D]ctx- ragged context withAttentionContext.raggedIndptr()- Returns:
- output
[N, H, D]
-