Intra-Prompt Parallel Decoding for Common-Context Question Answering
Theodore Glavas, Nikhita Vedula, Dushyanta Dhyani, Antonios Valkanas, Yilun Zhu, Shervin Malmasi
Abstract
In common-context question answering (CCQA) tasks, multiple input questions share a common context to base their answers from. However, Large Language Models typically generate each answer using an independent prompt. While existing batching and caching techniques help improve parallelism and reduce repeated computations, the separation of questions across prompts limits the achievable speedup, as modern GPUs are underutilized due to a memory bottleneck during attention. We present Intra-Prompt Parallel Decoding (IPPD), a novel inference method that answers multiple common-context questions in parallel within a single prompt. IPPD directly addresses the bottleneck by efficiently sharing both memory and computation during the attention process, as the next token for every question is decoded in a single inference step. IPPD uses virtual position IDs and attention mask manipulation to generate the same output as standard prompting without requiring fine-tuning or any changes to the LLM architecture. Since all parallelism occurs within a prompt, IPPD is fully compatible with batched inference, even when each prompt features a different context. Our experiments show that IPPD delivers up to 7X the effective throughput as standard decoding without quality degradation, and outperforms prefix caching with PagedAttention in most settings.
Create a lesson
Metadata
- Comments
- Accepted to EMNLP 2026 main conference
Related papers
SPARQL-Planned Single-Hop Traversal over a Live Knowledge Graph for Multi-Hop Question Answering
Shared title terminologycs.CLPriyesh Vakharia, Masud Moshtaghi, Pratyay Banerjee et al.
Look Back, Draft Ahead: Corrective Prefix Attention for Parallel Speculative Decoding
Shared title terminologycs.CLMohammad Mahdi Moradi, Ali Pourranjbar, Zongzuo Wang et al.
Quantizing Diffusion LLMs under Parallel Decoding: Commitment Risk and the Parallelism Tax
Shared title terminologycs.CLHuan Xu, Maosen Zhao, Pengtao Chen et al.
FramingQA: Does the Question Shape the Answer? Measuring the Compositional Framing Effect
Shared title terminologycs.CLHazel H. Kim, Andrew M. Bean, Guilherme Affonso Ferreira de Camargo et al.
Where to Look and What to Use: Retrieve-Localize-Generate for Long-Term Conversational Memory Question Answering
Shared title terminologycs.CLYifan Wang, Xinkui Lin, Yongxiu Xu et al.
PARSER: Read in Parallel, Reason in Depth for Long-Context LLM Agents
Shared title terminologycs.CLKun Li, Zexuan Qiu, Tianhua Zhang et al.