---
title: "Parallel Context Windows for LLMs — arXiv Seminal Paper"
url: https://stacklist.com/card/651ccf46-5cd6-436c-a259-81ca8418285a
source_url: "https://arxiv.org/abs/2212.10947"
stack: https://stacklist.com/c/technology/stack/e16dcdcb-06b9-481c-aef9-40b6d73a5c8e
summary: "Parallel Context Windows (PCW) is a proposed method that extends the effective context window of off-the-shelf large language models without additional training by splitting long contexts into chunks, restricting attention within each window, and reusing positional embeddings. The paper demonstrates substantial improvements on in-context learning, multi-hop questions, and retrieval-augmented QA tasks across models ranging from 750 million to 178 billion parameters, and was presented at ACL 2023."
tags: "parallel-context-windows, large-language-models, context-window, in-context-learning, attention-mechanism, positional-embeddings, natural-language-processing"
key_entities: "Parallel Context Windows (PCW) (concept), Nir Ratner (person), Yoav Levine (person), Yonatan Belinkov (person), Ori Ram (person), Amnon Shashua (person), Kevin Leyton-Brown (person), Yoav Shoham (person), Large Language Models (technology), ACL 2023 (event), arXiv (organization), in-context learning (concept), retrieval-augmented question answering (concept), attention mechanism (concept)"
classification: "reference"
content_hash: "sha256:4d88db2e55e22eb12c863924156e9040e7371425635ca64a1bb3738016cea164"
acp_version: "0.2"
token_counts_approximate: 1105
visibility: public
agent_accessible: true
status: "final"
---

# Parallel Context Windows for LLMs — arXiv Seminal Paper

--> Computer Science > Computation and Language arXiv:2212.10947 (cs) [Submitted on 21 Dec 2022 ( v1 ), last revised 1 Aug 2023 (this version, v3)] Title: Parallel Context Windows for Large Language Models Authors: Nir Ratner , Yoav Levine , Yonatan Belinkov , Ori Ram , Inbal Magar , Omri Abend , Ehud Karpas , Amnon Shashua , Kevin Leyton-Brown , Yoav Shoham View a PDF of the paper titled Parallel Context Windows for Large Language Models, by Nir Ratner and 9 other authors View PDF Abstract: When applied to processing long text, Large Language Models (LLMs) are limited by their context window. Existing efforts to address this limitation involve training specialized architectures, and cannot be easily applied to off-the-shelf LLMs. We present Parallel Context Windows (PCW), a method that alleviates the context window restriction for any off-the-shelf LLM without further training. The key to the approach is to carve a long context into chunks (``windows&#39;&#39;), restrict the attention mechanism to apply only within each window, and re-use the positional embeddings across the windows. Our main results test the PCW approach on in-context learning with models that range in size between 750 million and 178 billion parameters, and show substantial improvements for tasks with diverse input and output spaces. We show additional benefits in other settings where long context windows may be beneficial: multi-hop questions and retrieval-augmented question answering with multiple retrieved documents. Our results highlight Parallel Context Windows as a promising method for applying off-the-shelf LLMs in a range of settings that require long text sequences. We make our code publicly available at this https URL . Comments: The 61st Annual Meeting of the Association for Computational Linguistics (ACL 2023) Subjects: Computation and Language (cs.CL) Cite as: arXiv:2212.10947 [cs.CL] &nbsp; (or arXiv:2212.10947v3 [cs.CL] for this version) &nbsp; https://doi.org/10.48550/arXiv.2212.10947 Focus to learn more arXiv-issued DOI via DataCite Submission history From: Yoav Levine [ view email ] [v1] Wed, 21 Dec 2022 11:38:51 UTC (7,368 KB) [v2] Mon, 15 May 2023 06:09:57 UTC (7,375 KB) [v3] Tue, 1 Aug 2023 16:48:47 UTC (7,378 KB) Full-text links: Access Paper: View a PDF of the paper titled Parallel Context Windows for Large Language Models, by Nir Ratner and 9 other authors View PDF TeX Source view license Current browse context: cs.CL &lt;&nbsp;prev &nbsp; | &nbsp; next&nbsp;&gt; new | recent | 2022-12 Change to browse by: cs References &amp; Citations NASA ADS Google Scholar Semantic Scholar export BibTeX citation Loading... BibTeX formatted citation &times; loading... Data provided by: Bookmark Bibliographic Tools Bibliographic and Citation Tools Bibliographic Explorer Toggle Bibliographic Explorer ( What is the Explorer? ) Connected Papers Toggle Connected Papers ( What is Connected Papers? ) Litmaps Toggle Litmaps ( What is Litmaps? ) scite.ai Toggle scite Smart Citations ( What are Smart Citations? ) Code, Data, Media Code, Data and Media Associated with this Article alphaXiv Toggle alphaXiv ( What is alphaXiv? ) Links to Code Toggle CatalyzeX Code Finder for Papers ( What is CatalyzeX? ) DagsHub Toggle DagsHub ( What is DagsHub? ) GotitPub Toggle Gotit.pub ( What is GotitPub? ) Huggingface Toggle Hugging Face ( What is Huggingface? ) ScienceCast Toggle ScienceCast ( What is ScienceCast? ) Demos Demos Replicate Toggle Replicate ( What is Replicate? ) Spaces Toggle Hugging Face Spaces ( What is Spaces? ) Spaces Toggle TXYZ.AI ( What is TXYZ.AI? ) Related Papers Recommenders and Search Tools Link to Influence Flower Influence Flower ( What are Influence Flowers? ) Core recommender toggle CORE Recommender ( What is CORE? ) Author Venue Institution Topic About arXivLabs arXivLabs: experimental projects with community collaborators arXivLabs is a framework that allows collaborators to develop and share new arXiv features directly on our website. Both individuals and organizations that work with arXivLabs have embraced and accepted our values of openness, community, excellence, and user data privacy. arXiv is committed to these values and only works with partners that adhere to them. Have an idea for a project that will add value for arXiv's community? Learn more about arXivLabs . Which authors of this paper are endorsers? | Disable MathJax ( What is MathJax? )
