Merge pull request #8 from dblate/patch-7

Update 5.在无标记数据集上进行预训练.md
This commit is contained in:
long_long_ago 2025-04-17 09:41:31 +08:00 committed by GitHub
commit c2d2eb24ea
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -1247,7 +1247,7 @@ Settings: {'n_vocab': 50257, 'n_ctx': 1024, 'n_embd': 768, 'n_head': 12, 'n_laye
Parameter dictionary keys: dict_keys(['blocks', 'b', 'g', 'wpe', 'wte']) Parameter dictionary keys: dict_keys(['blocks', 'b', 'g', 'wpe', 'wte'])
``` ```
settings` 和 `params` 都是 Python 字典。`settings` 字典存储了 LLM 的架构设置,与我们之前手动定义的 `GPT_CONFIG_124M` 设置类似;`params` 字典则包含实际的权重张量。注意,我们只打印了字典的键,因为打印整个权重内容会占用太多屏幕空间。不过,我们可以通过`print(params)` 打印整个字典,或使用特定的字典键选择对应张量进行查看,例如嵌入层的权重: `settings``params` 都是 Python 字典。`settings` 字典存储了 LLM 的架构设置,与我们之前手动定义的 `GPT_CONFIG_124M` 设置类似;`params` 字典则包含实际的权重张量。注意,我们只打印了字典的键,因为打印整个权重内容会占用太多屏幕空间。不过,我们可以通过`print(params)` 打印整个字典,或使用特定的字典键选择对应张量进行查看,例如嵌入层的权重:
```python ```python
print(params["wte"]) print(params["wte"])