Build transformer encoders and decoders from attention, positional information, feed-forward layers, residual paths, and normalization. Train a compact transformer and reason about its computational costs.