Transformer 最早在 Attention Is All You Need 中以机器翻译架构的形式提出。理解它的一个起点是:每个位置怎样从其他位置取回当前需要的信息?
这篇旧稿于 2026 年 9 月补全。保留原始链接与项目背景,修正了任务分类、预测评估等表述。示例代码用于理解模型结构,不代表训练结果。
Transformer 最早在 Attention Is All You Need 中以机器翻译架构的形式提出。理解它的一个起点是:每个位置怎样从其他位置取回当前需要的信息?
这篇旧稿于 2026 年 9 月补全。保留原始链接与项目背景,修正了任务分类、预测评估等表述。示例代码用于理解模型结构,不代表训练结果。
The original Attention Is All You Need introduced Transformer as an encoder–decoder architecture for machine translation. A useful starting question is: how does each position retrieve the information it needs from other positions?
This note retains its original publication date and URL. It was completed and revised in September 2026. The code below demonstrates tensor flow, not trained forecasting performance.