# Strumieniowe, shardowane zbiory treningowe

EN: **Streaming sharded training datasets** · id `streamingdatasets` · aliases: sharded datasets, dataset streaming, formaty shardów, data loading at scale

Path: [AI Atlas](https://aiatlasgraph.com/llms.txt) › [Dane dla AI](https://aiatlasgraph.com/t/data.md) › [Pipeline’y i wersjonowanie](https://aiatlasgraph.com/t/pipelines.md) › Strumieniowe, shardowane zbiory treningowe

## Description

- PL: Organizacja próbek w sekwencyjnie czytanych shardach oraz ich strumieniowe dostarczanie z dysku lub magazynu obiektowego do procesu treningu.
- EN: Organising samples into sequentially read shards and streaming them from disk or object storage into training.

## In one sentence

- PL: Pakowanie ogromnych zbiorów w duże paczki czytane po kolei, żeby karty graficzne nie czekały na dane z dysku.
- EN: Packing huge datasets into large chunks read in order, so graphics cards are not left waiting for data from disk.

## Problem it solves

- PL: Miliardy małych plików czytanych w losowej kolejności dławią dyski i sieć, a drogie GPU stoją bezczynnie.
- EN: Billions of small files read in random order choke disks and networks, leaving expensive GPUs idle.

## What it does

- PL: Jak przewóz towaru w kontenerach zamiast luzem: mniej przeładunków, równy strumień, a tasuje się całe skrzynie i ich zawartość.
- EN: Like shipping goods in containers instead of loose: fewer transfers, a steady flow, with crates and their contents shuffled.

## Everyday example

- PL: Trening startuje od razu z danych w chmurze, bez wielogodzinnego kopiowania milionów zdjęć na serwer.
- EN: Training starts straight from cloud data, without hours of copying millions of photos to the server.

## This concerns you if you…

- PL: twoje GPU czekają na wczytanie danych
- PL: zbiór nie mieści się na lokalnym dysku
- EN: your GPUs wait for data to load
- EN: your dataset does not fit on local disk

## Keywords

WebDataset · MosaicML Streaming (MDS) · Hugging Face datasets streaming · Apache Parquet · TFRecord · FFCV · PyTorch IterableDataset · AIStore

## How it works

- PL: Próbki grupuje się w numerowane shardy po ok. setki MB; pliki jednej próbki leżą obok siebie. Loader czyta shardy sekwencyjnie przez URL (dysk, HTTP, S3), dzieli je między workery i węzły, a tasuje na dwóch poziomach: kolejność shardów i bufor próbek. Dekodowanie i augmentacja dzieją się w potoku równolegle do treningu.
- EN: Samples are grouped into numbered shards of roughly hundreds of MB, with a sample's files stored together. The loader reads shards sequentially via URL (disk, HTTP, S3), splits them across workers and nodes, and shuffles at two levels: shard order and a sample buffer. Decoding and augmentation run in a pipeline parallel to training.

## Limits

- PL: Tasowanie jest tylko przybliżone, a dokładna liczba próbek na epokę i wznowienie w połowie są trudniejsze. Zmiana pojedynczej próbki wymaga przepisania sharda; dobór rozmiaru shardów zależy od infrastruktury.
- EN: Shuffling is only approximate, and exact samples per epoch and mid-epoch resumption are harder. Changing a single sample means rewriting its shard; shard size tuning depends on the infrastructure.

## Key terms

- PL: **shard**: Jedna z wielu dużych paczek, na które podzielono zbiór danych.
- PL: **bufor tasowania**: Pula próbek w pamięci, z której losuje się kolejne do batcha.
- PL: **magazyn obiektowy**: Chmurowa przestrzeń na pliki dostępna przez sieć, np. kubełki S3.
- EN: **shard**: One of many large chunks a dataset is split into.
- EN: **shuffle buffer**: In-memory pool of samples from which the next batch items are drawn.
- EN: **object storage**: Network-accessed cloud file storage, such as S3 buckets.

## Know first

- [GPU i obliczenia rozproszone (GPU and distributed computing)](https://aiatlasgraph.com/t/compute.md)

## Related topics

Untyped, symmetric "see also" links.

- [Przetwarzanie danych na dużą skalę (Large-scale data processing)](https://aiatlasgraph.com/t/largescaleprocessing.md)

## Sources

- [WebDataset – repository and documentation](<https://github.com/webdataset/webdataset>) `webdataset-github` · by WebDataset (Thomas Breuel i współtwórcy)
- [Efficient PyTorch I/O library for Large Datasets, Many Files, Many GPUs](<https://pytorch.org/blog/efficient-pytorch-io-library-for-large-datasets-many-files-many-gpus/>) `pytorch-blog-webdataset-2020` · by Alex Aizman, Gavin Maltby, Thomas Breuel

---

AI Atlas revision 122 (2026-10-30) · HTML: https://aiatlasgraph.com/t/streamingdatasets · index: https://aiatlasgraph.com/llms.txt · everything: https://aiatlasgraph.com/llms-full.txt · updated 2026-10-30
