ground_truth_block_weights

Function ground_truth_block_weights 

Source
pub fn ground_truth_block_weights(
    q: &[bf16],
    k: &[bf16],
    num_q_heads: usize,
    num_kv_heads: usize,
    head_dim: usize,
    block_size: usize,
    num_blocks: usize,
) -> Vec<f32>
Expand description

2026-09-25: Attention weight of each block: for every query head, the softmax over all tokens summed over the block’s tokens; the max over query heads.