Fix: Correct mask expression and image errors

pull/6/head
guoxuewei 2 weeks ago
parent 9daaa490f6
commit 4f00abf62a

Binary file not shown.

Before

Width:  |  Height:  |  Size: 239 KiB

After

Width:  |  Height:  |  Size: 924 KiB

@ -40,7 +40,7 @@ $$
这里讲的是生成型任务如语言模型例如GPTMask遮挡的目的是为了防止模型在预测下一个词时“偷看”到未来的信息。这种技术被称为因果遮挡Causal Masking或自回归遮挡。在GPT这样的自回归语言模型中模型被训练为基于之前的词来预测序列中的下一个词。因此遮挡确保模型在生成当前词时只能使用它之前的词而不能使用它之后的词这符合自然语言的生成过程。
将矩阵的上三角部分(包括对角线)填充为 `-inf`
将矩阵的上三角部分填充为 `-inf`
<img src="../assets/image-20240502150743024.png" alt="image-20240502150743024" width="550" />

Loading…
Cancel
Save