Paper notes

FineWeb: Extracting, Deduplicating and Filtering a 15T-Token Open Web Corpus, One Ablation at a Time

The FineWeb paper (Hugging Face, 2024) documents a 15T-token English web corpus: Trafilatura extraction, per-snapshot MinHash dedup, tuned filters, and FineWeb-Edu (1.3T) from a classifier trained on Llama-3-70B labels. We check the dedup math and flag where paper, table and code disagree.

Published Updated 38 min read

On this page
  1. Why this paper is worth reading
  2. Background: open weights are not open data
  3. Core idea: ablate data with small models
  4. Method: the FineWeb pipeline
  5. Text extraction and base filtering
  6. Deduplication: MinHash within each snapshot
  7. The C4 filters and the custom filters
  8. The final dataset and anonymization
  9. FineWeb-Edu: training a cheap classifier on LLM labels
  10. Experiments and conclusions
  11. Hands-on check: the S-curve, a MinHash simulation, sampling scale, the paper’s numbers and the quality filter
  12. The S-curve: the paper’s four probabilities reproduce, and the two setups cross near 75%
  13. Simulation: real MinHash agrees with the theory
  14. Sampling: why a 28B-token ablation cannot see deduplication
  15. The paper’s numbers: most can be checked, a few do not match
  16. The quality filter: paper text, Table 2 and the code disagree on thresholds
  17. Limitations and follow-ups
  18. What to take away from this paper
  19. Further reading
  20. FAQ

FineWeb (The FineWeb Datasets: Decanting the Web for the Finest Text Data at Scale, Hugging Face) is an English web pretraining corpus built from 96 Common Crawl snapshots, about 15T tokens under the GPT-2 tokenizer. The paper backs every design choice with an ablation: train the same 1.71B-parameter model on different versions of the data, then compare downstream scores. Its most useful contribution is not the dataset itself but a few findings that go against intuition: deduplicating each snapshot separately beats deduplicating all snapshots together; replacing C4’s “keep only lines that end in punctuation” rule (about 30% of tokens removed by that rule alone) with three rules tuned on statistics (about 22% removed in total) keeps more data and works better; and a small classifier trained on Llama-3-70B labels selects a 1.3T-token educational subset (FineWeb-Edu) that is clearly stronger on MMLU and ARC.

The paper appeared on arXiv on June 25, 2024. This post follows v2 (October 31, 2024, NeurIPS 2024 Datasets and Benchmarks Track). We recompute every number that can be recomputed, check the deduplication probability curve with a simulation over 6,000 synthetic document pairs, and note several places where the paper’s text, its Table 2 and the datatrove code disagree on thresholds; those are collected in the hands-on section. External information (Hugging Face metadata, datatrove source and commit history) was checked in November 2026.

Why this paper is worth reading

  • It turns a pretraining data recipe into reproducible ablations. Plenty of models release weights, but the corpora behind Llama 3 and Mixtral are not public. FineWeb pairs every choice with a controlled comparison and releases the code, the data and more than 70 ablation models.
  • Its findings contradict intuition. More aggressive deduplication hurt, and a strict filter (C4’s terminal-punctuation rule) removed too much. “Cleaner is better” does not hold in data engineering; only experiments can tell.
  • It publishes numbers for the “LLM labels plus a small classifier” route. The paper says the non-public corpora of Llama 3 and Phi-3 used the same idea, but its large-scale effect on web filtering had not been studied in public. FineWeb-Edu gives the annotation budget, the classifier architecture, the threshold and the effect.
  • It rewards hands-on checking. The MinHash probability curve, the sampling effects and the filter thresholds can all be verified in a few dozen lines of code, and doing so exposes a few small inconsistencies in the paper itself.

Background: open weights are not open data

The paper starts from an observation: many “open” models release only weights, with little or no documentation of the corpus, while how web data is extracted, filtered and deduplicated has a large effect on model quality. Section 2 reviews prior work; four of the datasets are summarized below.

DatasetExtraction and language IDFilteringDedup
C4langdetectHeuristic rules (terminal punctuation, short lines, bad-word list, etc.)Three-line window
The Pile (Pile-CC)jusText, pycld2Classifier for similarity to WebTextMinHash
RefinedWebTrafilatura, fastTextRules inspired by MassiveTextMinHash plus ExactSubstr
Dolma (Common Crawl part)fastTextMassiveText and C4 rules, toxicity filterURL-, document- and paragraph-level Bloom filter

The sizes the paper gives for these datasets are: C4 172B tokens, RefinedWeb 500B, the Common Crawl part of Dolma 1.6 3T, SlimPajama 627B, and the deduplicated RedPajama-V2 20T. Common Crawl has been crawling since 2007 and had produced 100 snapshots at the time of writing; FineWeb uses 96 of them.

Core idea: ablate data with small models

FineWeb’s methodology fits in one sentence: for every pipeline choice, train two identical small models that differ only in the data, and compare downstream scores. The setup:

ItemSetting
ModelLlama architecture, 1.71B parameters, sequence length 2,048, global batch about 2M tokens, GPT-2 tokenizer
Data budget28B tokens for filtering ablations; 350B tokens for deduplication and cumulative runs
RepeatsTwo models per data version (different random data subsets and different initialization seeds), scores averaged
EvaluationCommonSenseQA, HellaSwag, OpenBookQA, PIQA, SIQA, WinoGrande, ARC, MMLU; large benchmarks truncated to 1,000 samples; lighteval
ScaleMore than 70 models, about 80,000 H100 hours

The benchmarks were not picked casually. The paper requires three properties: low variance between models trained on different random samples of the same data, near-monotonic improvement during training, and scores above the random baseline for a model of this size (otherwise the signal is too weak). 28B tokens is roughly the Chinchilla-optimal budget for this model (about 16 tokens per parameter; see the check below), so the filtering ablations are close to compute-optimal training runs; 350B is 204 tokens per parameter, far beyond compute-optimal, and is used to study deduplication and cumulative gains.

Method: the FineWeb pipeline

The whole pipeline and the token count after each step are shown below.

