2021

Efficient Sequence Packing without Cross-contamination: Accelerating Large Language Models without Impacting Performance

Krell, Mario Michael, Kosec, Matej, Perez, Sergio P. et al.

Understand

Effective training of today's large language models (LLMs) depends on large batches and long sequences for throughput and accuracy.

  • To handle variable-length sequences on hardware accelerators, it is common practice to introduce padding tokens, so that all sequences in a batch have the same length.
  • We show in this paper that the variation in sequence lengths in common NLP datasets is such that up to 50% of all tokens can be padding.
  • In less common, but not extreme, cases (e.g.

Reading the bibliography…