The transformer model is solely based on attentional mechanisms. The phrase “Attention is all you need” means attentional mechanisms were used in both encoder and decoder. They replaced commonly used RNN and CNN completely.