Codele / Machine learning: one neuron to deep learning
Transformers
A transformer is the design behind modern AI chatbots. Every word looks back at the words before it with attention, all at once, through several layers.
- A transformer turns words into numbers (embeddings), adds each word’s position, then runs layers of attention and small networks.
- Attention lets every word look back at the words before it, all at once, so nothing has to be squeezed through one memory. A text-writing model never lets a word see later words.
- Without position numbers, the words would be an unordered bag. Position keeps the order.
- One layer is attention plus a small network. Real models stack many layers, and the end of the stack scores every possible next word.
- Chatbots write by guessing one next word, adding it, and running again.
Loading the playable lesson…