Attention Efficiency & Long Context
Implement grouped-query attention (GQA) in PyTorch by repeating/broadcasting KV heads acro
Implement grouped-query attention (GQA) in PyTorch by repeating/broadcasting KV heads across query-head groups, and verify it matches full multi-head attention when num_kv_heads equals num_query_heads.
class GQAImplement the function/class skeleton in the editor. Any correct approach is accepted.