Package smile.llm.attention
package smile.llm.attention
-
ClassDescriptionMulti-head attention.Pluggable attention kernel backends (SGLang-style names).Process-wide attention backend selector (installed at chat-service startup).Per-call metadata for
AttentionKernel.forward(Tensor, Tensor, Tensor, Tensor, AttentionContext).Attention compute kernel (contiguous SDPA or paged FlashInfer).Resolves FlashInfer AOT / jit-cache directory for hybrid packaging: explicit dir → env / bundled default → cache-dir → optional download.FlashInfer paged BatchPrefill / BatchDecode backend.Opaque FlashInfer workspace / plan handle (one per device / TP rank).Ragged contiguous self-attention over packed[N, H, D]Q/K/V tensors.LibTorchscaled_dot_product_attentionbackend.