Download a fraction of data from HuggingFace Datasets

I think this is close, but technically speaking, it’s not the number of files, and you can’t specify the size.
You can use HfApi to get a list of the files in a repo and see their sizes, but that’s almost like doing it manually…