Andrej Karpathy: Self-Attention Is Communication, Feed-Forward Is Thinking
In his breakdown of GPT from scratch, Andrej Karpathy explains the core mechanics of transformers: why attention lets tokens talk to each other while feed-forward layers do the actual thinking.

Executive Intelligence Takeaways
In his breakdown of GPT from scratch, Andrej Karpathy explains the core mechanics of transformers: why attention lets tokens talk to each other while feed-forward layers do the actual thinking.
In modern transformer architectures, understanding the interplay between attention mechanisms and multilayer perceptrons often gets lost in algebraic abstraction. During his line-by-line implementation of a generative pretrained transformer from scratch, former Tesla AI Director Andrej Karpathy offered one of the most intuitive architectural mental models in machine learning literature: the distinction between communication and computation.
Karpathy emphasizes that self-attention is fundamentally a communication mechanism rather than an isolated mathematical trick. Rather than treating embeddings as static representations, attention allows tokens to dynamically broadcast and aggregate contextual information across a directed graph structure.
"Number one, attention is a communication mechanism. You can really think about it as a communication mechanism where you have a number of nodes in a directed graph... every node has some vector of information and it gets to aggregate information via a weighted sum from all of the nodes that point to it."
- Andrej Karpathy (71:41)
However, communication alone does not produce reasoning or synthesis. Once tokens have gathered information from their context window via attention heads, they require dedicated capacity to transform and synthesize that collected knowledge. This is precisely where feed-forward layers enter the pipeline.
"Self-attention is the communication, and then once they've gathered all the data, now they need to think on that data individually. And so that's what feed forward is doing."
- Andrej Karpathy (86:09)
This explicit separation of roles - inter-token communication followed by intra-token computation - explains why alternating attention and feed-forward blocks with residual streams forms the backbone of modern large language models.
Audience Pushback & Nuance
"Living in a world where a world-class top guy posts a 2-hour video for free on how to make such cutting-edge stuff. I barely started this tutorial but at first I just wanted to say thank you mate!"
🔍Source Evidence & Verified Citations
Related golden nuggets Discussions
View All in Desk →Varun Mayya on Overpowered Execution: Why Founders Fail from a Belief Deficit, Not a Tech Deficit
Serial entrepreneur Varun Mayya argues that young Indian technologists over-index on tools and capital while under-investing in raw, stubborn operational belief.
"Having intent and doing an action are two completely different things. Action produces information. What should you do if you have this crazy type of belief in yourself? Do something."
The Ranking Trap: Why Staying Unranked and Active Beats Rushing the Top 15
Tommy McMillen and Joe Rogan break down why eager MMA fighters should pump the brakes on entering the UFC top 15, prioritizing high-frequency cage time over premature ranking prestige.
"I almost kind of want to get a few couple more fights in to just keep getting that experience before I call my top 15 shot cuz I feel like when I get to the top 15, I'm going to be fighting for a belt quick after that. You know, I'm not going to be one of those guys that just sits around."
Why Cleitinho Thinks the Best Way to Lead is Admitting You Don't Know Everything
The Senator from Minas Gerais is pitching a governance model that swaps political favors for technical KPIs and treats the opposition as a necessary quality-control filter.
"Eu vou colocar o melhor secretário de fazenda que tiver ao meu alcance. Saúde, eu entendo tudo de saúde. Sou médico, não vou colocar o melhor secretário de saúde que entende de saúde. Isso é o primeiro passo, tem humildade de entender que eu não vou conhecer tudo e que a máquina pública ela é administrada pelos servidores e pelo secretário."
Why Slobotzky is Turning Family Memories into AI-Generated Cinema
The comedian is moving beyond basic prompts to create hyper-personalized films for his son, proving that AI's real power lies in emotional storytelling rather than just productivity.
"Tengo entendido que Rongway es como un host y agarra lo más [__] de todo y según lo que necesites utiliza ciertas sillas que ya tiene ahí precargadas."






