Advanced

Data: sourcing, filtering, dedup, decontamination

A pretraining corpus is a governed pipeline whose provenance, quality filters, duplicate policy, and evaluation boundaries shape the model — and for Qwen3.8-27B none of those choices are published.

Updated

01 · Concept

Concept

Here is a question you cannot answer, and the fact that you cannot answer it is the lesson. What was Qwen3.8-27B trained on? The model card gives architecture, licence, sampling presets, and a benchmark table. It does not give a corpus, a token count, a language balance, or a cutoff date, and there is no accompanying technical report. Someone made every decision below for this model, and none of them were disclosed. That is now the norm for open-weight releases: you receive the weights and the shapes, not the pipeline that produced them.

So this lesson teaches the pipeline generically, and you carry the shape of it as a set of questions you know to ask of any release — including this one, where the honest answer to most of them is “not published.”

Sourcing begins with provenance. Each document needs a stable identifier and metadata for source, acquisition date, language, licence or permission basis, and collection method. Publicly reachable does not automatically mean legally or ethically suitable for every use. Robots policies, contractual terms, personal data, copyrighted material, and removal requests require explicit governance. A URL alone is weak provenance, because the content behind it changes.

Filtering removes material according to a declared policy. Mechanical checks catch empty files, parser failures, extreme repetition, binary garbage, and implausible character distributions. Language identification supports routing and mixture control. Quality classifiers can rank documents, but they inherit the values and biases of their labels; a filter that prefers one prestige dialect quietly erases useful regional language. Safety filtering is not one keyword list — personal identifiers, secrets, malware, and exploitation material need layered controls, access restrictions, and protection for the humans who review the hard cases. Record scores and thresholds so the choices can be audited later.

Deduplication reduces repeated training examples. Exact hashes catch byte-identical documents after canonicalization; near-duplicate methods compare shingles, fingerprints, or locality-sensitive hashes to find copied pages with small edits. The unit matters: discarding an entire book because one standard licence paragraph repeats would be absurd. Duplicates distort sampling weights, and under the next-token objective of lesson 5.1 that distortion is direct — a document mirrored a thousand times contributes a thousand times the gradient, encouraging memorization and shrinking effective diversity.

Decontamination protects evaluation. It searches candidate training data for benchmark questions, answers, code tests, or close variants and excludes or flags the overlaps. Exact matching misses paraphrases; fuzzy matching produces false positives on common phrases. The threshold, normalization, benchmark version, and decision record are part of the reported result. This is why the model card’s vendor-reported numbers — SWE-bench Pro 61.7, GPQA Diamond 89.2, and the rest — are vendor-reported and await independent reproduction: without a contamination report, a score is a claim, not a measurement.

Now the arithmetic, because mixture construction is where a pipeline becomes numeric. Suppose — and this is an illustrative assumption of ours, not a fact about any shipped model — you plan a 3-trillion-token budget and want a curated code domain to be 10% of it, but that domain holds only 50 billion unique tokens. You will draw

0.10×3,000 B=300 B tokens,300 B50 B=6 effective epochs0.10\times 3{,}000\ \text{B}=300\ \text{B tokens}, \qquad \frac{300\ \text{B}}{50\ \text{B}}=6\ \text{effective epochs}

over that source. Meanwhile a 2-trillion-token web pool assigned 40% of the budget is drawn at 0.40×3,000=1,2000.40\times 3{,}000 = 1{,}200 B tokens, which is 1,200/2,000=0.61{,}200/2{,}000 = 0.6 epochs — it is never seen once in full. Same corpus, same run, one source repeated six times and another sampled at 60% coverage. Effective epochs per source, not the headline token total, is the number that predicts memorization risk. Recompute it whenever a mixture weight moves.

The classic wrong turn here is deduplicating within each source and declaring the job done. Sources overlap: the same Wikipedia article reaches you through the encyclopedia dump, three mirror sites, two scraped forums that quote it, and a book that reproduces it. Per-source dedup finds none of these, because each copy is unique inside its own shard. Cross-source deduplication over the merged candidate pool is what actually collapses the cluster, and it must run before the train/validation split, not after — otherwise copies of one text land on both sides and validation loss reports a number better than any genuine out-of-source performance.

Version every artifact: raw snapshot, normalized text, filter configuration, duplicate clusters, decontamination report, mixture manifest, and tokenizer. Preserve counts before and after each stage without retaining unnecessary sensitive samples. A reproducible manifest should let another authorized operator reconstruct exactly which document IDs were eligible for a run.

The model will learn the distribution you actually feed it, not the description in a launch post. And when there is no description at all, the only responsible position is to say so.

02 · Analogy

Analogy

Supplying a city reservoir is not a matter of opening every pipe. Engineers record each watershed, reject chemical spills, remove repeated recirculation, keep test samples out of the drinking stream, and preserve a ledger so a bad source can be isolated later. A trillion tokens without provenance are like an enormous unlabelled tank: volume is visible, fitness is not.

03 · Teach it back

Teach it back

Describe a defensible data pipeline, distinguish deduplication from benchmark decontamination, and say what can honestly be claimed about Qwen3.8-27B's training data.

Minimum: 80 characters and 15 words. Your writing stays only in this browser.

Waiting for your explanation.

Compare with a model answer

A defensible pipeline records source, collection date, licence or permission basis, language, transformations, and document identity; applies deterministic safety and quality filters; removes exact and near duplicates; and versions every stage. Deduplication reduces repeated content within training data. Decontamination compares training candidates against held-out evaluations and excludes overlaps that would invalidate measurement. About Qwen3.8-27B specifically, almost nothing can be claimed: there is no technical report, and the model card publishes architecture, licence, benchmarks, and sampling presets but no corpus composition, token count, or cutoff date. The honest statement is that the mixture is undisclosed.

04 · Check your understanding

Check your understanding

01Which of these is a publishable fact about Qwen3.8-27B's pretraining data?
Answer and explanation

None of them — no corpus composition, token count, or cutoff is published for this model — There is no technical report; the model card documents architecture, licence, sampling presets, and vendor-reported benchmarks, and stops there.

02Under the causal objective of lesson 5.1, why does one article mirrored on a thousand scraped sites distort training?
Answer and explanation

Its tokens receive a thousand times the next-token gradient of an equally informative unique article — The loss is summed per token, so duplication silently multiplies a document's sampling weight and encourages memorization.

03What does decontamination primarily protect?
Answer and explanation

The validity of held-out evaluation — Training on benchmark questions or close variants can make evaluation measure memorization rather than generalization.

Complete the teach-back and answer the quiz correctly to finish this lesson.

◎ · Evidence marker

Sources

  1. Qwen Team (2026). Qwen3.8-27B Model Card.
  2. Katherine Lee et al. (2021). Deduplicating Training Data Makes Language Models Better.
  3. Jesse Dodge et al. (2021). Documenting Large Webtext Corpora: A Case Study on the Colossal Clean Crawled Corpus.