FLUX: Data Worth Training On
Abstract
Modern large language model training is no longer limited by data availability, but by the inability of existing preprocessing pipelines to simultaneously achieve massive scale and high data quality. Current approaches are forced to sacrifice one for the other: either aggressively filtering to improve quality at the cost of severe token loss, or retaining large volumes of data while introducing substantial noise. In this work, we introduce FLUX, a preprocessing pipeline specifically designed to break this long-standing trade-off by maximizing token retention while enforcing rigorous quality control. Models trained on FLUX-curated data consistently outperform prior methods. A 3B-parameter model trained on 60B tokens with FLUX achieves 32.14% MMLU accuracy, surpassing the previous state-of-the-art pipeline DCLM (31.98%) and significantly outperforming FineWeb (29.88%). FLUX achieves the same aggregate score as a model trained on DCLM data using only 39B tokens, resulting in a 34.4% reduction in training compute. At the data level, FLUX extracts 50B usable tokens from a single dump (CC-MAIN-2025-51), compared to 40B from DCLM (+25% retention). FLUX-Base yields 192B tokens, exceeding FineWeb's 170B while still maintaining superior quality. Overall, FLUX establishes a new state of the art in web-scale data preprocessing by demonstrating that high retention, strong quality control, and computational efficiency can be achieved simultaneously, redefining the limits of scalable dataset construction for modern language models.
Figures & tables
| Pipeline | Input | Wall-clock | CPU-hrs | CPU-hrs/TB | Vs. FLUX |
| DCLM | 1.20 TB | 11 hr 7 min | 355.7 | 296.4 | 6.26x |
| FineWeb | 0.60 TB | 5 hr 39 min | 181 | 301.3 | 6.36x |
| FLUX | 1.03 TB | 1 hr 31 min | 48.5 | 47.3 | 1.00x |
| Component | Classification time (in mins) |
| FastText (Single-bin) | 30 |
| FastText (Dual-bin) | 60 |
| BERT (110M) | 1290 |
| Parser | Total Tokens (Multilingual) | Total Tokens (English) | Aggregate | Compute Cost (hrs) |
| Resiliparse | 279.4B | 54.6B | 0.4089 | 6.63 |
| Apex | 279.5B | 54.0B | 0.4123 | 4.31 |
| Trafilatura | 136.7B | 35.5B | 0.4330 | 47.33 |
| Pipeline | Post-Dedup Tokens | Aggregate (530M) |
| FineWeb | 24.50B | 44.31 |
| DCLM | 24.81B | 44.40 |
| FLUX | 27.22B | 45.45 |
| Pipeline | Tokens Retained |
| DCLM | 40B |
| FLUX | 50B |
| Benchmark | Unique Contaminated Documents | Contaminated Evaluation Instances |
| MMLU | 117 | 322 |
| HellaSwag | 73 | 82 |
| ARC-Challenge | 23 | 29 |
| ARC-Easy | 21 | 37 |
| CSQA | 9 | 34 |
| PIQA | 7 | 8 |
| Pipeline | MMLU | ARC-Easy | ARC-Challenge | CSQA | HellaSwag | OpenBookQA | PIQA | SocialIQA | WinoGrande | Aggregate |
| FineWeb | 0.298 | 0.602 | 0.337 | 0.548 | 0.515 | 0.400 | 0.706 | 0.471 | 0.518 | 0.4883 |
| DCLM | 0.319 | 0.673 | 0.343 | 0.548 | 0.524 | 0.454 | 0.703 | 0.467 | 0.513 | 0.5048 |
| FLUX | 0.321 | 0.666 | 0.372 | 0.570 | 0.541 | 0.450 | 0.722 | 0.489 | 0.542 | 0.5192 |
| Pipeline | MMLU | ARC-Easy | ARC-Challenge | CSQA | HellaSwag | OpenBookQA | PIQA | SocialIQA | WinoGrande | Aggregate |
| FineWeb | ||||||||||
| FLUX-Base |
Appendix figures & tables30 assets
Supplementary material from the paper’s appendix.
Appendix
| Scale | Layers (L) | Heads (H) | Peak LR | Weight decay | Final LR frac ( ) | Global batch | ||
| 530M | 16 | 16 | 1,344 | 84 | 0.1 | 0.1 | 448 | |
| 1B | 16 | 16 | 2,048 | 128 | 0.1 | 0.1 | 768 | |
| 3B | 24 | 16 | 2,752 | 172 | 0.1 | 0.05 | 960 |
| Parser | Multilingual (B tokens) | English (B tokens) |
| Parser V1 | 391.3 | 50.7 |
| Parser V2 | 327.4 | 49.6 |
| Parser V3 | 153.4 | 41.0 |
| Apex | 504.5 | 57.9 |
| Component | Parser V1 | Parser V2 | Parser V3 | Apex |
| WARC Reader | Custom streaming | Custom streaming | FastWARC (C) | FastWARC (C) |
| HTML Parser | Selectolax/Lexbor | Selectolax/Lexbor | Resiliparse | Resiliparse |
| Extraction Strategy | Container-first | Container-first | Element-wise traversal | Statistical main-content |
| Encoding Detection | Multi-stage heuristic | Multi-stage heuristic | Statistical inference | C-level detection |
| # | Component | Functional Group | Type |
| 1 | Document Parsing | URL & Normalization | Structural preprocessor |
| 2 | UT1 Domain Blocklist | URL & Normalization | Document filter |
| 3 | URL Strict Substring | URL & Normalization | Document filter |
| 4 | URL Hard Substring | URL & Normalization | Document filter |
| 5 | URL Soft Substring | URL & Normalization | Document filter |
| 6 | URL Token Removal & Newline Norm. | URL & Normalization | Content modifier (no rejection) |
| Filter (Stage) | Docs Removed | Tokens Removed | % Total Tokens |
| UT1 Domain Blocklist (2) | 12,057 | 16,752,457 | 0.26% |
| URL Strict Substring (3) | 343 | 514,779 | 0.01% |
| URL Hard Substring (4) | 2,545 | 3,723,647 | 0.06% |
| URL Soft Substring (5) | 396 | 619,897 | 0.01% |
| URL Token Removal (6) | — | 73,019,753 | 1.13% |
| Criterion | Min Threshold | Max Threshold |
| Document word count | 50 | 100,000 |
| Mean word length (chars) | 3.0 | 10.0 |
| Symbol-to-word ratio | — | 0.10 |
| Bullet-line ratio | — | 0.90 |
| Ellipsis-line ratio | — | 0.30 |
| Alphabetic word ratio | 0.80 | — |
| Criterion | Max Threshold |
| Non-alphanumeric character ratio | 0.25 |
| Numeric character ratio | 0.15 |
| URL character ratio | 0.20 |
| Whitespace character ratio | 0.25 |
| Parenthesis character ratio | 0.10 |
| Metric | Granularity | Max Threshold |
| Duplicate line fraction | Line | 0.30 |
| Duplicate line character fraction | Line | 0.20 |
| Duplicate paragraph fraction | Paragraph | 0.30 |
| Duplicate paragraph character fraction | Paragraph | 0.20 |
| Top 2-gram character fraction | Word n-gram | 0.20 |
| Top 3-gram character fraction | Word n-gram | 0.18 |
| Criterion | Bound | Threshold |
| Minimum token count | Min | 50 |
| Stop-word ratio | Min | 0.20 |
| Unclosed bracket ratio | Max | 0.05 |
| Heuristic | Removal Criterion |
| Minimum word count | Line contains fewer than 2 whitespace-delimited words |
| Maximum uppercase ratio | Uppercase characters exceed 50% of total line characters |
| Maximum numeric ratio | Numeric characters exceed 99.9999% of total line characters |
| Social engagement counters | Pattern: [0-9]+(K|M|B)? with likes, shares, comments, retweets, reposts, quotes, bookmarks, upvotes, downvotes, downloads, views, followers |
| Substring modifiers | Line words and matches boilerplate markers such as “items in cart”, “Read more…”, “Sign-in” |
| JS/CSS artifacts | Line-start code patterns (e.g., function( , var , let , const , $. , @media , => ) |
| Filter Stage | Type | Docs Removed | Tokens Removed | % Total |
| Initial Input | — | — | 424,893,496,759 | 100.00% |
| UT1 Domain Blocklist (2) | Filter | 12,057 | 16,752,457 | 0.26% |
| URL Strict Substring (3) | Filter | 343 | 514,779 | 0.01% |
| URL Hard Substring (4) | Filter | 2,545 | 3,723,647 | 0.06% |
| URL Soft Substring (5) | Filter | 396 | 619,897 | 0.01% |
| URL Token Removal (6) | Modifier | — | 73,019,753 | 1.13% |
| Filter Component | URL+LID | DocFilter | LineClean | FLUX |
| URL Blocklist | Y | Y | Y | Y |
| URL Substring Filtering | Y | Y | Y | Y |
| URL Token Removal | Y | Y | Y | Y |
| Newline Normalization | Y | Y | Y | Y |
| Language Identification | Y | Y | Y | Y |
| Gopher Repetition | — | Y | Y | Y |
| Configuration | Tokens | vs DCLM- RefinedWeb | vs FineWeb | Aggregate | vs DCLM- RefinedWeb | vs FineWeb |
| URL+LID | 42.39B | +70.9% | +73.0% | 41.76 | -2.64 pp | -2.55 pp |
| DocFilter | 23.39B | -5.7% | -4.5% | 44.24 | -0.16 pp | -0.07 pp |
| LineClean | 21.00B | -15.4% | -14.3% | 44.68 | +0.28 pp | +0.37 pp |
| FLUX-Base | 27.22B | +9.7% | +11.1% | 45.45 | +1.05 pp | +1.14 pp |
| FineWeb | 24.50B | — | — | 44.31 | — | — |
| DCLM-RefinedWeb | 24.81B | — | — | 44.40 | — | — |
| Document Composition | Whole-Doc Score | Weighted Score | Retention Decision |
| 800 B English ( ) + 200 B French ( ) | 0.88 | 0.78 | Both retain |
| 400 B English ( ) + 600 B French ( ) | 0.70 | 0.38 | Whole retains; Weighted rejects |
| LID Strategy | Documents Retained | Tokens Retained | Avg. Docs/JSONL | Avg. Tokens/JSONL |
| Whole-Document | 49.4M | 48.1B | 5,512 | 5,360,516 |
| Weighted Avg. Line | 47.0M | 45.0B | 5,239 | 5,088,583 |
| LID Strategy | Aggregate |
| Whole-Document LID | 0.4191 |
| Weighted Average Line LID | 0.4136 |
| Pipeline | Input | Wall-clock | CPU-hrs | CPU-hrs/TB | vs. FLUX |
| DCLM | 1.20 TB | 11 hr 7 min | 355.7 | 296.4 | 6.26 |
| FineWeb | 0.60 TB | 5 hr 39 min | 181.0 | 301.3 | 6.36 |
| FLUX | 1.03 TB | 1 hr 31 min | 48.5 | 47.3 | 1.00 |
| FP Rate | Expected n-grams | Retention (GB) | Time | Bin Size | Sparsity |
| 30B | 944 | 2 hr 15 min | 216 | 0.914 | |
| 50B | 944 | 1 hr 58 min | 362 | 0.771 | |
| 70B | 944 | 54 min | 234 | 0.716 | |
| 30B | 936 | 42 min | 50 | 0.911 | |
| 100B | 944 | 37 min | 179 | 0.516 | |
| 100B | 944 | 23 min | 56 | 0.578 |
| Retention % | MMLU | Aggregate | ||
| 0.2000 | 0.6350 | 26.43% | 0.2887 | 0.5028 |
| 0.025119 | 0.7600 | 26.88% | 0.2982 | 0.5065 |
| 0.0900 | 0.6350 | 29.25% | 0.2920 | 0.5022 |
| 0.018112 | 0.7347 | 31.10% | 0.2949 | 0.5025 |
| 0.018112 | 0.7000 | 33.32% | 0.2915 | 0.5012 |
| Pipeline | MMLU | ARC- Easy | ARC- Challenge | CSQA | Hella Swag | OpenBook QA | PIQA | Social IQA | Wino Grande | Aggregate |
| (1B scale; 20B tokens) | ||||||||||
| FineWeb | ||||||||||
| DCLM | ||||||||||
| FLUX | ||||||||||
| (530M scale; 10.6B tokens) | ||||||||||
| FineWeb | ||||||||||
Training Data Curation
Training data curation improves the quality, diversity, organization, and reliability of datasets used to train machine-learning models.
See all 155 papers