Research

πŸ“š Training Datasets

logo

size

What is The Sum of All Knowledge?

⭐ Is there enough time to count up all the stars?
πŸ“š Is there enough time to read the sum of all knowledge?

πŸ–₯️ In servers humming through the endless night,
🌐 Where 14 TB of human thought reside,
πŸ“– C4's multilingual web holds digital light,
πŸ“Š While Anna's Archive spans 170 GB wide.

πŸ’Ύ The Pile sits heavy at 825 GB,
🧬 Its gigabytes of wisdom, code, and art,
πŸ’» From PubMed's 194 GB alive
πŸ”’ To GitHub's 102 GB, each plays its part.

πŸ“‘ We measure meaning now in bytes and bits,
🧠 Wikipedia's 24 GB, a modest sum,
βš–οΈ While massive datasets store what knowledge permitsβ€”
πŸ‘οΈ The fragments of all that we've become.

πŸ”¬ From ArXiv's 121 GB academic dreams
πŸ“š To OpenWebText's 135 GB refined,
πŸ€– Each dataset streams through digital streams,
❓ The quantified collective human mind.

⏰ The paradox grows clear with every byte:
🌌 The more we store, the more we comprehend
🎨 How much remains beyond our finite sight,
❀️ How questions birth new questions without end.

πŸ’Ώ So we collect in terabytes our past,
πŸšͺ Code algorithms, digitize our dreamsβ€”
πŸ” Though time may not allow us to amass
✨ The sum of all knowledge, or so it seems.

🌟 What drives us is infinite curiosity:
πŸ—οΈ Being is becoming, dream is destiny, 
πŸ’– The boundless library of the imagination,
🌈 Where every ending opens up a new start.

Data is the most valuable asset in LLM development. When building a dataset, we target the three following characteristics:

  • Accuracy: Samples should be factually correct and relevant to their corresponding instructions. This can involve using solvers for math and unit tests for code.
  • Diversity: You want to cover as many use cases as possible to make sure you're never out of distribution. High diversity is essential as it leads to better generalization.
  • Complexity: Answers should be both detailed (to maximize helpfulness) and include system 2 techniques like chain of thought (to force step-by-step reasoning).

Measuring accuracy is easy in most cases but near-impossible with open-ended, subjective questions. On the other hand, clustering datasets by topic is a good way of evaluating data mixture diversity. Finally, complexity can be assessed using other LLMs acting like judges.

Text Datasets for Language Model Training

DatasetSizeFiles/ContentCoverageDownload LinksNotes
Anna's Archive Main Collection170 GB20,795,155 files99.541% mirroredMain Site β€’ Datasets/Torrents β€’ Mirror .se β€’ Mirror .liBooks, papers, magazines, metadata from LibGen, Sci-Hub, Z-Library
C4 Multilingual14.0 TB101 languagesWeb crawlHugging Face β€’ Git Clone β€’ DocumentationLargest multilingual web corpus
C4 English (No Clean)2.3 TBRaw EnglishWeb crawlHugging Face β€’ Git CloneUnfiltered English web content
C4 English (No Blocklist)380 GBFiltered EnglishWeb crawlHugging Face β€’ Git CloneFiltered but no blocklist applied
C4 English (Clean)305 GBClean EnglishWeb crawlHugging Face β€’ Git CloneFully filtered and cleaned
The Pile825.18 GB22 componentsMulti-domainPile Uncopyrighted β€’ Academic Torrents β€’ HF StreamingEleutherAI
OpenWebText2194 GBReddit-curatedWeb articlesOfficial Docs β€’ GitHub β€’ Hugging FaceHigh-quality web articles
Wikipedia English24 GBCurrent pagesEncyclopediaWikimedia Dumps β€’ Latest Articles β€’ HF LegacyReference knowledge base

πŸ“… Open SFT datasets

