# Load a subset of a dataset

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fload-a-subset-of-a-dataset%2F36881%3E%5C
**Category:** 🤗Datasets\
**Created:** [April 17, 2023, 8:02pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fload-a-subset-of-a-dataset%2F36881 "2023-04-17T20:02:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jimothyhalpert7](https://avatars.discourse-cdn.com/v4/letter/j/f19dbf/32.png) [@jimothyhalpert7](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fjimothyhalpert7)%5C
**Post date:** [April 17, 2023, 8:02pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fload-a-subset-of-a-dataset%2F36881%2F1 "2023-04-17T20:02:35Z")

</div>

I want to speed up the

> Generating train split:

step of loading the `cornell_movie_dialog` dataset.  
I figured if I should be able to load a subset of the dataset, and the generation should go faster.

Is it possible to do that?

---

<div class="post-metadata">

**Author:** ![surya-narayanan](https://avatars.discourse-cdn.com/v4/letter/s/d2c977/32.png) [@surya-narayanan](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fsurya-narayanan)%5C
**Post date:** [April 18, 2023, 9:12pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fload-a-subset-of-a-dataset%2F36881%2F2 "2023-04-18T21:12:00Z")

</div>

You should be able to index into a dataset, so try using cornell\_movie\_dialog[:1000] to see if that works

---

<div class="post-metadata">

**Author:** ![jimothyhalpert7](https://avatars.discourse-cdn.com/v4/letter/j/f19dbf/32.png) [@jimothyhalpert7](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fjimothyhalpert7)%5C
**Post date:** [April 19, 2023, 4:27pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fload-a-subset-of-a-dataset%2F36881%2F3 "2023-04-19T16:27:43Z")

</div>

It doesn’t. The

> Generating train split:

would still take all 80-ish thousand entries.
