UniICL: An Efficient Unified Framework Unifying Compression, Selection, and Generation

Jun Gao, Qi Lv, Zili Wang, Tianxiang Wu, Ziqiang Cao +1 more
5/27/2024
cs.CL

No confident code implementation found for this paper.

Abstract

In-context learning (ICL) enhances the reasoning abilities of Large Language Models (LLMs) by prepending a few demonstrations. It motivates researchers to introduce more examples to provide additional contextual information for the generation. However, existing methods show a significant limitation due to the problem of excessive growth in context length, which causes a large hardware burden. In addition, shallow-relevant examples selected by off-the-shelf tools hinder LLMs from capturing useful contextual information for generation. In this paper, we propose \textbf{UniICL}, a novel \textbf{Uni}fied \textbf{ICL} framework that unifies demonstration compression, demonstration selection, and final response generation. Furthermore, to boost inference efficiency, we design a tailored compression strategy that allows UniICL to cache compression results into \textbf{Demonstration Bank} (\textbf{DB}), which avoids repeated compression of the same demonstration. Extensive out-of-domain evaluations prove the advantages of UniICL in both effectiveness and efficiency.

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!

Cite this paper

@article{gao2024uniicl,
  title  = {UniICL: An Efficient Unified Framework Unifying Compression, Selection, and Generation},
  author = {Jun Gao and Qi Lv and Zili Wang and Tianxiang Wu and Ziqiang Cao and Wenjie Li},
  year   = {2024},
  eprint = {2405.17062},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2405.17062v3}
}

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/2405.17062.svg)](https://codeofpaper.com/paper/2405.17062)

Discussion