Scaling AI-based Data Processing with Hugging Face + Dask
Dask DataFrame lets a pandas-based Hugging Face inference workflow scale from a 100-row local test to all 211 million rows of a FineWeb crawl. The FineWeb-Edu classifier scores each page for educational value through map_partitions, and the filtered results are written back to the Hub as Parquet. The full 432 GB crawl ran on 100 A10 GPU spot instances provisioned with Coiled in about 5 hours, with GPU utilization near 100%. Practical tips include in-function hardware detection, tuning pipeline batch_size to the hardware, and squashing per-file commits after a parallel upload.
Related posts
- Streaming datasets: 100x More Efficient
Hugging Face mediumAdeptHugging Face reworked streaming in the `datasets` library so multi-terabyte datasets can feed large training jobs directly from the Hub, keeping the same `streaming=True` API. The fix for request storms, where every DataLoader worker resolved data files independently, is a persistent data-files cache shared across workers plus batched resolution calls, cutting startup requests up to 100x and making file resolution 10x faster. Parquet prefetching and configurable PyArrow buffer and range sizes roughly double streaming throughput. They report that at 64xH100 with 256 workers, streaming matched local SSD reads. Xet deduplicated storage with Parquet content-defined chunking speeds transfers, and an improved HfFileSystem supports custom streaming pipelines.
- Hosting your Models and Datasets on Hugging Face Spaces using Streamlit
Hugging Face mediumAdeptStreamlit apps can showcase Hugging Face models and datasets and be hosted on Hugging Face Spaces. The walkthrough recreates "Write with Transformer" using Streamlit widgets such as text_area, sidebar sliders and number_input to collect generation hyperparameters like temperature, top-k and top-p. It then visualizes a poetry dataset, loaded with 🤗 Datasets streaming, using st.dataframe, st.bar_chart and st.pyplot for seaborn/matplotlib plots. Deployment means dragging files into a Space, listing dependencies in requirements.txt, and matching the Streamlit version.
- Introducing the SQL Console on Datasets
Hugging Face mediumAdeptHugging Face Hub datasets now have a one-click SQL Console that runs DuckDB WASM entirely in the browser against each dataset's Parquet files, with views created per split and config. Non-Parquet datasets have their first 5GB auto-converted. A simple filter over a 12.6M-row dataset returns in under 3 seconds, but memory is capped at roughly 3GB and DuckDB WASM lacks some DuckDB features such as the hf:// protocol. A worked example uses struct_pack to convert an Alpaca dataset into conversational format for LLM fine-tuning and exports the results to Parquet.
- Run AI workloads on any cloud, store on Hugging Face: zero-egress storage with SkyPilot
Hugging Face mediumAdeptSkyPilot now supports Hugging Face Storage as a first-class backend (`store: hf`), so jobs on any of 20+ clouds, Kubernetes or on-prem can mount Hub buckets (read-write) or model/dataset repos (read-only) via an `hf://` URL and an existing `HF_TOKEN`. MOUNT mode uses the `hf-mount` FUSE driver with lazy, byte-range reads and an on-disk cache. Because Hugging Face charges no egress, reads onto GPUs anywhere are free; writes still pay the compute cloud's egress. A Qwen3.5-4B fine-tune loaded the model in about 30 seconds and wrote 8.43 GB checkpoints at roughly 112-168 MB/s across AWS, GCP and Lambda, while Xet content-defined chunking deduplicates incremental checkpoints, model variants and appended Parquet data.
- Record, train, and deploy from one place with Strands Agents, LeRobot, and Hugging Face Storage Buckets
Hugging Face mediumAdeptStrands Robots 0.6 and LeRobot 0.7 form a continuous robot data loop. Demonstrations are recorded as LeRobotDatasets with `Robot.run(record=...)` and synced into Hugging Face Storage Buckets, which are Xet-backed and deduplicate at the byte level with content-defined chunking. Training streams the data back through `StreamingLeRobotDataset` with no local download, and the checkpoint deploys to hardware with a `port=` change. In HF's benchmarks, re-uploading a 500 MB file with 1% of its bytes changed transferred only 5.5 MB. A full streaming read of an 86 MB dataset left under 1 MB on disk, because LeRobot's large Parquet and MP4 shards turn each batch into a few byte-range reads.