LLM alignment remains a critical challenge. Inference-time methods provide a flexible alternative to fine-tuning, but their uniform computational effort often yields suboptimal alignment. We hypothesize that for many alignment tasks, the initial tokens of a response are disproportionately more critical. To leverage this principle, we introduce AdaSearch, a novel blockwise search strategy. It adaptively allocates a fixed computational budget using a sampling schedule, focusing search effort on these critical tokens. We apply AdaSearch to sequential decoding and introduce its tree-search counterpart, AdaBeam. Our comprehensive evaluation across eight LLMs demonstrates that AdaSearch outperforms strong Best-of-N and fine-tuning baselines. Specifically, win-rates improve by over 10% for harmlessness generation, controlled sentiment generation, and for mathematical reasoning tasks relative to Best-of-N.
翻译:大型语言模型的对齐仍是一个关键挑战。推理时方法为微调提供了一种灵活的替代方案,但其均匀的计算分配通常导致对齐效果欠佳。我们假设,对于许多对齐任务,响应中的初始标记具有不成比例的重要性。为利用这一原理,我们提出了AdaSearch,一种新颖的分块搜索策略。该方法通过采样调度自适应地分配固定计算预算,将搜索资源集中于这些关键标记。我们将AdaSearch应用于序列解码,并引入了其树搜索对应方法AdaBeam。我们在八个大型语言模型上的综合评估表明,AdaSearch优于强基准方法Best-of-N和微调基线。具体而言,在无害生成、受控情感生成和数学推理任务中,相对于Best-of-N的胜率提升了超过10%。