From b58c369e29b8fc6623c7f2b06db232047d40bbcd Mon Sep 17 00:00:00 2001 From: FMLS Date: Sat, 4 Jul 2026 22:53:33 +0800 Subject: [PATCH] Revise token ID list and corresponding explanations Updated token ID examples and explanations in the document. --- cn-Book/2.处理文本数据.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cn-Book/2.处理文本数据.md b/cn-Book/2.处理文本数据.md index 0e4d2fc..8428d6a 100644 --- a/cn-Book/2.处理文本数据.md +++ b/cn-Book/2.处理文本数据.md @@ -448,13 +448,13 @@ tokenizer = SimpleTokenizerV2(vocab) print(tokenizer.encode(text)) ``` -这将输出以下token ID列表: +这将打印以下词元ID: ``` -[1160, 5, 362, 1155, 642, 1000, 10, 1159, 57, 1013, 981, 1009, 738, 1013, 1160, 7] +[1131, 5, 355, 1126, 628, 975, 10, 1130, 55, 988, 956, 984, 722, 988, 1131, 7] ``` -从上面的内容可以看出,token ID 列表中包含了 1159 ,它对应于 <|endoftext|> 分隔token,以及两个 1160 ,用于表示未知单词。 +从上面的内容可以看出,token ID 列表中包含了 1130 ,它对应于 <|endoftext|> 分隔token,以及两个 1131 ,用于表示未知单词。 ```python print(tokenizer.decode(tokenizer.encode(text)))