Path-Consistency with Prefix Enhancement for Efficient Inference in LLMs

Jiace Zhu, Yuanzhe Huang, Yingtao Shen, Jie Zhao, An Zou
8/25/2024
cs.CLcs.AI

No confident code implementation found for this paper.

Abstract

To enhance the reasoning capabilities of large language models (LLMs), self-consistency has become a popular approach, combining multiple samplings with majority voting. However, current methods are computationally expensive and time-consuming due to the need for numerous samplings. To address this, this paper introduces path-consistency, which leverages the confidence of earlier-generated answers to identify the most promising prefix and guide the generation of subsequent branches. By dynamically guiding the generation of subsequent branches based on this prefix, path-consistency mitigates both the errors and redundancies from random or less useful sampling in self-consistency. This approach reduces errors and redundancies from random sampling, significantly accelerating inference by minimizing token consumption. Our extensive empirical results demonstrate that path-consistency improves inference latency by up to 40.5\%, while maintaining task accuracy across various tasks, including mathematical reasoning, commonsense reasoning, and symbolic reasoning.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{zhu2024pathconsistency,
  title  = {Path-Consistency with Prefix Enhancement for Efficient Inference in LLMs},
  author = {Jiace Zhu and Yuanzhe Huang and Yingtao Shen and Jie Zhao and An Zou},
  year   = {2024},
  eprint = {2409.01281},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2409.01281v3}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2409.01281.svg)](https://codeofpaper.com/paper/2409.01281)

Discussion