修改一个关于句子3掩码矩阵的可能的错误

This commit is contained in:
yzeng
2025-05-26 17:48:13 -04:00
parent 1fad72948d
commit 0c5d321e4d
+1 -1
View File
@@ -466,7 +466,7 @@ print(tokenizer.decode(tokenizer.encode(text)))
>
> + 句子1(掩码矩阵):`[1, 1, 1, 1, 0]`
> + 句子2(掩码矩阵):`[1, 1, 1, 1, 0]`
> + 句子3(掩码矩阵):`[1, 1, 1, 0, 0]`
> + 句子3(掩码矩阵):`[1, 1, 1, 1, 0]`
>
> 在这个掩码矩阵中,`1` 表示模型会关注的 token,`0` 表示模型会忽略的填充 token。通过这种掩码矩阵,模型知道在计算和训练时哪些 token 是有效内容,哪些 token 是填充部分,无需关注。