logits 与概率分布Logits and Probability Distribution
Logits and Probability Distribution
模型每一步输出的不是词,而是整个词表的分数表。采样参数都作用在这上面。What the model outputs at each step is not a word but a score table over the whole vocabulary. All sampling parameters act on it.
每一步,模型给词表里每个候选 token 打一个分数,即 logits。
分数经 softmax 变成概率分布:所有候选的概率加起来为 1。
温度、top-k、top-p 都是在这张分布上做手脚。
At each step the model assigns a score — a logit — to every candidate token in the vocabulary.
Softmax turns the scores into a probability distribution: all candidates sum to 1.
Temperature, top-k and top-p all reshape this distribution.
理解了它,采样参数不再是玄学。它们改的是分布的形状,不是模型的「想法」。Once you get it, sampling parameters stop being mysticism: they change the shape of the distribution, not the model's 'mind'.
回到名词地图看第4站的其他 35 个词 →Back to the map: the other 35 terms in station 4 →