The FineWeb pipeline and the token count after each step Top: the five-step FineWeb pipeline: text extraction and base filtering (Trafilatura, a URL blocklist, a fastText English classifier, MassiveText rules), MinHash deduplication within each snapshot, the C4 filters (without the terminal-punctuation rule), three custom filters, and finally anonymization of emails and public IPs. Middle: FineWeb-Edu, where Llama-3-70B-Instruct annotates 460,000 pages, a frozen embedding model with a linear head is the classifier, and the threshold is 3. Bottom: the token count at each stage: about 36T after base filtering, 20T after per-snapshot deduplication, 15T for the final FineWeb, 1.3T for FineWeb-Edu, and only 4T for the abandoned global deduplication. The FineWeb pipeline (every step was ablated) 1 Extract + base filter WARC + Trafilatura URL blocklist fastText English ≥ 0.65 MassiveText rules 2 Per-snapshot MinHash 5-grams, 112 hashes = 14 buckets × 8 hashes dedup each snapshot alone global dedup was worse 3 C4 filters keep curly bracket, word length, policy rules; drop the terminal-punct rule 4 Custom filters line-end punctuation duplicate-line chars short-line share together: ~22% cut 5 Anonymize emails and public IPs replaced by regexes result: FineWeb, 15T tokens, 96 snapshots FineWeb-Edu: train a cheap classifier on an LLM's annotations Llama-3-70B-Instruct scores 460,000 pages 0–5 additive rubric aimed at primary to middle school level Classifier frozen Snowflake-arctic-embed-m + linear head: 410K train, 50K val output rounded to 0–5 Threshold ≥ 3 validation F1 82%, keeps 1.3T tokens (8.7% of FineWeb) MMLU 33% → 37%, ARC 46% → 57% Tokens (as reported, GPT-2 tokenizer) After base filtering 36T After per-snapshot dedup 20T (−44%) Final FineWeb 15T (another −25%) FineWeb-Edu 1.3T (8.7% of FineWeb) Global dedup (abandoned) 4T (−89%)
Figure: the FineWeb pipeline (top), the FineWeb-Edu classifier (middle) and token counts per stage (bottom, as reported in the paper, GPT-2 tokenizer). Percentages in parentheses are removal fractions computed from the paper's numbers: the dedup bar is relative to the 36T after base filtering, the final FineWeb bar relative to 20T, the global-dedup bar relative to 36T. FineWeb-Edu's MMLU and ARC are for a 1.71B model trained on 350B tokens.

Text extraction and base filtering

Common Crawl provides two formats: WARC files hold the raw crawl (full HTML), and WET files hold text that has already been extracted. Many datasets use WET directly, but the paper found that WET still contains a lot of boilerplate and menu text; extracting the main text from WARC with Trafilatura gave a clearly better model (Figure 1; this comparison used only fastText English identification and no deduplication).

Base filtering reuses part of RefinedWeb’s setup: a URL blocklist removes adult content, a fastText language classifier keeps only pages with an English score of at least 0.65, and MassiveText’s quality and repetition rules are applied with the original thresholds. After these three steps the 96 snapshots hold about 36T tokens under the GPT-2 tokenizer, and the evaluation improves over no filtering (Figure 2).

Deduplication: MinHash within each snapshot

FineWeb uses MinHash for fuzzy deduplication. Each document is cut into 5-grams; 112 hash functions each keep a minimum, split into 14 buckets of 8 values; a pair is a duplicate if all 8 values in any bucket match. Duplicate pairs are clustered transitively and one random document is kept per cluster. The design target is “at least about 75% similar”, and the match probability is 1−(1−s8)141-(1-s^8)^{14}, which the hands-on section verifies by simulation.

The real finding is about the scope of deduplication. The authors first tried global deduplication: from the newest snapshot (2023-50) to the oldest, each snapshot was deduplicated against all the ones before it. The oldest snapshots lost as much as 90% of their data, and about 4T tokens remained. In 350B-token ablations this data was only slightly better than not deduplicating and far below RefinedWeb, contrary to expectations. To find out why, the authors ran a control on the oldest snapshot, 2013-48: one model trained on the roughly 31B tokens that survived global deduplication, another on the 171B tokens obtained by deduplicating, on their own, the roughly 460B tokens that global deduplication had removed. The kept part turned out worse, and a manual look showed that the kept pages had more ads, keyword stuffing and badly formatted text. Switching to per-snapshot deduplication gave 20T tokens and matched RefinedWeb (Figure 5).

The authors’ hypothesis is that most of the gain comes from removing huge duplicate clusters, with hundreds of thousands of copies, that appear in every snapshot, and that further deduplicating clusters with few copies (fewer than about 100, roughly the number of snapshots) can hurt; that tail is better handled by quality filtering. They also tried several lighter global methods on top of per-snapshot deduplication, and none was better:

VariantTokens leftResult
Base filtering, no dedupabout 36TBelow RefinedWeb
Global MinHashabout 4TSlightly better than no dedup, far below RefinedWeb
Per-snapshot MinHash20TMatches RefinedWeb
Add URL dedup5.6TWorse than per-snapshot
Add line dedup4.4TWorse than per-snapshot
Line dedup on lines of at least 10 words, dropping documents left with fewer than 3 sentences2.9TWorse than per-snapshot
Add three-line span dedup3.7TWorse than per-snapshot

Two very influential papers made different choices here: Llama 3’s document-level deduplication is global MinHash (see our Llama 3 post). The setups differ (Llama 3 also has URL-level and line-level dedup and reports no ablation for this choice), so the two cannot be compared directly; FineWeb’s conclusion holds only in its own setting of a 1.71B model and this evaluation suite.

The C4 filters and the custom filters

