Implement scaled dot-product attention, the fundamental building block of all Transformer architectures.