# How to sample a dataset

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-sample-a-dataset%2F26880%3E%5C
**Category:** Beginners\
**Created:** [November 28, 2022, 6:22pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-sample-a-dataset%2F26880 "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](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fhaymurr)%5C
**Post date:** [November 28, 2022, 6:22pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-sample-a-dataset%2F26880%2F1 "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?
