mirror of
https://github.com/skindhu/Build-A-Large-Language-Model-CN.git
synced 2026-07-29 15:20:24 +08:00
add seventh chapter
This commit is contained in:
@@ -11,12 +11,12 @@
|
||||
- [2.1 理解词嵌入](#21-理解词嵌入)
|
||||
- [2.2 文本分词](#22-文本分词)
|
||||
- [2.3 将 tokens 转换为token IDs](#23-将-tokens-转换为token-ids)
|
||||
- [2.4 添加特殊上下文tokens](#24-添加特殊上下文tokens)
|
||||
- [2.4 添加特殊上下文token](#24-添加特殊上下文token)
|
||||
- [2.5 字节对编码(Byte pair encoding)](#25-字节对编码byte-pair-encoding)
|
||||
- [2.6 使用滑动窗口进行数据采样](#26-使用滑动窗口进行数据采样)
|
||||
- [2.7 构建词嵌入层](#27-构建词嵌入层)
|
||||
- [2.8 位置编码](#28-位置编码)
|
||||
- [2.9 总结](#29-总结)
|
||||
- [2.9 本章摘要](#29-本章摘要)
|
||||
|
||||
-----
|
||||
|
||||
@@ -1039,7 +1039,7 @@ torch.Size([8, 4, 256])
|
||||
|
||||
|
||||
|
||||
## 2.9 总结
|
||||
## 2.9 本章摘要
|
||||
|
||||
+ LLM 需要将文本数据转换为数值向量,这称之为嵌入,因为它们无法处理原始文本。嵌入将离散数据(如单词或图像)转化为连续的向量空间,从而使其能够与神经网络操作兼容。
|
||||
+ 作为第一步,原始文本被分解为token,这些token可以是单词或字符。然后,这些token被转换为整数表示,称为token ID。
|
||||
|
||||
Reference in New Issue
Block a user