arXiv:2609.05707cs.CLSep 2026Cited by 2 papers on PaperVantage

Manuscript Offprint

arXiv:2609.05707

Intra-Prompt Parallel Decoding for Common-Context Question Answering

Theodore Glavas, Nikhita Vedula, Dushyanta Dhyani, Antonios Valkanas, Yilun Zhu, Shervin Malmasi

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

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.

1 Introduction

Text generation has emerged as a core capability of LLMs, powering downstream NLP applications such as dialogue systems (Yi et al., 2025), summarization (Zhang et al., 2026), and question answering (QA) (Yue, 2025). Within the broad landscape of text generation, contextual QA stands out as a representative benchmark task: given a document and a question, a model must not only locate relevant pieces of evidence within the context, but also integrate and reason across them to answer the question. A large subset of QA tasks referred to as reading comprehension follows this setting, where multiple questions are asked about the same passage (Lai et al., 2017; Yang et al., 2018; Rajpurkar et al., 2018; Kočiský et al., 2018). We define common-context question answering (CCQA) as the task of producing multiple outputs by answering different questions about a shared context, such as a document. This setting is common in industrial information extraction, where systems must extract numerous fields or facts from the same long, unstructured input, including financial statements, medical records, legal documents, and web pages (Mandal et al., 2025; Brinkmann et al., 2024).

Although LLMs excel at generating free-form answers for a wide range of applications, the computational cost of generative LLMs limits their adoption in large-scale real-world scenarios. This challenge is particularly critical in CCQA because, despite substantial context overlap across questions, autoregressive decoding repeatedly computes the same prompt and passage for each question, wasting GPU resources with redundant computations and amplifying inefficiencies.

Motivated by cost savings, a significant body of literature has focused on improving the efficiency of LLM inference for text generation as well as CCQA. A major performance bottleneck arises from the challenge of fully utilizing highly-parallel GPU architectures, due to the high memory requirements and sequential nature of autoregressive decoding. State-of-the-art serving platforms, such as vLLM (Kwon et al., 2023), implement a variety of advanced methods to address this. Continuous batching dynamically groups incoming requests to maximize GPU utilization, PagedAttention (Kwon et al., 2023) shares the memory-intensive key-value

∗^{*} This work was done as part of an internship at Amazon.

†^{\dagger} Work done while at Amazon. Currently at Apple.

(KV) cache across requests, and Cascade inference (Ye et al., 2024b; Juravsky et al., 2024) shares the compute-expensive attention score calculation of shared prefixes across requests. While these innovations have substantially accelerated inference, the computational cost of processing large, common contexts for millions of queries remains a key challenge, particularly in offline scenarios requiring high throughput, and when not all batched requests share the same context.

To address the above challenges, we introduce Intra-Prompt Parallel Decoding (IPPD),¹ a novel inference method for maximizing the batched throughput of CCQA with intra-prompt parallelism (Figure 1), where multiple questions are combined into a single prompt, and answers are decoded in parallel within it. By decoding tokens out of order and adjusting the attention mask, IPPD increases throughput while not affecting the final output. The increased efficiency of IPPD stems from dramatically reducing the number of required memory accesses during attention, which is known to be heavily memory bottlenecked (Recasens et al., 2025). Importantly, IPPD can be easily applied to existing systems without changes to the core model implementation, maintains compatibility with orthogonal inference acceleration methods, and is up to 7 times more computationally efficient than standard batched inference on realistic CCQA tasks.