Implement a full multi-head self-attention layer for one sequence X of shape (T, d):
Q = X @ Wq, K = X @ Wk, V = X @ Wv (each d × d)h heads of size d_h = d / hM is 0 or from an optional causal maskWoImplement mha(X, Wq, Wk, Wv, Wo, h, causal=False) returning the (T, d) output.