20260617:目前有914 页
This commit is contained in:
45
concepts/hard-token.md
Normal file
45
concepts/hard-token.md
Normal file
@@ -0,0 +1,45 @@
|
||||
---
|
||||
title: "Hard Token"
|
||||
created: 2026-06-17
|
||||
updated: 2026-06-17
|
||||
type: concept
|
||||
tags: [tokenization, generation]
|
||||
sources: [raw/papers/zhang-tarpo-2026.md]
|
||||
confidence: high
|
||||
---
|
||||
|
||||
# Hard Token
|
||||
|
||||
Hard token 是标准自回归语言模型中**离散 token 生成**的基本单元——从词表中采样单个 token 并输出其 embedding。
|
||||
|
||||
## 定义
|
||||
|
||||
给定 logits 分布 `π_θ(·|s_t)`,hard token 选自词表 V:
|
||||
|
||||
```
|
||||
v_t ~ π_θ(·|s_t), u_hard = E(v_t)
|
||||
```
|
||||
|
||||
这是所有标准 LLM 推理的基本操作。
|
||||
|
||||
## 特性
|
||||
|
||||
- **离散性**:天然具有采样随机性,支持 RL 中的策略探索
|
||||
- **信息瓶颈**:高维隐藏状态被坍缩为单个 token,损失信息容量
|
||||
- **人类可读**:可被直接解释和检查
|
||||
- **序列化**:每个推理步骤产生一个可读 token
|
||||
|
||||
## 与 Soft Token 的关系
|
||||
|
||||
Hard token 和 [[soft-token]] 代表了推理中表达力与随机性之间的 trade-off:
|
||||
- Hard token:随机性好,但信息容量有限
|
||||
- Soft token:表达力强,但天然确定性
|
||||
|
||||
[[tarpo|TARPO]] 的创新在于**让模型自己学习何时使用哪种模式**。
|
||||
|
||||
## 参考
|
||||
|
||||
- [[soft-token]]
|
||||
- [[chain-of-thought|思维链]]
|
||||
- [[tarpo|TARPO]]
|
||||
- [[latent-reasoning|潜在推理]]
|
||||
Reference in New Issue
Block a user