Effect of Document Packing on the Latent Multi-Hop Reasoning Capabilities of Large Language Models

Gabriele Prato, Shagun Sodhani, Alessandro Sordoni, Sarath Chandar
12/16/2025
cs.CLcs.AIcs.LG

No confident code implementation found for this paper. 4 possible matches can be shown below.

Abstract

The standard practice for training large language models involves packing multiple documents together to optimize computational efficiency. However, the impact of this process on the models' capabilities remains largely unexplored. To address this gap, we investigate how different document-packing strategies influence the latent multi-hop reasoning abilities of LLMs. Our findings indicate that packing can improve model performance compared to training on individual documents, at the expense of more compute. To further understand the underlying mechanisms, we conduct an ablation study, identifying key factors that explain the advantages of packing. Ultimately, our research deepens the understanding of LLM training dynamics and provides practical insights for optimizing model development.

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. 4 weaker matches are hidden by default — 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{prato2025effect,
  title  = {Effect of Document Packing on the Latent Multi-Hop Reasoning Capabilities of Large Language Models},
  author = {Gabriele Prato and Shagun Sodhani and Alessandro Sordoni and Sarath Chandar},
  year   = {2025},
  eprint = {2512.14427},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2512.14427v1}
}

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

Discussion