Implement parallel_transformer_block(X, gamma, beta, W_qkv, W_o, W1, W2, eps=1e-5): one forward pass of a parallel transformer block, which applies a single LayerNorm and adds both sublayers to the residual in one step:
Conventions:
X over d_model with its mean and population variance (no Bessel correction): , then .d_model columns are , next , last ) and , softmax taken over each row (the keys).Shapes: X (seq_len, d_model); gamma, beta (d_model,); W_qkv (d_model, 3·d_model); W_o (d_model, d_model); W1 (d_model, d_ff); W2 (d_ff, d_model). Return a NumPy array of shape (seq_len, d_model).