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
- Without
split, you get a DatasetDict — a dict-of-Datasets keyed by split name — even when the source has only one split. - Ask for a specific split (
split="train") and you get a single Dataset. With streaming, the two becomeIterableDatasetDictandIterableDataset.
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.