# How to load a large hf dataset efficiently?

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-load-a-large-hf-dataset-efficiently%2F69288%3E%5C
**Category:** 🤗Datasets\
**Created:** [January 16, 2024, 3:52am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-load-a-large-hf-dataset-efficiently%2F69288 "2024-01-16T03:52:35Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![samcaetano](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/samcaetano/32/21984_2.png) [@samcaetano](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fsamcaetano)%5C
**Post date:** [January 20, 2024, 11:14pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-load-a-large-hf-dataset-efficiently%2F69288%2F5 "2024-01-20T23:14:14Z")

</div>

@lhoestq what do you think about loading this dataset in a lazy way, for example loading it as a batch of 64 samples at a time? Is it more inefficient than loading those shards of data?

---

_[View the full topic](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-load-a-large-hf-dataset-efficiently%2F69288)._
