# How do i load part of the data set

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-do-i-load-part-of-the-data-set%2F153049%3E%5C
**Category:** Beginners\
**Created:** [April 30, 2025, 6:34pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-do-i-load-part-of-the-data-set%2F153049 "2025-04-30T18:34:29Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![John6666](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/john6666/32/27664_2.png) [@John6666](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FJohn6666)%5C
**Post date:** [April 30, 2025, 9:07pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-do-i-load-part-of-the-data-set%2F153049%2F2 "2025-04-30T21:07:24Z")

</div>

I wonder if streaming would be a good option…

> **[Stream · Hugging Face](https://huggingface.co/docs/datasets/v3.5.1/stream)**
>
> We’re on a journey to advance and democratize artificial intelligence through open source and open science.

> [@Best practices for a large dataset](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fbest-practices-for-a-large-dataset%2F137632)%3A
>
> Hi, I have a ~1TB large dataset stored at the HF hub. I can download this on my disk and read it successfully. Nevertheless, it’s large enough that I can’t fit it in my RAM. What is the best practice for training a model on such a dataset? I tried loading the dataset with load\_dataset(..., streaming=True) and then having two buffers: one that is being loaded by training process onto GPU and one that, in a separate thread, streams from the dataset and fills up the other buffer. Then, when the i…

> [@How to load a large hf dataset efficiently?](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-load-a-large-hf-dataset-efficiently%2F69288%2F6)%3A
>
> It’s generally a good idea indeed if you want to save disk space or to not have to wait to download the full dataset. For example you can stream the dataset using the datasets library, by passing streaming=True to load\_dataset(). However even in streaming mode, you better have multiple shards in order to do parallel streaming. And ideally use file formats that work well with streaming like WebDataset or Parquet. @aaditya did try streaming mode on this dataset but the custom loading script of …

---

_[View the full topic](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-do-i-load-part-of-the-data-set%2F153049)._
