Data Loader Throughput + Sequence Packing

Measure and optimize dataloader throughput and sequence packing for large-scale training.

Updated Feb 28, 2026
One-click install
npx skills add https://github.com/sovr610/refffiy --skill data-loader-throughput-sequence-packing
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Data Loader Throughput + Sequence Packing
Source: https://github.com/sovr610/refffiy/tree/main/brain-ai-dev/skills/dataloader-throughput-packing
Command: npx skills add https://github.com/sovr610/refffiy --skill data-loader-throughput-sequence-packing

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires numpy, and includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve?

DataLoader Throughput + Sequence Packing provides a structured approach to measuring and optimizing the end-to-end data pipeline for large-scale training, identifying data stalls, and eliminating wasted compute from padding.

Core Features & Use Cases

  • Audits and improves input data throughput by instrumenting the data loading and GPU compute phases.
  • Supports deterministic per-rank sharding, streaming and memmap backends, and bucketing/padding strategies to maximize effective tokens per second.
  • Offers utilities for sequence packing (pretraining blocks and SFT boundary-aware packing) and integrated metrics reporting to guide configuration.

Quick Start

Configure a synthetic dataset and run the six-phase pipeline to observe throughput gains and iterate on packing and sharding settings.

Frequently Asked Questions about Data Loader Throughput + Sequence Packing

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I optimize dataloader throughput and eliminate padding waste during large-scale training?

To optimize dataloader throughput and eliminate padding waste, apply sequence packing and bucketing strategies. This Skill audits data loading and GPU compute phases to maximize effective tokens per second in distributed training.

What is sequence packing and when do I need it for pretraining and SFT workflows?

Sequence packing combines multiple training examples into fixed-length blocks to avoid wasted compute from padding. You need it for pretraining blocks and SFT boundary-aware packing to maximize dataloader throughput at scale.

How do I benchmark dataloader throughput across HF streaming, WebDataset tar shards, and token memmap backends?

You benchmark dataloader throughput by configuring a synthetic dataset and running the six-phase pipeline. This instruments data loading and compute phases to measure throughput gains across HF streaming, WebDataset tar shards, and memmap backends.

Does this approach support deterministic per-rank sharding for distributed training?

Yes, it supports deterministic per-rank sharding for distributed training environments. It applies deterministic sharding alongside caching and bucketing strategies to satisfy production-grade requirements for large-scale training workflows.

Do I need numpy to run the dataloader throughput and sequence packing pipeline?

Yes, numpy is required to run the dataloader throughput and sequence packing pipeline. It serves as the sole dependency for executing the scripts, processing assets, and utilizing the provided references.

Why does my dataloader experience data stalls during large-scale training?

Data stalls occur when the dataloader cannot supply data fast enough to keep the GPU compute phase saturated. Instrumenting the data loading and compute phases identifies these bottlenecks and guides configuration changes to improve throughput.