# How to sample a dataset

**URL:** <https://discuss.huggingface.co/t/how-to-sample-a-dataset/26880>\
**Category:** Beginners\
**Created:** [November 28, 2022, 6:22pm UTC](https://discuss.huggingface.co/t/how-to-sample-a-dataset/26880 "2022-11-28T18:22:02Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![haymurr](https://avatars.discourse-cdn.com/v4/letter/h/ed8c4c/32.png) [@haymurr](https://discuss.huggingface.co/u/haymurr)\
**Post date:** [November 28, 2022, 6:22pm UTC](https://discuss.huggingface.co/t/how-to-sample-a-dataset/26880/1 "2022-11-28T18:22:02Z")

</div>

Hello,

I was reading the documentation [Load](https://huggingface.co/docs/datasets/loading)  
I see there is a way to grab splits, but is there a way to sample lets say 2k images (or some sample size) from a split without downloading the whole dataset?
