A Python library to download public datasets in one line, preprocess local or hub data, and feed NumPy, Pandas, PyTorch, TensorFlow, or JAX workflows with an Apache Arrow backend.
Overview
Hugging Face Datasets is a lightweight library focused on two jobs: fetching and preparing well-known public datasets for machine learning, and running fast, reproducible preprocessing on hub-hosted or local files. A single load call can pull image, audio, text, video, medical imaging, or agent-trace data and return structures ready for training or evaluation.
Preprocessing covers many file types such as CSV, JSON, Parquet, Arrow, audio, images, PDFs, and NIfTI volumes. Map-style operations let you transform examples in parallel with caching so repeated work is not recomputed. Streaming mode can iterate large corpora without fully downloading them first.
The implementation leans on Apache Arrow for memory-mapped, zero-copy access, which reduces RAM pressure on large tables. Conversion hooks exist for NumPy, Pandas, Polars, PyTorch, TensorFlow, JAX, and Spark. Optional indexing supports similarity search backends such as FAISS and Elasticsearch.
Datasets integrate with the Hugging Face Hub for discovery, sharing, and mutable storage buckets. Community members can publish new datasets through guided upload flows from the browser or Python.
Key features
- One-line loading from the Datasets Hub
- Apache Arrow memory-mapped datasets
- Streaming without full local download
- Multi-modal text, audio, image, video support
- Parallel map preprocessing with caching
- Framework export to PyTorch and TensorFlow
- Local files in CSV, JSON, and Parquet
- Agent trace loading from the Hub
Use cases
- Training dataloaders for NLP and vision
- Reproducible dataset preprocessing pipelines
- Inspecting hub datasets before modeling
- Large-scale data without fitting all in RAM
- Publishing datasets to the Hugging Face Hub