Once a model has been pre-trained on a next-token prediction task, Supervised Fine-Tuning (SFT) is used to turn it into an assistant capable of answering questions and following instructions. These datasets contain pairs of instructions and outputs to train LLMs to understand conversational structure. Unless otherwise noted, all datasets listed here are under permissive licenses (Apache 2.0, MIT, CC-BY-4.0, etc.).

General-purpose mixtures

General-purpose datasets offer balanced mixtures of different types of data, including chat, code, and math. These datasets can be used to create general-purpose models that can handle various types of queries.

Dataset#AuthorsDateNotes
Infinity-Instruct7.45MBAAIAug 2024High-quality evolved samples based on a collection of open-source datasets.
WebInstructSub2.39MYue et al.May 2024Instructions created by retrieving document from Common Crawl, extracting QA pairs, and refining them. See the MAmmoTH2 paper and full set (13.5M samples).
The-Tome1.75MArcee AIJul 2024Reranked and filtered collection of datasets with a focus on instruction following. See my 100k subset.
open-perfectblend1.42MXu et al., LabonneOct 2024Open reproduction of the dataset described in this paper. It's a solid general-purpose instruction dataset with chat, math, code, and instruction-following data.
smoltalk1.1MHugging FaceNov 2024Mix of existing and new datasets used to train SmolLM2 with proper evaluations.
orca-agentinstruct-1M-v11.05MMicrosoftNov 2024Subset of the AgentInstruct dataset (~25 samples) designed for Orca-3-Mistral, using raw text publicly available on the web as seed data.
tulu3-sft-mixture939kAI2Nov 2024(CC-BY-NC-4.0) SFT mixture used to train the Tulu 3. It uses public datasets and new synthetic versions, including persona-based answers for diversity.
Open-Platypus24.9kLee et al.Sep 2023Collection of datasets that were deduplicated using Sentence Transformers (it contains an NC dataset). See Platypus paper.

Math

LLMs often struggle with mathematical reasoning and formal logic, which has led to the creation of specialized datasets. These datasets can include systematic thinking and step-by-step reasoning.

Dataset#AuthorsDateNotes
OpenMathInstruct-214MNvidiaSep 2024Augmented samples from GSM8K and MATH (training set) using Llama-3.1-405B-Instruct.
NuminaMath-CoT859kJia Li et al.July 2024Data used to win the first progress prize of the AI Math Olympiad. See the tool-integrated reasoning version here.
MetaMathQA395kYu et al.Dec 2023Bootstrap mathematical questions by rewriting them from multiple perspectives. See MetaMath paper.
MathInstruct262kYue et al.Sep 2023Compiled from 13 math rationale datasets, six of which are newly curated, and focuses on chain-of-thought and program-of-thought.
Orca-Math200kMitra et al.Feb 2024Grade school math world problems generated using GPT4-Turbo. See Orca-Math paper.

Code

Code is another challenging domain for LLMs. Code datasets, containing diverse programming language examples, are used to fine-tune LLMs and enhance their ability to understand, generate, and analyze code.

Dataset#AuthorsDateNotes
opc-sft-stage2436kHuang et al.Nov 2024Dataset used in OpenCoder's Stage 2, based on four seed datasets. See OpenCoder paper.
CodeFeedback-Filtered-Instruction157kZheng et al.Feb 2024Filtered version of Magicoder-OSS-Instruct, ShareGPT (Python), Magicoder-Evol-Instruct, and Evol-Instruct-Code.
Tested-143k-Python-Alpaca143kVezoraMar 2024Collection of generated Python code that passed automatic tests to ensure high quality.
glaive-code-assistant136kGlaive.aiSep 2023Synthetic data of problems and solutions with ~60% Python samples. Also see the v2 version.
Magicoder-Evol-Instruct-110K110kWei et al.Nov 2023A decontaminated version of evol-codealpaca-v1. Decontamination is done in the same way as StarCoder (bigcode decontamination process). See Magicoder paper.
synthetic_tex_to_sql100kGretel.aiApr 2024Synthetic text-to-SQL samples (~23M tokens), covering diverse domains.
sql-create-context78.6kb-mc2Apr 2023Cleansed and augmented version of the WikiSQL and Spider datasets.
Code-Feedback66.4kZheng et al.Feb 2024Diverse Code Interpreter-like dataset with multi-turn dialogues and interleaved text and code responses. See OpenCodeInterpreter paper.
Open-Critic-GPT55.1kVezoraJul 2024Use a local model to create, introduce, and identify bugs in code across multiple programming languages.
self-oss-instruct-sc2-exec-filter-50k50.7kLozhkov et al.Apr 2024Created in three steps with seed functions from TheStack v1, self-instruction with StarCoder2, and self-validation. See the blog post.

