困惑度Perplexity (PPL)
Perplexity (PPL)
语言模型最常用的内在评测指标:模型对测试文本有多「意外」。The most common intrinsic metric for language models: how surprised the model is by test text.
困惑度定义为模型对测试序列逐 token 平均负对数似然的指数。
等价于平均交叉熵损失的指数。困惑度越低,模型对文本预测越确信。
它对分词方式敏感:只宜在相同 tokenizer 的模型之间直接比较。
它适用于自回归模型,对 BERT 这类掩码模型定义不佳。
Perplexity is the exponentiated average negative log-likelihood of a sequence, token by token.
Equivalently, the exponent of the average cross-entropy loss; lower perplexity means the model predicts the text more confidently.
It is sensitive to tokenization: compare it directly only between models sharing the same tokenizer.
It applies to autoregressive models and is ill-defined for masked models like BERT.
论文和模型卡常报这个数。知道它只跟同分词的模型可比,就不会被跨家的困惑度数字误导。Papers and model cards report this number. Knowing it is only comparable across same-tokenizer models keeps you from being misled by cross-vendor figures.
回到名词地图看第4段的其他 60 个词 →Back to the map: the other 60 terms in stage 4 →
别停在定义:去任务手册看按什么顺序做、验收什么;或者按你手头的任务,筛 3 个工具候选。Don’t stop at the definition: use the task handbook for the order and checks, or filter three tool candidates for the job at hand.
任务手册 →Task handbooks → · 按任务筛 3 个候选 →Filter three candidates →