From raw data to a training sample

From raw data to a training sample A data-flow diagram generated by Archify. 01 / Raw sources 02 / Cleaning 03 / Selection 04 / Numericalize 05 / Into the model Raw data sources · web · books · code · papers · 01 / Raw sources · not training data yet Raw data sources web · books · code · papers not training data yet What comes along · boilerplate · spam · PII · 01 / Raw sources What comes along boilerplate · spam · PII Extract + normalize · HTML → text · Unicode · lang ID · 02 / Cleaning Extract + normalize HTML → text · Unicode · lang ID Quality filtering · heuristic + classifier · 02 / Cleaning · the threshold is a choice Quality filtering heuristic + classifier the threshold is a choice Deduplication · exact · near · repeated spans · 03 / Selection · shifts the distribution Deduplication exact · near · repeated spans shifts the distribution Benchmark decontamination · checked against eval sets · 03 / Selection Benchmark decontamination checked against eval sets Domain mixing · a weight per source · 04 / Numericalize · hyperparameter Domain mixing a weight per source hyperparameter Tokenizer + doc boundaries · text → IDs, insert EOS · 04 / Numericalize Tokenizer + doc boundaries text → IDs, insert EOS Training sample · input_ids · labels · mask · 05 / Into the model · the unit of loss Training sample input_ids · labels · mask the unit of loss raw document normalized text curated corpus fixed-length sequences must be removed first how much to keep drop test-set overlap cut by sequence length Legend primary data data store data flow