
10/7/2025 · Jiyang Kang, Shivaji Dutta, Ihor Indyk, Felix Chern
What this post added
Introduces Grain, a flexible data loading library for JAX, and ArrayRecord, a highly efficient file format, to build high-performance data pipelines for large-scale machine learning. Grain ensures efficient data loading and preprocessing with multiprocessing and stateful, checkpointable iterators for reproducibility. ArrayRecord, built on Riegeli, offers efficient random access via a metadata index and parallel I/O through data chunks, enabling true global shuffling and significantly higher read throughput compared to sequential formats like TFRecord. The post also details methods for converting TFRecord datasets to ArrayRecord using `tfds build` or Apache Beam for scalable conversion.