跳到主要内容Skip to main content

一个下午看懂原理One Afternoon Under the Hood

一个下午one afternoon

按基础、训练、架构与生成顺序读十二个主题。重点是解释现象和限制;技术细节可在需要时回查。Read twelve topics across foundations, training, architecture and generation. Focus on explaining behavior and limits; revisit details when needed.

学完自测Checkpoint
  1. 说出 Transformer 处理一句话的大致流程:切词 → 变向量 → 注意力 → 逐词生成
  2. 说清聊天模型的训练三阶段,每一阶段各解决什么问题
  3. 解释模型为什么会一本正经地编,以及上下文为什么越大越贵
  1. Walk through how a Transformer handles a sentence: split, embed, attend, generate one token at a time
  2. Explain the three training stages of a chat model and what each stage solves
  3. Say why a model fabricates confidently, and why bigger context costs more

先试着回答,再展开参考答案。答不上来的地方,可从上方步骤返回对应词条。参考回答是核对要点,不要求逐字复述。Try answering before opening the reference. Revisit the relevant step above if needed. These answers highlight key ideas; you do not need to repeat the wording.

第 1 题 · 参考回答Question 1 · Reference answer

对自回归语言模型,可概括为分词、嵌入、带注意力的多层计算、得到下一个 Token 的分布,再选择并继续生成。这是简图,不代表每一种 Transformer 的任务流程。For an autoregressive language model: tokenize, embed, apply layers with attention, obtain a next-token distribution, select a token and repeat. This sketch does not describe every Transformer task.

回看这一题的概念Revisit this concept

第 2 题 · 参考回答Question 2 · Reference answer

常见聊天模型流程包括预训练、监督微调和偏好优化:分别学习基础模式、任务与回答形式、偏好或约束。具体模型可能合并、重复或省略阶段。A common chat-model recipe uses pretraining, supervised fine-tuning and preference optimization: general patterns, task/response formats, and preferences or constraints. Actual recipes can merge, repeat or omit stages.

回看这一题的概念Revisit this concept

第 3 题 · 参考回答Question 3 · Reference answer

生成目标不保证每个断言有事实依据;更多上下文还会增加处理量和缓存占用。应区分输入长度、输出长度与运行方式,不把长窗口理解成可靠性保证。The generation objective does not guarantee factual support for every claim. More context adds computation and cache use. Distinguish input length, output length and runtime; a long window does not guarantee reliability.

回看这一题的概念Revisit this concept

用在一个具体任务里Apply this to a concrete task

继续看预训练的数据与目标Study pretraining data and objectives →