Instruction following

Instruction following corresponds to the ability to properly follow constraints in the user prompt, such as "write only two paragraphs", "write your answer in French", etc. Strong instruction-following capabilities is a must-have for modern LLMs.

Dataset#AuthorsDateNotes
AutoIF-instruct-61k-with-funcs61.5kDiao et al.Oct 2024Samples generated with this code and gpt-4o-mini, based on Qwen's AutoIF library.
ifeval-like-data56.3kArgillaOct 2024Only use the "filtered" subset. Samples generated by Qwen2.5-72B and verified with lm-evaluation-harness.
tulu-3-sft-personas-instruction-following30kAI2Nov 2024Synthetic samples created with personas, following the methodology introduced by Ge et al., 2024.

Multilingual

Learning new languages "from scratch" is a pre-training task, but providing multilingual instruction samples is useful to boost performance in the languages of interest.

Dataset#AuthorsDateNotes
aya dataset204kSingh et al.Feb 2024Multilingual instruction fine-tuning dataset curated by an open-science community via Aya Annotation Platform.
M2Lingual175KServiceNow AIJune 2024Dataset spanning 70+ langauges and 20 NLP tasks generated from GPT-4 using task-based taxonomy guided evolutions. More details in M2Lingual paper.

Agent & Function calling

Function calling allows large language models (LLMs) to execute predefined functions with parameters inferred from user prompts, rather than generating standard text responses. This enables LLMs to seamlessly integrate with external systems, perform complex operations, and provide more accurate and contextually relevant responses.

Dataset#AuthorsDateNotes
glaive-function-calling-v2113kSahil ChaudharySep 2023High-quality dataset with pairs of instructions and answers in different languages. See Locutusque/function-calling-chatml for a variant without conversation tags.
xlam-function-calling-60k60kSalesforceJun 2024Samples created using a data generation pipeline designed to produce verifiable data for function-calling applications
Agent-FLAN34.4kinternlmMar 2024Mix of AgentInstruct, ToolBench, and ShareGPT datasets.
hermes-function-calling-v111.6kNousAug 2024Compilation of structured output and function calling data used in the Hermes 2 Pro series of models.
ToolACE11.3kLiu et al.Aug 2024Agentic pipeline self-evolution synthesis process to curate a comprehensive API pool

Real conversations

Real-world conversations provide valuable insights into how people naturally interact with LLMs, helping us identify the most important use cases and understand typical usage patterns.

Dataset#AuthorsDateNotes
WildChat-1M1.04MZhao et al.May 2023Real conversations between human users and GPT-3.5/4, including metadata. See the WildChat paper.
lmsys-chat-1m1MLMSYSSep 2023Real-world conversations with 25 LLMs, collected from 210K unique IP addresses on the Vicuna demo and Chatbot Arena website from April to August 2023.
oasst2135kKΓΆpf et al.Dec 2023Human-generated conversations trees with multiple replies. See OASST1 paper.
ShareGPT52K90kShareGPTApr 2023Conversations scraped via the ShareGPT API before it was shut down. They include both user prompts and responses from GPT-3.5.
oasst184.4kKΓΆpf et al.Mar 2023Human-generated assistant-style conversation corpus in 35 different languages. See OASST1 paper.

