R52 · 任务不同,保留的可见范围也不同
将模型迁到图像之前,先要选输出目标和合法信息来源。用已完成的翻译母图辨认哪些部分可以拆用,避免把架构名字当成任务答案。
状态 b0
在同一母图上辨认源全可见、目标因果读取和cross条件读取,先回答当前行能看谁。
状态 b1
三类家族分别保留不同组件。decoder-only去掉独立源侧时,也去掉原来读取它的cross。
状态 b2
把目标、可见范围、条件来源拆成三项选择;同一预测目标可由不同骨干实现,不能由家族名直接推出全部能力。
公式与算例详情
从信息来源区分结构与目标
Encoder-only在输入内做双向self-attention,适合完整输入上的表示、分类或标注;BERT预训练的masked language modeling利用被遮盖位置的上下文。Decoder-only使用因果self-attention,以前缀预测下一token,是GPT式自回归生成的常见形式。Encoder–decoder让编码器双向处理源输入,解码器因果处理目标前缀,再用cross-attention读取源侧表示;T5以文本到文本形式组织多种任务。
这些是结构与常见目标的搭配,不是任务能力的绝对边界。不要把BERT的掩码预测与GPT式next-token目标混成同一训练信号;也不要把encoder–decoder中的cross-attention画成目标端未来信息可见。
参考与采用
- BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding:Bidirectional Transformer encoder; reconstruct selected masked input tokens, plus the original NSP pretraining task. 复核位置:Abstract, introduction, Model Architecture and masked-language-model description read.
- Language Models are Unsupervised Multitask Learners:Autoregressive Transformer language modeling; GPT-2 moves layer norm to each sub-block input and adds a final layer norm. 复核位置:Section 2 language-model factorization and section 2.3 model read from official PDF.
- Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformer:Encoder-decoder text-to-text framework: full source visibility, causal decoder and cross-attention; span-denoising uses sentinel tokens and predicts removed spans. 复核位置:Sections 2.1/3.2 architecture and Figure 4 caption; section 3.3.4 span corruption and Table 3 examples read.
原课页采用记录:M29 从 block 到 LM 训练。页码均按PDF物理页计。
继续学习
要从目标而非名字区分模型,读同一段文本,三种预训练问题,分别写 BERT 选中位置、GPT 合法前缀和 T5 删除跨度的输入/目标。CLS 02同题段落保存三种目标的完整说明;用三类信息流核对可见范围,再在LAB 03 F 中对应 encoder 与 causal 局部计算。局部算子相似不表示三种监督目标相同。