ClimbMix
About
🧗 A more convenient ClimbMix (https://arxiv.org/abs/2504.13161)
Description
Unfortunately, the original ClimbMix (https://huggingface.co/datasets/nvidia/ClimbMix) has four main inconveniences:
- It is in GPT2 tokens, meaning you have to detokenize it to inspect it or use it with another tokenizer.
- It contains all of the 20 clusters in order together (in the same "subset"), so you have to load the whole dataset in memory (~1TB) and shuffle it (~3h) before using it.
- It does not mention the precise cluster ratios (Figure 6 does not show decimal digits, e.g. 0% instead of 0.23%), therefore you cannot subsample it while maintaining the original ratios.
- It does not come with topic annotation (similar to Table 4, which corresponds to another dataset, with 21 clusters)
https://huggingface.co/datasets/OptimalScale/ClimbMix fixes (1), and this is my attempt to solve (2), (3) and (4) as follows:
(2): I separate the clusters in different "subsets", selectable by the name argument of load_dataset(). I also shuffle them for good measure (in case they contained subclusters in order).
(3): I use len() in each subset, and divide by the total to get the ratio
(4): Similarly to the paper, I use gpt-4.1-mini and 100 samples from every cluster to extract the main topics
| cluster_id | topics | data_files | documents | ratio |
|---|---|---|---|---|
| 1 | Mathematics, Statistics, Education, Online Tutoring | part_0[:4785103] | 4785103 | 0.86% |
| 2 | History, Mathematics, Literature, Religion | part_0[4785103:]-part_2[:403389] | 6684586 | 1.21% |
| 3 | Medieval History, Music History, Art and Culture | part_2[403389:]-part_3[:2873338] | 8003099 | 1.45% |
| 4 | Education, Wellbeing, Digital Learning, STEM | part_3[2873338:]-part_7[:2089718] | 21348980 | 3.86% |
| 5 | Career, Education, Finance, Technology | part_7[2089718:]-part_9[:1474346] | 10450928 | 1.89% |
| 6 | Aluminum, Physics, Biology, AI & Robotics | part_9[1474346:]-part_27[:246169] | 98368523 | 17.78% |
| 7 | Conservation, Wildlife, Plants, Pets | part_27[246169:]-part_43[:4277092] | 92561323 | 16.73% |
| 8 | Gaming, Gambling | part_43[4277092:]-part_44[:5199449] | 6455507 | 1.17% |
| 9 | Astronomy, Space, Astrophysics | part_44[5199449:]-part_45[:4159835] | 4493536 | 0.81% |
| 10 | Leadership, Health, Education, Safety | part_45[4159835:]-part_53[:498214] | 40603579 | 7.34% |
| 11 | Programming, WebDesign | part_53[498214:]-part_54[:3595699] | 8630635 | 1.56% |
| 12 | Photography, Technical, Food, Crafts | part_54[3595699:]-part_80[:1844897] | 142111098 | 25.68% |
| 13 | Sports | part_80[:]-part_81[:1315811] | 5004064 | 0.90% |
| 14 | Music, Composition, Performance | part_81[1315811:]-part_81[:2846807] | 1530996 | 0.28% |
| 15 | Fantasy, Animation, Fiction | part_81[2846807:]-part_81[:4143190] | 1296383 | 0.23% |
| 16 | Environment, Energy, Sustainability | part_81[4143190:]-part_89[:175268] | 40297278 | 7.28% |
| 17 | Health, Nutrition, Disease, Medicine | part_89[175268:]-part_96[:297677] | 38854459 | 7.02% |
| 18 | Performance, Security, Networking, Privacy | part_96[297677:]-part_98[:1817752] | 12586375 | 2.27% |
| 19 | Computers, Relationships, Social Issues, Culture | part_98[1817752:]-part_99[:2721890] | 6437288 | 1.16% |
| 20 | Women’s History, Immigration, Politics, Public Health | part_99[2721890:] | 2811316 | 0.51% |
| Total | part_0-part_99 | 553315056 |
Usage
import datasets
dataset = datasets.load_dataset("gvlassis/ClimbMix", "cluster_id=1", split="train")