Files
myWiki/concepts/hard-token.md

46 lines
1.2 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
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|潜在推理]]