arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2402.18734cs.LGcs.CLcs.PF
收藏

面向编译器的大语言模型 Priority Sampling

Priority Sampling of Large Language Models for Compilers

Rice University(莱斯大学);Meta AI

Dejan Grubisic, Chris Cummins, Volker Seeker, Hugh Leather

AI总结:

针对编译器代码生成中 Nucleus Sampling 依赖温度、重复或不连贯的问题,提出确定性的 Priority Sampling,按置信度枚举唯一结构化样本,并显著提升优化性能。

摘要:

大语言模型在代码生成与优化方面展现出巨大潜力。Nucleus Sampling 等广泛使用的采样方法虽然提高了生成多样性,但在低温时往往产生重复样本,在高温时又会产生不连贯样本。此外,温度系数必须针对每个任务单独调节,限制了其可用性。我们提出 Priority Sampling,这是一种简单且确定性的采样技术,可生成按模型置信度排序的唯一样本。每个新样本都会扩展增强搜索树中概率最高的未扩展 token。此外,Priority Sampling 支持基于正则表达式的生成,从而提供可控、结构化的探索过程。在任意样本数量下,Priority Sampling 均优于 Nucleus Sampling,将原始模型相对于 -Oz 的性能提升从 2.87% 提高到 5%。而且,仅需 30 个样本,它就优于用于生成原始模型训练标签的 autotuner。

英文摘要:

Large language models show great potential in generating and optimizing code. Widely used sampling methods such as Nucleus Sampling increase the diversity of generation but often produce repeated samples for low temperatures and incoherent samples for high temperatures. Furthermore, the temperature coefficient has to be tuned for each task, limiting its usability. We present Priority Sampling, a simple and deterministic sampling technique that produces unique samples ordered by the model's confidence. Each new sample expands the unexpanded token with the highest probability in the augmented search tree. Additionally, Priority Sampling supports generation based on regular expression that provides a controllable and structured exploration process. Priority Sampling outperforms Nucleus Sampling for any number of samples, boosting the performance of the original model from 2.87% to 5% improvement over -Oz. Moreover, it outperforms the autotuner used for the generation of labels for the training of the original model in just 30 samples.

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

↑