After base filtering and deduplication FineWeb matched RefinedWeb, but C4 was still stronger on HellaSwag, so the authors went back to C4’s filtering rules: drop lines that do not end in terminal punctuation, lines that mention javascript, lines with “terms of use” or cookie-policy statements, documents that are too short, and documents containing lorem ipsum or a curly bracket {. The per-rule ablations showed:

  • The “line must end in punctuation” rule gives the biggest boost on its own, but it removes about 30% of tokens. The curly-bracket and word-length rules give only small boosts, removing 2.8% and 4.3%; the lorem ipsum, javascript and policy rules each remove less than 0.5% and were not trained on individually.
  • Dropping the punctuation rule and keeping all the other rules (about 7% removed) performs better than the punctuation rule alone. FineWeb therefore applies all C4 filters except the terminal-punctuation one.

The authors then designed their own rules more systematically: on the 2013-48 snapshot, the per-snapshot-deduplicated version served as “high-quality” data and the globally deduplicated version as “low-quality” data; they computed more than 50 document-level and cross-document statistics, found the ones whose distributions differ most, and set thresholds in the ranges of the histograms where the low-quality data is clearly denser. This produced 16 candidate “metric plus threshold” filters, each ablated on the 2019-18 snapshot with several 28B-token runs; three were selected:

FilterRemove a document if (paper text)Tokens removedReference
Fraction of lines ending in punctuationat most 0.1210.14%C4’s terminal-punctuation rule removes about 30%
Fraction of characters in duplicated linesat least 0.112.47%MassiveText’s original threshold is 0.2
Fraction of short lines (under 30 characters)at least 0.673.73%

Together the three remove about 22% of tokens and raise the aggregate score of 28B ablations by about 1% (the paper’s wording, which does not say percentage points or relative), beating C4, which removes more. The thresholds in the table are the ones in the paper’s text; Table 2 and the code write two of them differently, as described in the hands-on section.

The final dataset and anonymization

Putting the decisions together gives the 15T-token FineWeb over 96 snapshots: Trafilatura extraction from WARC, base filtering, per-snapshot MinHash, the C4 filters, then the custom filters. Every step adds a relative improvement in the aggregate score (Figure 9). The released version also handles personal information by anonymizing email addresses and public IP addresses. The paper compares FineWeb with ten widely used open web datasets (350B tokens randomly sampled from each, with no snapshot upsampled): FineWeb performs strongly, and FineWeb-Edu has the best aggregate score.

FineWeb-Edu: training a cheap classifier on LLM labels

Inspired by Llama 3 and Phi-3 (for the latter’s idea, see Textbooks Are All You Need), which trained quality classifiers on synthetic annotations, the authors ran an educational-value filter over FineWeb in three steps:

  1. Annotate. Llama-3-70B-Instruct scored 460,000 randomly sampled pages from the CC-MAIN-2024-10 snapshot on a 0 to 5 scale. The prompt uses an additive scale: one point for each criterion met. The five criteria are, in order, some basic information relevant to education (ads allowed); touches on educational elements but does not align with teaching standards, mixed content or incoherent writing; appropriate for teaching and introduces key curriculum concepts; highly useful for teaching up to grade school or middle school, like a textbook chapter; outstanding educational value. The prompt also asks the model to focus on grade-school and middle-school knowledge, to keep it from favoring technical pages such as arXiv abstracts. The paper says the additive scale worked better than a single rating.
  2. Distill. A linear regression head on frozen Snowflake-arctic-embed-m embeddings was trained on 410,000 annotations and validated on the other 50,000, for 20 epochs at learning rate 3e-4; the checkpoint with the best validation F1 was kept, and the output is rounded to 0 to 5.
  3. Filter. The classifier scored all of FineWeb and pages with a score of at least 3 were kept. In the 28B-token ablations, threshold 3 gave the best trade-off between knowledge and reasoning benchmarks and others such as HellaSwag (Figure 17); the validation F1 is 82%. Classifying the 15T tokens took 6,000 H100 hours and kept 1.3T tokens.

The effect is in the results section. The classifier is cheap because the large model only reads 460,000 pages and a linear head does the rest: counting forward FLOPs per token, Llama-3-70B costs 644 times as much as the classifier (see the hands-on section).

Experiments and conclusions

The paper’s claims, their evidence and what to watch for:

ClaimEvidenceCaveat
Trafilatura on WARC beats WETFigure 1, 28B-token ablationThe comparison used only language ID and no other filtering
Per-snapshot dedup beats global dedup350B-token ablations (Figures 3, 5) and the 2013-48 control (Figure 4)One model size and one benchmark suite; the mechanism is a hypothesis
Drop the terminal-punctuation rule, keep the other C4 rulesFigure 6, with HellaSwag as the main signalRests on a difference in a single benchmark
Three custom filters add about 1% and beat C428B-token ablations, 16 candidatesCandidates differ by tenths of a point and the paper reports no seed variance
FineWeb beats other open web datasets, FineWeb-Edu is best350B-token ablations (Figure 10), aggregate scoreFineWeb-Edu is about 2% above FineWeb and trades off on benchmarks like HellaSwag
FineWeb-Edu is much stronger on knowledge benchmarks1.71B model, 350B tokens: MMLU 33% to 37%, ARC 46% to 57%The benchmarks are knowledge-heavy; the topic mix of the data also changed

The FineWeb-Edu gain is large: MMLU improves by about 12% relative and ARC by about 24% (computed from 33% vs 37% and 46% vs 57%). Figure 11 says it reaches 33.6% on MMLU at 38B tokens, where the runner-up, Matrix, needs 300B tokens; the text calls this “almost 10x fewer tokens”, and the numbers on the figure give 7.9x. The classifier changes the topic distribution of the data: the paper embeds and clusters 50,000 samples each from FineWeb and FineWeb-Edu to find the 100 densest topics, and the educational filter clearly raises the share of “education, learning, teaching” and “history, culture, politics” and lowers “business, finance, law”, “entertainment, film, theater” and “places, travel, real estate”. On Paloma’s domains, compared with FineWeb-Edu, the FineWeb model has lower perplexity on broad web sources such as C4, Falcon and Dolma and on Twitter, Gab and Reddit, while FineWeb-Edu is better on sources with Wikipedia and academic content (WikiText-103, M2D2 Wikipedia and S2ORC, arXiv) and on programming content. The paper also includes a bias analysis: words that reflect majority norms, such as “man” and “christian”, are over-represented in FineWeb, religious terms show the most skewed associations with dating (for example “christian dating”, “jewish singles”), and FineWeb-Edu’s associations lean toward history and health.

Hands-on check: the S-curve, a MinHash simulation, sampling scale, the paper’s numbers and the quality filter

Most of FineWeb’s conclusions come from ablations that need trained models and cannot be reproduced on a laptop. A few parts of the pipeline can be checked directly, though: the dedup probabilities, the effect of sample size, the paper’s own numbers, and the thresholds of the quality filter. The script below does five things. (1) It recomputes the MinHash-plus-banding match probability (Appendix E.1 gives 56%, 77%, 92% and 98.8%) and compares it with RefinedWeb’s configuration. (2) It runs real MinHash: 6,000 pairs of documents with different 5-gram similarities, 112 hash functions in 14 buckets of 8, and compares the observed match rate with theory. (3) In the worst case of Appendix E.2 (100 snapshots that are exact copies of each other) it computes how duplicates are distributed in a random sample, to see why small ablations cannot show the effect of deduplication. (4) It recomputes every number of the paper that can be recomputed. (5) It rewrites datatrove’s FineWeb quality filter in a few dozen lines, runs it on web pages I made up, and compares a threshold of 0.01 with 0.1 for the duplicated-line character ratio.

Environment: CPU (Apple M2 Max), Python 3.14.3, numpy 2.4.2, scipy 1.18.1, no network access needed, about 8 seconds. Part 2 draws documents and hash seeds from two independent random generators (seeds 1 and 2), so the result is deterministic and should be identical on other machines. The hash functions are the splitmix64 mixing step with 112 different seeds, not the hash functions datatrove uses, but the banding structure (112 = 14 × 8) is the paper’s. The pages in part 5 are demo data I wrote, not real web pages. The ablation model’s structure comes from the config of HuggingFaceFW/ablation-model-fineweb-v1 on Hugging Face (hidden size 2,048, FFN size 8,192, 24 layers, vocabulary 50,272) and its safetensors parameter total. The source and commit history of datatrove’s FineWebQualityFilter and the metadata of datasets and models were checked in November 2026.

"""FineWeb: MinHash S-curve and simulation, duplicate sampling, numbers."""
import numpy as np
from scipy.stats import binom

# ---------- 1. MinHash + banding: chance two documents match ----------
K, B, R = 112, 14, 8  # hash functions = buckets x hashes per bucket


def p_match(s, b=B, r=R):
    """Chance that at least one bucket agrees fully, 5-gram Jaccard = s."""
    return 1 - (1 - s**r) ** b


def s_at(p, b=B, r=R):
    """Inverse: the similarity at which the match probability is p."""
    return (1 - (1 - p) ** (1 / b)) ** (1 / r)


print("== 1. S curve (paper: 56 / 77 / 92 / 98.8 % at s = .70 .75 .80 .85)")
for s in (0.5, 0.6, 0.7, 0.75, 0.8, 0.85, 0.9):
    print(f"s={s:.2f}  FineWeb 14x8 {p_match(s):6.1%}"
          f"  RefinedWeb 450x20 {p_match(s, 450, 20):6.1%}")
for name, b, r in (("FineWeb", 14, 8), ("RefinedWeb", 450, 20)):
    print(f"{name:10s} 10% at s={s_at(0.1, b, r):.3f}  "
          f"90% at s={s_at(0.9, b, r):.3f}  knee (1/b)^(1/r)="
          f"{(1 / b) ** (1 / r):.3f}")

# ---------- 2. Simulation: real MinHash, does the hit rate match ----------
V, L, NPAIR = 50_000, 400, 6000  # vocabulary, document length (words), pairs
docs_rng = np.random.default_rng(1)  # documents and edits
hash_rng = np.random.default_rng(2)  # hash seeds, independent of the above
zipf = 1 / np.arange(1, V + 1)
zipf /= zipf.sum()
SEEDS = hash_rng.integers(0, 2**63, size=K, dtype=np.uint64)
U = np.uint64


def mix(x):
    """splitmix64 mixing step; each seed is one member of the hash family."""
    with np.errstate(over="ignore"):
        x = x + U(0x9E3779B97F4A7C15)
        x = (x ^ (x >> U(30))) * U(0xBF58476D1CE4E5B9)
        x = (x ^ (x >> U(27))) * U(0x94D049BB133111EB)
        return x ^ (x >> U(31))


def shingles(words, n=5):
    """Set of 5-grams of a document, each folded into a 64-bit integer."""
    m = len(words) - n + 1
    h = np.zeros(m, dtype=np.uint64)
    with np.errstate(over="ignore"):
        for j in range(n):
            h = h * U(1000003) + words[j:m + j].astype(np.uint64) + U(1)
    return np.unique(h)


def signature(sh):
    """Minimum under each of the 112 hash functions: the signature."""
    return mix(sh[None, :] ^ SEEDS[:, None]).min(axis=1)


def make_pair(target):
    """Edit random words so the 5-gram Jaccard similarity is about target."""
    a = docs_rng.choice(V, size=L, p=zipf)
    keep = 2 * target / (1 + target)  # Jaccard = kept / (2 - kept)
    p = 1 - keep ** (1 / 5)  # each 5-gram covers 5 word positions
    b = a.copy()
    pos = docs_rng.choice(L, size=round(p * L), replace=False)
    b[pos] = docs_rng.choice(V, size=len(pos), p=zipf)
    return shingles(a), shingles(b)


sims, hits = [], []
for _ in range(NPAIR):
    sa, sb = make_pair(docs_rng.uniform(0.35, 1.0))
    inter = np.intersect1d(sa, sb).size
    sims.append(inter / (sa.size + sb.size - inter))  # exact Jaccard
    ga, gb = signature(sa).reshape(B, R), signature(sb).reshape(B, R)
    hits.append((ga == gb).all(axis=1).any())  # some bucket fully equal
sims, hits = np.array(sims), np.array(hits)
theory = p_match(sims)

print(f"\n== 2. simulation: {NPAIR} pairs, {L} words, 5-grams, {K} hashes")
print(" s range      n  theory  observed      z")
edges = np.linspace(0.35, 1.0, 14)
idx = np.digitize(sims, edges[1:-1])
chi2, dof = 0.0, 0
for i in range(13):
    m = idx == i
    th = theory[m]
    exp, obs, var = th.sum(), hits[m].sum(), (th * (1 - th)).sum()
    z = f"{(obs - exp) / var**0.5:6.2f}" if var >= 1 else "     -"
    if var >= 1:
        chi2, dof = chi2 + (obs - exp) ** 2 / var, dof + 1
    print(f"{edges[i]:.2f}-{edges[i + 1]:.2f} {m.sum():5d} {exp / m.sum():7.1%}"
          f" {obs / m.sum():8.1%} {z}")
print(f"all pairs: theory {theory.sum():.0f} hits, observed {hits.sum()}; "
      f"chi2 = {chi2:.1f} over {dof} bins")

# ---------- 3. Small ablations cannot see dedup: worst-case sampling ----
# Appendix E.2: 100 snapshots, exact copies, 20T tokens, then sample
print("\n== 3. share of sampled documents by number of copies in the sample")
k = np.arange(1, 101)
bins = [(1, 1), (2, 2), (3, 3), (4, 8), (9, 16)]
print("sample      f    " + "".join(f"{a}-{b}".rjust(7) for a, b in bins)
      + "   >=2")
for name, tok in (("1B", 1e9), ("10B", 1e10), ("100B", 1e11),
                  ("350B", 3.5e11), ("1T", 1e12), ("28B", 28e9)):
    f = tok / 20e12  # chance that each copy is drawn
    w = k * binom.pmf(k, 100, f) / (100 * f)  # sample share with k copies
    row = "".join(f"{w[(k >= a) & (k <= b)].sum():7.1%}" for a, b in bins)
    print(f"{name:>5s} {f:8.5f} {row} {w[k >= 2].sum():6.1%}")

# ---------- 4. Recompute what can be recomputed ----------
print("\n== 4. arithmetic on the paper's numbers")
d, ffn, nl, vocab = 2048, 8192, 24, 50272  # ablation model config on HF
layer = 4 * d * d + 3 * d * ffn + 2 * d  # attention, SwiGLU, two RMSNorms
total = vocab * d + nl * layer + d  # tied embeddings, counted once
print(f"ablation model: {total:,} params (HF safetensors: 1,713,670,144)")
batch = 4 * 4 * 64 * 2048  # micro-batch x accumulation x DP x sequence length
print(f"batch {batch:,} tokens; steps for 28B: {28e9 / batch:,.0f}, "
      f"350B: {350e9 / batch:,.0f}")
hours = {}  # H100 hours: peak 989 TFLOPs, MFU assumed at 50% and 30%
for tok in (28e9, 350e9):
    fl = 6 * total * tok  # 6ND
    hours[tok] = [fl / (989e12 * u) / 3600 for u in (0.5, 0.3)]
    print(f"{tok / 1e9:.0f}B tokens: {tok / total:.0f} tok/param, {fl:.2e} "
          f"FLOPs, {hours[tok][0]:,.0f}-{hours[tok][1]:,.0f} H100-hours")
big = hours[350e9]
print(f"80,000 H100-hours = {80000 / big[1]:.0f}-{80000 / big[0]:.0f} runs "
      f"of 350B tokens (paper: over 70 models)")

T = 1e12
print(f"\nper-snapshot dedup 36T -> 20T removes {1 - 20 / 36:.1%}; "
      f"global 36T -> 4T removes {1 - 4 / 36:.1%}")
print(f"C4 + custom filters: 20T -> 15T removes {1 - 15 / 20:.1%}; "
      f"FineWeb-Edu keeps {1.3 / 15:.1%} of FineWeb")
print(f"15T / 20 tokens per param = {15 * T / 20 / 1e9:.0f}B params "
      f"(paper: more than 500B)")
for name, pct, left in (("URL", 71.5, 5.6), ("line", 77.8, 4.4),
                        ("line+min words", 85.0, 2.9), ("3-line", 80.9, 3.7)):
    print(f"  {name:15s} 20T x (1 - {pct}%) = {20 * (1 - pct / 100):.2f}T; "
          f"paper {left}T -> base {left / (1 - pct / 100):.1f}T")
kept, removed = 31, 460  # 2013-48: kept / removed by global dedup, in B tokens
print(f"2013-48 kept share: {kept / (kept + removed):.1%} (paper text: 10%)")
print(f"per-snapshot dedup of the removed part keeps {171 / removed:.0%}")
print(f"FineWeb-Edu vs FineWeb: MMLU 33 -> 37 is +{37 / 33 - 1:.1%}, "
      f"ARC 46 -> 57 is +{57 / 46 - 1:.1%}")
print(f"FineWeb-Edu hits MMLU 33.6% at 38B tokens, Matrix needs 300B: "
      f"{300 / 38:.1f}x")
acc = [42.85, 42.78, 42.72, 42.65, 42.61, 42.60, 42.59, 42.58, 42.58, 42.56,
       42.53, 42.39, 42.27, 42.93, 42.12, 42.03]  # Table 2 candidates
print(f"Table 2: {len(acc)} filters span {min(acc)}-{max(acc)} "
      f"({max(acc) - min(acc):.2f} points); best row: {max(acc)}")
gpu_s = 6000 * 3600  # the classifier took 6,000 H100-hours for 15T tokens
print(f"classifier: {15 * T / gpu_s:,.0f} tokens/s per GPU if every token "
      f"is read")
print(f"classifier cost = {6000 / 80000:.1%} of the ablation budget")
print(f"FLOPs per token, Llama-3-70B / classifier = "
      f"{70_553_706_496 / 109_483_009:.0f}x (2N each, prefill only)")

# ---------- 5. FineWeb quality filter (after datatrove) ----------
STOP = (".", "?", "!")  # datatrove has 159 symbols; English needs these three


def ratios(text):
    """Three ratios: lines ending in punctuation, short lines (<= 30 chars),
    characters in duplicated lines."""
    lines = [x for x in text.split("\n") if x.strip()]
    punct = sum(x.endswith(STOP) for x in lines) / len(lines)
    short = sum(len(x) <= 30 for x in lines) / len(lines)
    seen, dup_chars = set(), 0
    for x in lines:
        dup_chars += len(x) if x in seen else 0
        seen.add(x)
    return punct, short, dup_chars / len(text.replace("\n", ""))


def fineweb_filter(text, punct=0.12, short=0.67, dup=0.01):
    """Return keep, or the first rule that fires. Thresholds: datatrove."""
    p, s, d = ratios(text)
    if p < punct:
        return "line_punct"
    if s > short:
        return "short_line"
    return "char_dup" if d > dup else "keep"


prose = ["The Common Crawl project has archived the public web since 2007.",
         "Each snapshot holds billions of pages, most of which are not prose.",
         "Extracting the main text from the HTML removes menus and buttons.",
         "Language identification then keeps the pages written in English.",
         "Heuristic filters drop pages that look like lists or boilerplate.",
         "Deduplication removes pages that are copies of each other.",
         "A classifier can then score what is left for educational value.",
         "Small models trained on each version show which choices help.",
         "The best recipe was found by testing one change at a time.",
         "Every step of the pipeline is published with its settings."]
cookie = "We use cookies to improve your experience. Read our policy."
news = "Subscribe to our newsletter for more updates."
DEMO = {  # made-up demo data, not real web pages
    "article": "\n".join(prose),
    "nav menu": "\n".join(["Home", "About us", "Products", "Pricing", "Blog",
                           "Contact", "Log in", "Cart (0)"] + prose[:2]),
    "keyword list": "\n".join(f"cheap flights to city {i} best price deal"
                              for i in range(8)),
    "cookie repeats": "\n".join(prose[:2] + [cookie] * 4),
    "article + 1 repeat": "\n".join([news] + prose + [news]),
}
print("\n== 5. FineWeb quality filter on made-up pages")
print("page                 punct  short    dup  [email protected]  [email protected]")
for name, text in DEMO.items():
    p, sh, d = ratios(text)
    print(f"{name:19s} {p:6.2f} {sh:6.2f} {d:6.3f}  "
          f"{fineweb_filter(text):12s}  {fineweb_filter(text, dup=0.1)}")

The output:

== 1. S curve (paper: 56 / 77 / 92 / 98.8 % at s = .70 .75 .80 .85)
s=0.50  FineWeb 14x8   5.3%  RefinedWeb 450x20   0.0%
s=0.60  FineWeb 14x8  21.1%  RefinedWeb 450x20   1.6%
s=0.70  FineWeb 14x8  56.5%  RefinedWeb 450x20  30.2%
s=0.75  FineWeb 14x8  77.2%  RefinedWeb 450x20  76.1%
s=0.80  FineWeb 14x8  92.4%  RefinedWeb 450x20  99.5%
s=0.85  FineWeb 14x8  98.8%  RefinedWeb 450x20 100.0%
s=0.90  FineWeb 14x8 100.0%  RefinedWeb 450x20 100.0%
FineWeb    10% at s=0.542  90% at s=0.790  knee (1/b)^(1/r)=0.719
RefinedWeb 10% at s=0.658  90% at s=0.768  knee (1/b)^(1/r)=0.737

== 2. simulation: 6000 pairs, 400 words, 5-grams, 112 hashes
 s range      n  theory  observed      z
0.35-0.40   455    0.6%     0.4%  -0.36
0.40-0.45   414    1.5%     1.2%  -0.51
0.45-0.50   467    3.6%     4.1%   0.49
0.50-0.55   470    8.0%     7.7%  -0.27
0.55-0.60   416   15.7%    17.8%   1.19
0.60-0.65   444   27.8%    28.6%   0.37
0.65-0.70   488   47.0%    44.9%  -0.94
0.70-0.75   442   67.3%    68.3%   0.46
0.75-0.80   483   85.5%    85.9%   0.28
0.80-0.85   472   96.1%    94.1%  -2.29
0.85-0.90   472   99.6%    99.4%  -0.69
0.90-0.95   405  100.0%   100.0%      -
0.95-1.00   572  100.0%   100.0%      -
all pairs: theory 3092 hits, observed 3089; chi2 = 9.2 over 11 bins

== 3. share of sampled documents by number of copies in the sample
sample      f        1-1    2-2    3-3    4-8   9-16   >=2
   1B  0.00005   99.5%   0.5%   0.0%   0.0%   0.0%   0.5%
  10B  0.00050   95.2%   4.7%   0.1%   0.0%   0.0%   4.8%
 100B  0.00500   60.9%  30.3%   7.5%   1.4%   0.0%  39.1%
 350B  0.01750   17.4%  30.7%  26.8%  25.0%   0.0%  82.6%
   1T  0.05000    0.6%   3.2%   8.4%  75.5%  12.3%  99.4%
  28B  0.00140   87.0%  12.1%   0.8%   0.0%   0.0%  13.0%

== 4. arithmetic on the paper's numbers
ablation model: 1,713,670,144 params (HF safetensors: 1,713,670,144)
batch 2,097,152 tokens; steps for 28B: 13,351, 350B: 166,893
28B tokens: 16 tok/param, 2.88e+20 FLOPs, 162-270 H100-hours
350B tokens: 204 tok/param, 3.60e+21 FLOPs, 2,022-3,369 H100-hours
80,000 H100-hours = 24-40 runs of 350B tokens (paper: over 70 models)

per-snapshot dedup 36T -> 20T removes 44.4%; global 36T -> 4T removes 88.9%
C4 + custom filters: 20T -> 15T removes 25.0%; FineWeb-Edu keeps 8.7% of FineWeb
15T / 20 tokens per param = 750B params (paper: more than 500B)
  URL             20T x (1 - 71.5%) = 5.70T; paper 5.6T -> base 19.6T
  line            20T x (1 - 77.8%) = 4.44T; paper 4.4T -> base 19.8T
  line+min words  20T x (1 - 85.0%) = 3.00T; paper 2.9T -> base 19.3T
  3-line          20T x (1 - 80.9%) = 3.82T; paper 3.7T -> base 19.4T
2013-48 kept share: 6.3% (paper text: 10%)
per-snapshot dedup of the removed part keeps 37%
FineWeb-Edu vs FineWeb: MMLU 33 -> 37 is +12.1%, ARC 46 -> 57 is +23.9%
FineWeb-Edu hits MMLU 33.6% at 38B tokens, Matrix needs 300B: 7.9x
Table 2: 16 filters span 42.03-42.93 (0.90 points); best row: 42.93
classifier: 694,444 tokens/s per GPU if every token is read
classifier cost = 7.5% of the ablation budget
FLOPs per token, Llama-3-70B / classifier = 644x (2N each, prefill only)

== 5. FineWeb quality filter on made-up pages
page                 punct  short    dup  [email protected]  [email protected]
article               1.00   0.00  0.000  keep          keep
nav menu              0.20   0.80  0.000  short_line    short_line
keyword list          0.00   0.00  0.000  line_punct    line_punct
cookie repeats        1.00   0.00  0.482  char_dup      char_dup
article + 1 repeat    1.00   0.00  0.063  char_dup      keep

The S-curve: the paper’s four probabilities reproduce, and the two setups cross near 75%

  • The probabilities of Appendix E.1 can be computed. 1−(1−s8)141-(1-s^8)^{14} is 56.5%, 77.2%, 92.4% and 98.8% at s=0.70,0.75,0.80,0.85s=0.70, 0.75, 0.80, 0.85. The paper writes 56%, 77%, 92% and 98.8%; at 0.70 the only difference is rounding.
  • The two setups differ in slope, not in position. In Figure 13 the curves of FineWeb (112 hashes, 14 × 8) and RefinedWeb (9,000 hashes, 450 × 20) cross near s=0.75s=0.75; the script gives 77.2% and 76.1%. For the match probability to rise from 10% to 90%, FineWeb needs the similarity to go from 0.542 to 0.790, RefinedWeb only from 0.658 to 0.768.
  • Cost and benefit. At s=0.5s=0.5 the FineWeb setup still flags 5.3% of document pairs as duplicates and RefinedWeb practically none; at s=0.80s=0.80 the match rates are 92.4% and 99.5%. FineWeb uses about 80 times fewer hash functions (112 against 9,000), so every document needs that much less hashing, storage and comparison, and the paper judges the saving worth the blurrier boundary. These are pairwise probabilities. The paper also clusters transitively (if A and C are duplicates and B and C are duplicates, then A, B and C form one cluster), which may chain matches near the boundary into larger clusters; I did not simulate that step.

Simulation: real MinHash agrees with the theory

  • Bin by bin. The 6,000 pairs are split into 13 bins by their exact 5-gram Jaccard similarity, and the observed match rate stays within sampling error of the theory: 3,089 matches in total against 3,092 expected, χ2=9.2\chi^2=9.2 (11 bins with non-negligible variance, so the expected value is about the 11 degrees of freedom), and only one bin, 0.80–0.85, has ∣z∣|z| above 2 (−2.29-2.29), which is not surprising among 11 bins.
  • What it verifies and what it does not. It verifies the formula 1−(1−s8)141-(1-s^8)^{14} and the assumption that 112 hash functions told apart by a seed behave like independent min-wise hashes. It does not verify the hash functions datatrove actually uses, nor the distribution of 5-grams in real web pages (my words are drawn from a Zipf distribution, so a document almost never repeats a 5-gram).
  • Deduplication is not a threshold test. Pairs with 5-gram similarity between 0.75 and 0.80 match 85.9% of the time, not 100%, and between 0.60 and 0.65 still 28.6% are flagged as duplicates. “Target 75%” names the knee of the S-curve; it does not mean that everything above 75% is removed and nothing below.

Sampling: why a 28B-token ablation cannot see deduplication

  • The duplicate distribution in the worst case. Imagine that every document of the 20T tokens exists in 100 identical copies (the setup of Appendix E.2), and draw a random sample. The numbers in the table are the shares of the documents in the sample, grouped by how many copies of that document the sample holds. In a 28B-token sample (the size of the filtering ablations) only 13.0% of the documents find a copy of themselves in the sample; at 350B it is 82.6%; at 1T, 99.4%.
  • Against Figure 14. The bars of Figure 14 agree with the table from 1B to 350B. I read roughly 99/1, 95/5, 61/30/7/1.5 and 17/31/27/25 off the figure (percent, reading error about ±2), against 99.5%/0.5%, 95.2%/4.7%, 60.9/30.3/7.5/1.4 and 17.4/30.7/26.8/25.0 in the table. For the 1T bar I read about 81% and 6% for the top two segments, against 75.5% and 12.3% in the table; I cannot explain the gap, and the paper does not describe how it sampled.
  • What it means. This is why FineWeb ran its deduplication and cumulative ablations at 350B tokens: in a 28B sample, even in the worst case only 13.0% of documents come with a duplicate, so the effect of deduplication is nearly invisible; at 350B, copies are already common in the sample. Conversely, “no difference in a small ablation” does not mean “no difference at real scale”.

The paper’s numbers: most can be checked, a few do not match

  • The ablation model is self-consistent. The HF config gives 1,713,670,144 parameters, identical digit for digit to the safetensors total. The batch 4×4×64×2048=2,097,1524\times4\times64\times2048=2{,}097{,}152 tokens agrees with the paper’s “about 2M”; 28B tokens are 13,351 steps and 350B tokens are 166,893. 28B tokens is 16 tokens per parameter, close to the “roughly Chinchilla-optimal” the paper says (rule of thumb: about 20); 350B is 204, more than 10 times Chinchilla, so the dedup and cumulative experiments run in a heavily over-trained regime.
  • Compute, in orders of magnitude. 6ND6ND gives 2.88×10²⁰ FLOPs (28B) and 3.60×10²¹ (350B). With the H100’s 989 TFLOPs peak and an MFU of 50% to 30% (my assumption), one run takes about 162–270 and 2,022–3,369 H100-hours. The paper’s total budget of 80,000 H100-hours equals 24–40 runs of 350B tokens, and the paper says it trained over 70 models, so the long 350B runs must be a minority.
  • The data funnel. Per-snapshot deduplication takes 36T down to 20T, removing 44.4%; global deduplication goes from 36T to 4T, removing 88.9%; the C4 and custom filters take 20T down to 15T, removing another 25.0%; FineWeb-Edu keeps 8.7% of FineWeb. 15T tokens at 20 tokens per parameter would train a 750B-parameter model; the paper says “more than 500 billion”, no contradiction. For the four “lighter” global deduplications of Appendix E.3, the base implied by the leftover sizes is between 19.3T and 19.8T, consistent with a rounded “20T”.
  • What does not match. (1) The paper says the part of the 2013-48 snapshot that global deduplication kept is 10% of the original data, but its own 31B and 460B give 6.3%; I do not know which is right. (2) The text says FineWeb-Edu matches Matrix with “almost 10x fewer tokens”; the numbers of Figure 11 are 38B against 300B, which is 7.9 times. (3) The 16 candidate filters of Table 2 all score between 42.03 and 42.93 (0.90 points apart), and the paper reports no seed-to-seed spread for any configuration, so the gaps between the three filters it chose and the ones it did not are quite possibly below the noise; the best score in the table, 42.93, belongs to a different candidate (avg-line-length with 0.5 sampling, at least 56 characters), and the paper does not say why it was not chosen. (4) Running the FineWeb-Edu classifier over 15T tokens took 6,000 H100-hours, only 7.5% of the whole ablation budget; if every token were read, that is 694,444 tokens/s per GPU, and the real throughput is lower because the embedding model truncates long documents. Per token, counting forward FLOPs (2N2N), Llama-3-70B costs 644 times as much as this classifier, which is why annotating with a large model and training a small classifier pays off.

The quality filter: paper text, Table 2 and the code disagree on thresholds

The thresholds of the three custom filters are not quite the same in the paper’s text, in Table 2 and in datatrove’s code (“drop” means the whole document is discarded):

FilterPaper textTable 2 (keep condition)datatrove code
Share of lines ending in punctuationdrop at or below 0.12≥0.12\geq 0.12drop below 0.12
Share of characters in duplicated linesdrop at or above 0.1≤0.01\leq 0.01drop above 0.01
Share of short lines (≤ 30 characters)drop at or above 0.67, removes 3.73%≤0.67\leq 0.67, removes 3.37% (the 0.69 row has 3.73%)drop above 0.67
Newlines per wordnot mentionednot listeddrop above 0.3
  • Duplicated-line character share: the text’s 0.1 and the 0.01 of Table 2 and the code differ by a factor of 10. The code and Table 2 agree, so the text is most likely a typo, but I cannot confirm that the released dataset used 0.01. The paper also says MassiveText’s original threshold is 0.2, and the comment table of the Gopher repetition filter in datatrove does list 0.20.
  • The fourth rule is not in the paper. FineWebQualityFilter today also drops a document when the number of newlines divided by the number of words exceeds 0.3 (list_ratio), which the paper does not mention. The commit history shows it was added in a commit of 2 May 2024; the dataset page was created on 18 April 2024 and the paper appeared on 25 June, so from public information alone I cannot tell whether the released data went through this rule. The first version of 20 April 2024 used ≤\leq and ≥\geq, matching the paper’s wording; the current version uses strict << and >> (the FineWeb-2 commit of December 2024).
  • A different threshold gives different pages. My rewrite (the first three rules only, with only the three ASCII symbols of datatrove’s terminal-punctuation set) judges my five made-up pages as follows: the navigation-menu page is dropped for a short-line share of 0.80, the keyword-list page because no line ends in punctuation, and the page with a repeated cookie notice because duplicated lines hold 0.482 of its characters. The interesting one is “article + 1 repeat”: a 45-character subscription line appears twice, duplicated lines hold 0.063 of the characters, and the page is dropped at a threshold of 0.01 but kept at 0.1. So the choice between 0.01 and 0.1 decides the fate of a great many pages.

Limitations and follow-ups

  • Web only, English only. The paper itself notes that both datasets come entirely from Common Crawl and that other sources such as books or transcribed speech might help; the release notes also warn that, because of the filtering, there is probably little code. The multilingual follow-up is FineWeb-2 (its Hugging Face dataset page was created on December 5, 2024), and datatrove’s MinHash implementation was improved around the same time.
  • Scale and evaluation limits. The experiments use a 1.71B model and at most 350B tokens, and the paper acknowledges that data experiments at more realistic scales could give more reliable guidance; evaluation is academic benchmarks only, with no instruction tuning or alignment. The paper does not discuss overlap between the training corpus and the evaluation sets (it states that no decontamination was done only in its Paloma domain evaluation).
  • Noise is not quantified. Each data version trains only two models and the paper reports no variation across seeds for one configuration; the 16 candidates in Table 2 span only 0.90 points, so which three were chosen probably involves luck.
  • The classifier’s preferences carry into the corpus. FineWeb-Edu distills Llama-3-70B’s idea of educational value; it raises education and history topics and lowers business and entertainment. Threshold 3 is a compromise between knowledge benchmarks and HellaSwag, not a free gain.
  • Details of the paper, tables and code disagree. The threshold for duplicated-line characters (0.1 in the text, 0.01 in Table 2 and the code), the removed fraction for short lines (3.73% vs 3.37%), a fourth list_ratio rule that the paper never mentions, and the “10%” for the 2013-48 snapshot are covered in the hands-on section. When quoting these numbers, trust the code and your own measurements.

What to take away from this paper

  1. Ablate data recipes the way you ablate model recipes: fix a small model and a budget, change one thing at a time, use benchmarks with low variance and near-monotonic curves, and train at least two seeds per version.
  2. The scope of deduplication is itself a hyperparameter: global dedup looks more thorough yet did worse in this setting; “cleaner is better” must be tested, not assumed.
  3. Effects that small ablations cannot see need a large enough scale: in a 28B-token sample even the worst case has only a small share of documents with copies, which is why the dedup ablations use 350B tokens.
  4. “LLM labels plus a linear head” is a cheap data-selection tool: 644 times fewer FLOPs per token, at the price of the labeler’s preferences (here, educational value) reshaping the topic mix of the whole corpus.
  5. Check thresholds against the text, the table and the code: the same filter can be written three ways; the one you can run is the one to trust.

Further reading

FAQ

What is FineWeb, how big is it, and what is its license?
FineWeb is an English web pretraining corpus released by Hugging Face. It was built with the datatrove library from 96 Common Crawl snapshots and contains about 15T tokens under the GPT-2 tokenizer. FineWeb-Edu is a 1.3T-token subset selected by an educational-value classifier. Both are released under the ODC-By v1.0 license, which the paper calls permissive (attribution required), and remain subject to Common Crawl's terms of use; check the official text for details. The paper also releases the processing code and every model trained for the ablations.
What steps are in the FineWeb cleaning pipeline?
In order: extract the main text from WARC files with Trafilatura; base filtering (URL blocklist, fastText English score of at least 0.65, MassiveText quality and repetition rules), which leaves about 36T tokens; MinHash deduplication run separately on each snapshot (20T); C4's filters minus its terminal-punctuation rule; three custom rules (fraction of lines ending in punctuation, fraction of characters in duplicated lines, fraction of short lines); finally anonymization of emails and public IP addresses, leaving 15T tokens. Every step is backed by an ablation.
Why does FineWeb deduplicate each Common Crawl snapshot separately instead of globally?
The authors deduplicated all 96 snapshots against each other from newest to oldest, which left about 4T tokens, but in 350B-token ablations the result was barely better than no deduplication and far below RefinedWeb. A control on the oldest snapshot (2013-48) showed that the roughly 31B tokens kept by global deduplication trained a worse model than the removed data (171B tokens after deduplicating it on its own); the kept pages had more ads and keyword stuffing. Deduplicating each snapshot on its own (20T tokens) matched RefinedWeb. The authors hypothesize that most of the benefit comes from removing huge duplicate clusters present in every snapshot and that finer-grained dedup can hurt; the paper does not test this directly.
How was FineWeb-Edu built and how well does it work?
Llama-3-70B-Instruct scored 460,000 webpages from the CC-MAIN-2024-10 snapshot on an additive 0 to 5 scale for educational value. A linear regression head on frozen Snowflake-arctic-embed-m embeddings (410,000 examples for training, 50,000 for validation) was then trained to imitate those scores. Keeping pages with a score of at least 3 across all of FineWeb gave 1.3T tokens, about 8.7% of FineWeb, with an F1 of 82% on the validation set. In 1.71B-parameter, 350B-token ablations, MMLU rose from 33% to 37% and ARC from 46% to 57%. These are small-model results; the paper reports no larger-scale check.
How are FineWeb's MinHash parameters chosen, and what is the match probability?
Each document is cut into 5-grams, and 112 hash functions each keep the minimum hash, giving a signature split into 14 buckets of 8 values. Two documents are duplicates if all 8 values in any bucket match; duplicate pairs are then clustered transitively and one random document is kept per cluster. For 5-gram Jaccard similarity s, the match probability is 1−(1−s⁸)¹⁴: about 56%, 77%, 92% and 98.8% at s = 0.70, 0.75, 0.80 and 0.85. The target is similarity of roughly 75% or more, but the boundary is soft: pairs at similarity 0.5 are still flagged about 5% of the time. A simulation over 6,000 document pairs in this post confirms the curve.