Reproduce “Efficient Sequence Packing without Cross-contamination: Accelerating Large Language Models without Impacting Performance” on OpenResearch

Turn your favorite coding agents into research agents that review literature, develop hypotheses, and run experiments.

Universal app for Apple silicon and Intel. Requires macOS 11 or later.

About this paper

Mario Michael Krell, Matej Kosec, Sergio P. Perez, Andrew Fitzgibbon

The researchers at Graphcore Inc. developed efficient sequence packing algorithms and model adjustments to accelerate Large Language Model training. This approach reduces computational waste from padding by over 50%, achieving more than a 2x speedup while preserving model accuracy and avoiding hardware-specific custom kernels.

Key insights

  • Simple data packing without careful model adjustments to positional embeddings and attention masking inevitably leads to severe performance degradation.
  • Efficient, histogram-based offline packing can achieve near-optimal data density (e.g., 99.7%) and double effective throughput for LLMs like BERT.
  • The deterministic nature of pre-packing provides inherent load balancing across distributed accelerators, overcoming the scaling limitations of dynamic un-padding methods.

Summary by alphaXiv.

Tip: change arxiv.org to autoarxiv.org in any arXiv abstract link to open the paper here.