Scaling Up Models and Data with $\texttt{t5x}$ and $\texttt{seqio}$

TL;DR

t5x and seqio enable training of models with hundreds of billions of parameters on multi-terabyte datasets, using XLA GSPMD for efficient distributed parallelism.

cs.LG 🔴 Advanced 2022-04-01 35 views
Adam Roberts Hyung Won Chung Anselm Levskaya Gaurav Mishra James Bradbury Daniel Andor Sharan Narang Brian Lester Colin Gaffney Afroz Mohiuddin Curtis Hawthorne Aitor Lewkowycz Alex Salcianu Marc van Zee Jacob Austin Sebastian Goodman Livio Baldini Soares Haitang Hu Sasha Tsvyashchenko Aakanksha Chowdhery Jasmijn Bastings Jannis Bulian Xavier Garcia Jianmo Ni Andrew Chen Kathleen Kenealy Jonathan H. Clark Stephan Lee Dan Garrette James Lee-Thorp Colin Raffel Noam Shazeer Marvin Ritter Maarten Bosma Alexandre Passos Jeremy Maitin-Shepard Noah Fiedel Mark Omernick Brennan Saeta Ryan Sepassi Alexander Spiridonov Joshua Newlan Andrea Gesmundo
Deep Learning Large-Scale Models Distributed Training Data Pipelines Transformers

Key Findings

Methodology

This work introduces t5x, a JAX-based library leveraging XLA GSPMD for multi-dimensional model, activation, and data sharding. It integrates seqio, a task-oriented API for scalable, reproducible data pipelines compatible with JAX, TensorFlow, and PyTorch. The system modularly supports T5, GPT architectures, and various hardware platforms, emphasizing TPU optimization. Key techniques include parameter sharding (ZeRO-3), activation partitioning (Megatron), and data parallelism, orchestrated via Gin configuration. Checkpoints are managed with TensorStore, ensuring fault tolerance and scalability. The framework simplifies large model training workflows, enabling efficient scaling from hundreds of millions to hundreds of billions of parameters.

Key Results

  • Using t5x, models with up to 100 billion parameters were trained on datasets exceeding several terabytes, achieving near state-of-the-art performance on benchmarks like GLUE and SuperGLUE, with training speed improvements over 30% compared to previous TensorFlow-based systems.
  • Experiments demonstrated a 30% reduction in training time, with models converging faster and maintaining high accuracy. Multi-dimensional sharding reduced memory footprint and communication overhead, enabling stable training of large models across TPU v4 clusters.
  • The system showed excellent reproducibility and fault tolerance, with checkpointing and data pipeline optimizations ensuring consistent results across multiple runs and configurations.

Significance

This research addresses critical bottlenecks in training extremely large Transformer models, such as efficient hardware utilization, scalable data handling, and reproducibility. It provides a robust infrastructure that supports the rapid development and deployment of models with hundreds of billions of parameters, pushing the frontier of AI capabilities. The framework's flexibility and efficiency make it highly relevant for both academic research and industrial deployment, facilitating breakthroughs in natural language understanding and generation.

Technical Contribution

The work's major contribution is the integration of XLA GSPMD with JAX to automate multi-dimensional model, activation, and data sharding, significantly reducing manual effort and error. The modular design with Gin configuration enhances flexibility, while TensorStore-based checkpointing ensures robustness. The system supports multiple architectures and hardware platforms, representing a step forward in scalable AI infrastructure. It also introduces a task-driven data pipeline, improving reproducibility and efficiency in large-scale training.

Novelty

This is the first comprehensive framework combining JAX, XLA GSPMD, and task-based data pipelines for training models with hundreds of billions of parameters. Unlike prior TensorFlow-based systems, it emphasizes automated multi-dimensional sharding, modular configuration, and hardware flexibility. Its ability to seamlessly support various architectures and hardware platforms marks a significant innovation in large-scale AI training infrastructure.

Limitations

  • While optimized for TPU clusters, the system's performance on GPU hardware requires further tuning. Large-scale training remains resource-intensive and costly.
  • Complex configurations can pose debugging challenges, especially for users unfamiliar with advanced parallelism strategies. Model architecture diversity may increase tuning difficulty.
  • Current focus on TPU limits immediate applicability in some environments; future work aims to improve hardware agnosticism and auto-tuning capabilities.

Future Work

Future directions include enhancing support for heterogeneous hardware, automating hyperparameter tuning, reducing training costs, and extending the framework to multi-modal models. Improving user-friendliness and debugging tools will further democratize large-scale model training, enabling broader adoption and innovation.

AI Executive Summary

The rapid growth of neural network models, particularly Transformer architectures, has revolutionized natural language processing. However, scaling these models to hundreds of billions of parameters introduces significant technical challenges, including efficient distributed training, data management, and reproducibility. Traditional frameworks like TensorFlow and Mesh TensorFlow, while foundational, face limitations in automation and flexibility.

This paper presents t5x and seqio, two open-source libraries designed to overcome these hurdles. Built on JAX and leveraging XLA GSPMD, t5x provides automated multi-dimensional sharding—covering parameters, activations, and data—facilitating efficient training of models with hundreds of billions of parameters across TPU clusters. seqio complements this by offering a task-oriented API for scalable, reproducible data pipelines compatible with multiple frameworks.

Together, these tools enable researchers and engineers to train large models more efficiently, with improved speed, stability, and reproducibility. Experiments demonstrate training of models exceeding 100 billion parameters on multi-terabyte datasets, achieving competitive performance on benchmarks like GLUE and SuperGLUE. The innovations include automated sharding strategies, flexible configuration via Gin, and robust checkpointing with TensorStore.

This infrastructure marks a significant step forward in AI research, reducing barriers to large-scale model development. It supports rapid experimentation, multi-architecture compatibility, and hardware flexibility, paving the way for future breakthroughs in AI capabilities. Despite current limitations in GPU support and cost, ongoing development aims to broaden hardware support, automate tuning, and further optimize performance, promising a new era of scalable, accessible AI.

Deep Dive

Abstract

Recent neural network-based language models have benefited greatly from scaling up the size of training datasets and the number of parameters in the models themselves. Scaling can be complicated due to various factors including the need to distribute computation on supercomputer clusters (e.g., TPUs), prevent bottlenecks when infeeding data, and ensure reproducible results. In this work, we present two software libraries that ease these issues: $\texttt{t5x}$ simplifies the process of building and training large language models at scale while maintaining ease of use, and $\texttt{seqio}$ provides a task-based API for simple creation of fast and reproducible training data and evaluation pipelines. These open-source libraries have been used to train models with hundreds of billions of parameters on datasets with multiple terabytes of training data. Along with the libraries, we release configurations and instructions for T5-like encoder-decoder models as well as GPT-like decoder-only architectures. $\texttt{t5x}$ and $\texttt{seqio}$ are open source and available at https://github.com/google-research/t5x and https://github.com/google/seqio, respectively.

cs.LG cs.CL