# Transformers

Why Transformers over LSTM

* Because LSTM take tokens sequentially, making them slow. Whereas transformers takes in all the tokens together, allowing for faster computation.&#x20;

{% embed url="https://jalammar.github.io/illustrated-transformer/" %}

<figure><img src="https://1877261540-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LFDuA0A2VRqmT31Blrq%2Fuploads%2FSu4yL8Gmefc3rwOHdQLN%2Fimage.png?alt=media&#x26;token=1140415a-cfee-4f53-ad49-64086418f2b5" alt=""><figcaption></figcaption></figure>

{% embed url="https://www.datacamp.com/tutorial/how-transformers-work" %}

{% embed url="https://blog.eleuther.ai/transformer-math/" %}

{% embed url="https://kipp.ly/transformer-inference-arithmetic/" %}