βš–οΈ Preference alignment

Unlike instruction data, preference datasets consist of chosen and rejected answers. Preference alignment is used to align LLM's answers with human preferences to adopt the desired style and values.

Dataset#AuthorsDateNotes
Skywork-Reward-Preference-80K-v0.277kSkywork2024Preference pairs compiled from public sources like HelpSteer2, OffsetBias, WildGuard, and Magpie.
ultrafeedback-binarized-preferences-cleaned61.1kArgilla2023Decontaminated version of the UltraChat dataset, scored by GPT-4 and binarized into "chosen" and "rejected" answers based on these scores.
Infinity-Preference59kBAAISep 2024Adjusts preference attribute weights per task using Infinity-Instruct's labeling system. Each instruction is accompanied by a preference pair sampled from Gemma-2-9B-IT.
Code-Preference-Pairs53kVezoraJul 2024Pairs of code examples, where the chosen sample is correct and the rejected one contains a bug.
orpo-dpo-mix-40k44kArgilla, LabonneMay 2024Combination of the following high-quality DPO datasets, mostly from Argilla.
chatbot_arena_conversations33kLMSYSJul 2023Cleaned real conversations with pairwise human preferences collected on the Chatbot Arena from April to June 2023
tulu-3-pref-personas-instruction-following19.9kAI2Nov 2024Instruction following data in the form of chosen and rejected answers to teach the model to follow precise constraints.
Human-Like-DPO-Dataset10.9kWeyaxiMay 2024Teach to output more human-like answers instead of the formal slop LLMS usually output.

Image Datasets for Visual Model Training

DatasetSize & ClassesMain Use CasesKey Features
ImageNet14M+ images, 21K+ categoriesClassification, detectionHierarchical structure, ILSVRC benchmark
COCO328K images, 80 object classesDetection, segmentation, captioningContext-rich scenes, multi-object annotations
Open Images9M images, 20K+ classesDetection, segmentation, relationshipsLarge scale, diverse, rich annotations
Pascal VOC20K+ images, 20 classesDetection, segmentationEarly benchmark, varied scenes
CIFAR-10/10060K images, 10/100 classesClassificationSmall images (32x32), lightweight benchmarking
Places2.5M images, 205 scene categoriesScene recognitionScene-centric, diverse environments
Visual Genome108K imagesVQA, scene graphsDense annotations, object relationships
Cityscapes5K images, 30 classesUrban scene segmentationHigh-resolution, pixel-level masks

The Pile Component Breakdown (825.18 GB Total)

stats

Largest Components (>100 GB)

ComponentSizeContent TypeDomainTraining WeightDownload Links
Pile-CC243.87 GBWeb-crawled Common Crawl subsetWeb content1.0xThe Eye β€’ Academic Torrents
PubMed Central193.86 GBBiomedical research papersScientific2.0xThe Eye PMC β€’ Academic Torrents
Books3162.61 GBBook collectionLiterature1.0x⚠️ Not available separately (copyright) β€’ Academic Torrents
OpenWebText2134.80 GBReddit-linked articlesWeb content1.0xOfficial Docs β€’ GitHub β€’ Hugging Face
ArXiv120.71 GBAcademic preprintsScientific2.0xThe Eye β€’ Academic Torrents
GitHub102.18 GBCode repositoriesProgramming1.0xThe Eye GitHub β€’ Academic Torrents

Medium Components (50-100 GB)

ComponentSizeContent TypeDomainTraining WeightDownload Links
FreeLaw82.39 GBLegal documentsLegal1.0xThe Eye β€’ Academic Torrents
StackExchange69.14 GBQ&A discussionsTechnical1.0xThe Eye β€’ Academic Torrents

Smaller Components (10-50 GB)

ComponentSizeContent TypeDomainTraining WeightDownload Links
USPTO47.50 GBPatent documentsLegal/Technical1.0x[The Eye USPTO](