Skip to content

Fused QKV

Attention by shapes · 8 of 11

In code, the three projections per head are often one fat matmul: Wqkv has height H×(dk+dk+dv), then the result is sliced into the per-head triples. Same math as separate weights; one trip through the GEMM.

Drag Heads — the fused weight’s row count tracks H×(dk+dk+dv).

Next: Single vs Multi-Head