The benefit of multi-query attention is a ratio: each key-value head removed from the cache saves its share of memory and bandwidth. The ratio of query heads to key-value heads is that saving.
Implement saving_ratio(H, kv_heads), the cache reduction factor.
Divide the query head count by the key-value head count.
No results yet
Run your code to check it against the examples, or submit to run every test.