self-attention 标签归档

共 2 篇文章 · 返回首页

【Transformer 与注意力机制】22|Encoder 详解:6 层堆叠到底在做什么

把 Transformer encoder 从“左半边”这个模糊概念拆成可操作的结构:单层里 self-attention、FFN、残差、LayerNorm 各做什么;6 层堆叠为什么不是重复劳动;encoder 输出为什么适合理解任务而不直接擅长生成;以及它和 decoder-only、encoder-decoder 两条路线到底差在哪。

【Transformer 与注意力机制】14|Self-Attention:让序列自己看自己

从 cross-attention 到 self-attention 的退化路径 → 为什么 self-attention 是 O(1) 跳数 → 为什么它对位置完全无知(permutation-equivariant) → 「The cat sat on the mat. It was tired.」中 it→cat 的共指消解 → 为什么需要位置编码 → attention 不等于解释(向第 52 篇预告)。