> ## Content Index
> Fetch the complete content index at: https://blog.hacking.pub/llms.txt
> Use this file to discover other available public pages before exploring further.

# Attention 到 FFN
- URL: https://blog.hacking.pub/2026/10/25/attention-dao-ffn/
- Published: 2026-10-25T14:28:56.000Z
- Updated: 2026-10-25T14:35:22.000Z
- Author: chainhelen

用一个能手算的小模型，跟着第 3 行数字走完 Attention、残差连接和 FFN。每一步都能点击播放，看看数字怎样沿着连线流动。

这里的矩阵只有 3 个 token、每个 2 个特征，权重是为了演示而设置的，并非千问的真实参数。重点是看清：Attention 在不同行之间汇合信息，FFN 则分别加工每一行。

[在新窗口打开交互演示 ↗](https://hacking.pub/demos/attention-ffn/?ref=blog.hacking.pub) · 手机横屏观看更清楚