提出滑动窗口精炼机制,让大模型生成时能自主修正错误。
Reflection-Window Decoding: Text Generation with Selective Refinement
- 用滑动窗口和暂停条件实现生成与精炼交替进行。
- 实验证明该方法在保持效率的同时提升生成质量。
- 适合需要高准确率的文本生成场景,如写作辅助。
大型语言模型(LLMs)的自回归解码虽广泛使用,但缺乏内置的精炼或纠错机制,导致生成结果可能偏离全局最优。本文从联合概率角度分析生成内容与最优解之间的潜在偏差,发现生成过程中出现明显不确定性时,应警惕历史生成的次优性。为此,我们提出一种包含滑动反射窗口和暂停准则的框架,使生成与精炼可交替进行。该选择性精炼方法在效率与最优性间取得平衡,大量实验验证了其有效性。
原文摘要 · Abstract (English)
The autoregressive decoding for text generation in large language models (LLMs), while widely used, is inherently suboptimal due to the lack of a built-in mechanism to perform refinement and/or correction of the generated content. In this paper, we consider optimality in terms of the joint probability over the generated response, when jointly considering all tokens at the same time. We theoretically characterize the potential deviation of the autoregressively generated response from its globally optimal counterpart that is of the same length. Our analysis suggests that we need to be cautious when noticeable uncertainty arises during text generation, which may signal the sub-optimality of the generation history. To address the pitfall of autoregressive decoding for text generation, we propose an approach that incorporates a sliding reflection window and a pausing criterion, such that refinement and generation can be carried out interchangeably as the decoding proceeds. Our selective refinement framework strikes a balance between efficiency and optimality, and our extensive experimental results demonstrate the effectiveness of our approach.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。