One function, many sources
datasets.load_dataset() is the entry point for the entire Datasets library. It accepts a Hub dataset id, a local path, a directory of files, or one of HF's named loader scripts. Behind the scenes it figures out the format (Parquet, CSV, JSONL, TSV, audio folder, image folder, …), downloads to HF_DATASETS_CACHE, and returns a Dataset or DatasetDict.
The two return shapes
- If the loader script defines splits (train/validation/test), you get a DatasetDict — a dict-of-Datasets keyed by split name.
- If you ask for a specific split (
split="train") or the source has only one, you get a single Dataset.
Streaming changes the contract
By default, load_dataset downloads the full dataset to disk and gives you a fully indexed array-like. With streaming=True it returns an IterableDataset: lazy, never written to disk, no random access. For multi-TB datasets that's the only sensible option.