arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2510.20208cs.CL
收藏

面向LLM边际化的免解码采样策略

Decoding-Free Sampling Strategies for LLM Marginalization

nlp.c.titech.ac.jp(东京技术大学自然语言处理研究所)

David Pohl, Marco Cognetta, Junyoung Lee, Naoaki Okazaki

AI总结:

针对LLM评估中边际化计算昂贵的问题,提出免解码采样策略,无需生成即可高效近似边际概率,在多个开源模型上验证了其准确性与速度优势。

摘要:

现代语言模型基于子词分词文本运行,以在模型规模、推理速度和词汇覆盖之间做出权衡。其副作用是,在推理过程中,模型的评估仅基于输出中特定分词结果的概率,尽管同一文本在子词词汇下存在多种可能的表示方式。近期研究主张通过边际化(即给定文本所有分词结果的概率质量之和)来评估LLM。由于文本可能的分词结果数量庞大,边际化计算困难,因此通常通过采样进行近似边际化。然而,采样的缺点在于,LLM必须为每个样本执行一次昂贵的生成步骤,这限制了在给定运行时间预算内可获取的样本数量,从而也限制了近似的准确性。由于在给定分词结果下计算序列概率相比实际生成序列相对廉价,我们研究了免解码采样策略——这些策略无需LLM进行生成,而是完全依赖于极其廉价的、与模型和分词器无关的采样方法。我们针对多个开源模型考察了免解码采样策略的近似质量和速度,发现它们能以极小的运行时间成本提供足够准确的边际估计,并在一组下游推理任务上展示了其应用。

英文摘要:

Modern language models operate on subword-tokenized text in order to make a trade-off between model size, inference speed, and vocabulary coverage. A side effect of this is that, during inference, models are evaluated by measuring the probability of only the specific tokenization produced as the output, despite there being many possible ways to represent the same text with a subword vocabulary. Recent studies have argued instead for evaluating LLMs by marginalization - the probability mass of all tokenizations of a given text. Marginalization is difficult due to the number of possible tokenizations of a text, so often approximate marginalization is done via sampling. However, a downside of sampling is that an expensive generation step must be performed by the LLM for each sample, which limits the number of samples that can be acquired given a runtime budget, and therefore also the accuracy of the approximation. Since computing the probability of a sequence given the tokenization is relatively cheap compared to actually generating it, we investigate sampling strategies that are decoding-free - they require no generation from the LLM, instead relying entirely on extremely cheap sampling strategies that are model and tokenizer agnostic. We investigate the approximation quality and speed of decoding-free sampling strategies for a number of open models to find that they provide sufficiently accurate marginal estimates at a small fraction of the runtime cost and demonstrate its use on a set of downstream inference tasks.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