vllm.models.inkling.nvidia.ops.fa4_rel_attention ¶
Functions:
-
bucket_max_seqlen_q–Round the FA4 scheduling bound up to a power of two.
-
inkling_fa4_num_splits–Return the split-KV cap for FA4 with sheared relative bias.
-
inkling_fa4_rel_attention–Paged varlen FA4 over the bound K/V cache with the Inkling relative bias.
bucket_max_seqlen_q(max_seqlen_q) ¶
inkling_fa4_num_splits(*, is_local, batch_size, max_query_len, num_heads, num_kv_heads, max_kv_len) ¶
Return the split-KV cap for FA4 with sheared relative bias.
Source code in vllm/models/inkling/nvidia/ops/fa4_rel_attention.py
inkling_fa4_rel_attention(q, key_cache, value_cache, *, block_table, cache_seqlens, cu_seqlens_q, max_seqlen_q, softmax_scale, causal, window_size, rel_extent, rel_logits, num_splits=32, out=None) ¶
Paged varlen FA4 over the bound K/V cache with the Inkling relative bias.
q is (num_tokens, num_heads, head_dim); key_cache / value_cache are the paged caches (num_blocks, block_size, num_kv_heads, head_dim); block_table is the per-request page table and cache_seqlens the per-request KV lengths (seqused_k). rel_logits is (num_tokens, num_heads, rel_extent).
The bias uses tml-fa4's sheared relative-bias layout.