paper-with-me

홈 › Papers

AdapShot: Adaptive Many-Shot In-Context Learning with Semantic-Aware KV Cache Reuse

2026-05-05 · Jie Ou, Jinyu Guo, Shiyao Guo, Yuang Li, Ruiqi Wu, Zhaokun Wang, Wenyi Li, Wenhong Tian arxiv

Many-Shot In-Context Learning (ICL) has emerged as a promising paradigm, leveraging extensive examples to unlock the reasoning potential of Large Language Models (LLMs). However, existing methods typically rely on a predetermined, fixed number of shots. This static approach often fails to adapt to the varying difficulty of different queries, leading to either insufficient context or interference from noise. Furthermore, the prohibitive computational and memory costs of long contexts severely limit Many-Shot's feasibility. To address the above limitations, we propose AdapShot, which dynamically optimizes shot counts and leverages KV cache reuse for efficient inference. Specifically, we design a probe-based evaluation mechanism that utilizes output entropy to determine the optimal number of shots. To bypass the redundant prefilling computation during both the probing and inference phases, we incorporate a semantics-aware KV cache reuse strategy. Within this reuse strategy, to address positional encoding incompatibilities, we introduce a decoupling and re-encoding method that enables the flexible reordering of cached key-value pairs. Extensive experiments demonstrate that AdapShot achieves an average performance gain of around 10% and a 4.64x speedup compared to state-of-the-art DBSA.

📄 PDF Abstract BibTeX arXiv:2605.03644

Code (0)

등록된 구현이 없습니다.

Similar Papers 제목 키워드 기반

MAPLE: Many-Shot Adaptive Pseudo-Labeling for In-Context Learning

2025-05-22 · Zihan Chen, Song Wang, Zhen Tan, Jundong Li 외

In-Context Learning (ICL) empowers Large Language Models (LLMs) to tackle diverse tasks by incorporating multiple input-output examples, known as demonstrations, into the input of LLMs. More recently, advancements in the…

In-Context Learning

LAGO: Language-Guided Adaptive Object-Region Focus for Zero-Shot Visual-Text Alignment

2026-05-04 · Junyi Hu, Qiji Zhou, Lei Zhang, Yue Zhang arxiv

Zero-shot recognition aims to classify an image by selecting the most compatible label description from a set of candidate classes without any task-specific supervision. In fine-grained settings, however, the relevant ev…

PANDAS: Improving Many-shot Jailbreaking via Positive Affirmation, Negative Demonstration, and Adaptive Sampling

2025-02-04 · Avery Ma, Yangchen Pan, Amir-Massoud Farahmand

Many-shot jailbreaking circumvents the safety alignment of LLMs by exploiting their ability to process long input sequences. To achieve this, the malicious target prompt is prefixed with hundreds of fabricated conversati…

Safety Alignment

OneStory: Coherent Multi-Shot Video Generation with Adaptive Memory

2025-12-08 · Zhaochong An, Menglin Jia, Haonan Qiu, Zijian Zhou 외 arxiv

Storytelling in real-world videos often unfolds through multiple shots -- discontinuous yet semantically connected clips that together convey a coherent narrative. However, existing multi-shot video generation (MSV) meth…

Video Generation

Adaptive Cross-Modal Few-Shot Learning

2019-02-19 · NeurIPS 2019 12 · Chen Xing, Negar Rostamzadeh, Boris N. Oreshkin, Pedro O. Pinheiro

Metric-based meta-learning techniques have successfully been applied to few-shot classification problems. In this paper, we propose to leverage cross-modal information to enhance metric-based few-shot learning methods. V…

Few-Shot Image ClassificationFew-Shot LearningGeneral Classificationimage-classification+2