Uploaded November 2026 | Updated December 2026, 9 hours ago
What is the attention mechanism that makes models like Claude and ChatGPT talk so well? Surprisingly, it works a lot like gravity. šŖ
In this Short:
Every word lives in a space where similar meanings sit close together.
In āI sat by the river bankā, the word āriverā pulls ābankā from finance toward nature, so it now means riverside.
Why the pull isnāt symmetric: āriverā changes the meaning of ābankā, but ābankā doesnāt change āriverā. Thatās the job of keys and queries.
What the value matrix does: it reshapes the pull so ābankā gains nature but stays a noun.
The formula behind it all: softmax(QKįµ/ād_k)V. Itās the same idea as gravity, with new rules.
If you like this content, please subscribe for more!
Want to go deeper? My book Grokking Machine Learning: manning.com/books/grokking-machine-learning-second-edition
More at Serrano Academy: https://serrano.academy
#attention #transformers #LLM #machinelearning #deeplearning #AI #serranoacademy
What is the attention mechanism that makes models like Claude and ChatGPT talk so well? Surprisingly, it works a lot like gravity. šŖ
In this Short:
Every word lives in a space where similar meanings sit close together.
In āI sat by the river bankā, the word āriverā pulls ābankā from finance toward nature, so it now means riverside.
Why the pull isnāt symmetric: āriverā changes the meaning of ābankā, but ābankā doesnāt change āriverā. Thatās the job of keys and queries.
What the value matrix does: it reshapes the pull so ābankā gains nature but stays a noun.
The formula behind it all: softmax(QKįµ/ād_k)V. Itās the same idea as gravity, with new rules.
If you like this content, please subscribe for more!
Want to go deeper? My book Grokking Machine Learning: manning.com/books/grokking-machine-learning-second-edition
More at Serrano Academy: https://serrano.academy
#attention #transformers #LLM #machinelearning #deeplearning #AI #serranoacademy


