Spaces:
Running on CPU Upgrade
Running on CPU Upgrade
Commit ·
04e6a68
1
Parent(s): e0616ef
use figref throughout the blog post
Browse files
app/src/content/chapters/experiments.mdx
CHANGED
|
@@ -2,6 +2,7 @@ import HtmlEmbed from "../../components/HtmlEmbed.astro";
|
|
| 2 |
import Note from "../../components/Note.astro";
|
| 3 |
import Sidenote from "../../components/Sidenote.astro";
|
| 4 |
import Glossary from "../../components/Glossary.astro";
|
|
|
|
| 5 |
|
| 6 |
{/* TODO: Benchmarking: plot compare against default, mention how expensive one sweep is, automatically produce plot from baseline to be optimized and spit out the result */}
|
| 7 |
{/* TODO: think about what dataset to build and release as artifact: do more rephrasing with smollm2 */}
|
|
@@ -23,7 +24,7 @@ We start by surveying the landscape. <mark>How do existing pretraining datasets
|
|
| 23 |
|
| 24 |
We train on eight datasets under identical conditions and compare their final evaluation performance.
|
| 25 |
|
| 26 |
-
DCLM, Nemotron-HQ-Synth, and REWIRE lead by a significant margin (see
|
| 27 |
|
| 28 |
<HtmlEmbed
|
| 29 |
id="baselines-comparison"
|
|
@@ -59,7 +60,7 @@ We isolate each prompt from Nemotron-HQ-Synth ([diverse_qa_pairs](#diverse_qa_pa
|
|
| 59 |
The BeyondWeb dataset was never released and the paper omits key details, yet claims strong performance. We tested their [continue](#continue) and [summarize](#summarize) prompts to verify those claims and make the knowledge publicly available.
|
| 60 |
</Sidenote>
|
| 61 |
|
| 62 |
-
Only [diverse_qa_pairs](#diverse_qa_pairs) (driven by very strong SQuAD performance) and REWIRE's [guided_rewrite](#guided_rewrite_original) match DCLM (see
|
| 63 |
|
| 64 |
<HtmlEmbed
|
| 65 |
id="dissecting-baselines"
|
|
@@ -104,7 +105,7 @@ Since most existing prompts fail to beat DCLM, we designed new prompt formats ta
|
|
| 104 |
|
| 105 |
We test seven novel prompts ([math](#math), [table](#table), [faq](#faq), [tutorial](#tutorial), [article](#article), [commentary](#commentary), [discussion](#discussion)) using Gemma-3-1B on FineWeb-Edu-HQ.
|
| 106 |
|
| 107 |
-
Four prompts ([math](#math), [table](#table), [faq](#faq), [tutorial](#tutorial)) outperform both FineWeb-Edu-HQ and DCLM, while [article](#article), [commentary](#commentary), and [discussion](#discussion) fall short (see
|
| 108 |
|
| 109 |
<HtmlEmbed
|
| 110 |
id="new-prompts"
|
|
@@ -138,7 +139,7 @@ A natural assumption is that bigger models produce higher-quality rephrasings. <
|
|
| 138 |
|
| 139 |
We compare all Gemma-3 sizes (270M, 1B, 4B, 12B, 27B) on the [tutorial](#tutorial) and [math](#math) prompts. Use the Setup dropdown to switch between prompts.
|
| 140 |
|
| 141 |
-
The 270M model underperforms, but 1B through 27B show no significant difference on either prompt (see
|
| 142 |
|
| 143 |
<Sidenote>
|
| 144 |
It is possible that larger models produce richer or more nuanced rephrasings that our benchmark suite does not capture. Our evaluations measure a fixed set of skills, and subtler improvements in data quality could go undetected.
|
|
@@ -185,7 +186,7 @@ The REWIRE [@rewire] paper claims that upcycling low-quality data requires large
|
|
| 185 |
|
| 186 |
We compare 1B vs 12B models on HQ vs LQ source data across four prompts ([continue](#continue), [summarize](#summarize), [tutorial](#tutorial), [faq](#faq)). Use the Setup dropdown to switch between prompts.
|
| 187 |
|
| 188 |
-
The results are mixed: for some prompts 12B helps slightly with LQ data, but for the [FAQ](#faq) prompt the 1B model actually wins (see
|
| 189 |
|
| 190 |
<HtmlEmbed
|
| 191 |
id="size-quality"
|
|
@@ -246,7 +247,7 @@ Different model families may be better suited for rephrasing based on their trai
|
|
| 246 |
|
| 247 |
We test six model families (SmolLM2, Falcon3 [@falcon3], Qwen3, Gemma-3, Granite3 [@granite3], Llama-3.2) at ~1B scale on four prompts. Use the Setup dropdown to compare across prompts.
|
| 248 |
|
| 249 |
-
SmolLM2 consistently and clearly outperforms all others across all four prompts (see
|
| 250 |
|
| 251 |
<Sidenote>
|
| 252 |
We hypothesize that SmolLM2's consistently strong rephrasing performance originates from explicit rewrite tasks in its instruction tuning data (smoltalk). This would mean the model already "knows" how to rewrite well before we even prompt it.
|
|
@@ -319,7 +320,7 @@ We've seen that model family matters. But within a family, <mark>do newer versio
|
|
| 319 |
|
| 320 |
We compare Qwen models from versions 1.5 [@qwen], 2 [@qwen2], 2.5 [@qwen25], and 3 on the [tutorial](#tutorial) prompt.
|
| 321 |
|
| 322 |
-
While the differences are small, we find a consistent trend: newer versions lead to higher evaluation performance (see
|
| 323 |
|
| 324 |
<HtmlEmbed
|
| 325 |
id="model-generation"
|
|
@@ -357,7 +358,7 @@ We start with the most fundamental question: <mark>can we train on synthetic dat
|
|
| 357 |
|
| 358 |
We compare synthetic-only training vs mixed training (synthetic + source) for [tutorial](#tutorial) and [faq](#faq) prompts on DCLM and FineWeb-Edu-HQ sources.
|
| 359 |
|
| 360 |
-
Synthetic-only training beats FineWeb-Edu-HQ but falls short of both DCLM and mixed training (see
|
| 361 |
|
| 362 |
<HtmlEmbed
|
| 363 |
id="synthetic-only"
|
|
@@ -398,7 +399,7 @@ We just saw that mixing in original data is essential. <mark>How much does the c
|
|
| 398 |
|
| 399 |
We apply the [tutorial](#tutorial) prompt using Gemma-3-1B on FineWeb-Edu-HQ, then mix in one of four datasets: DCLM, Cosmopedia, FineWeb-Edu-HQ, or FineWeb-Edu-LQ. Use the Setup dropdown to also see results with LQ source data.
|
| 400 |
|
| 401 |
-
DCLM and FineWeb-Edu-HQ outperform Cosmopedia and FineWeb-Edu-LQ as mix-in datasets. Adding synthetic data improves performance for all mix-in datasets, with the effect especially pronounced for the weaker ones (see
|
| 402 |
|
| 403 |
<HtmlEmbed
|
| 404 |
id="mixin-dataset"
|
|
@@ -444,7 +445,7 @@ We know the mix-in dataset is critical. <mark>But does the quality of the source
|
|
| 444 |
|
| 445 |
We rephrase four datasets (DCLM, Cosmopedia, FineWeb-Edu-HQ, FineWeb-Edu-LQ) with [tutorial](#tutorial) and [faq](#faq) prompts. We test two regimes: (a) mix-in equals source, and (b) fixed mix-in (FineWeb-Edu-HQ).
|
| 446 |
|
| 447 |
-
When mix-in varies with source, source quality appears to matter: FineWeb-Edu-HQ and DCLM clearly outperform FineWeb-Edu-LQ and Cosmopedia (see
|
| 448 |
|
| 449 |
<HtmlEmbed
|
| 450 |
id="source-dataset-mixin-source"
|
|
@@ -516,7 +517,7 @@ Given that mixing matters, a natural next step is to maximize diversity in the s
|
|
| 516 |
|
| 517 |
We test three diversity strategies: mixing prompts, mixing model families, and mixing both. Use the Setup dropdown to compare strategies.
|
| 518 |
|
| 519 |
-
No significant improvement from any diversity strategy. Performance averages rather than compounds (see
|
| 520 |
|
| 521 |
<Sidenote>
|
| 522 |
Interestingly, when mixing enough different prompts together, we don't seem to need the source dataset for good performance. This could mean that diverse synthetic data can substitute for the original data, but a single synthetic dataset cannot.
|
|
@@ -578,7 +579,7 @@ The original REWIRE prompt contains many typos and grammar errors. <mark>Do thes
|
|
| 578 |
|
| 579 |
We compare REWIRE's [original prompt](#guided_rewrite_original) (with typos) against an [improved version](#guided_rewrite_improved), at both 1B and 12B scale.
|
| 580 |
|
| 581 |
-
Surprisingly, typos don't have a negative effect on downstream model performance. For the 1B model, the typo-laden original actually performs slightly better (see
|
| 582 |
|
| 583 |
<HtmlEmbed
|
| 584 |
id="typos-effect"
|
|
|
|
| 2 |
import Note from "../../components/Note.astro";
|
| 3 |
import Sidenote from "../../components/Sidenote.astro";
|
| 4 |
import Glossary from "../../components/Glossary.astro";
|
| 5 |
+
import FigRef from "../../components/FigRef.astro";
|
| 6 |
|
| 7 |
{/* TODO: Benchmarking: plot compare against default, mention how expensive one sweep is, automatically produce plot from baseline to be optimized and spit out the result */}
|
| 8 |
{/* TODO: think about what dataset to build and release as artifact: do more rephrasing with smollm2 */}
|
|
|
|
| 24 |
|
| 25 |
We train on eight datasets under identical conditions and compare their final evaluation performance.
|
| 26 |
|
| 27 |
+
DCLM, Nemotron-HQ-Synth, and REWIRE lead by a significant margin (see <FigRef target="baselines-comparison" />). The remaining datasets, including Cosmopedia, FineWeb-Edu (both HQ and LQ), Ultra-FineWeb, and SYNTH, fall notably behind. <mark>TLDR: DCLM is the strongest baseline and becomes our primary comparison target for all following experiments.</mark>
|
| 28 |
|
| 29 |
<HtmlEmbed
|
| 30 |
id="baselines-comparison"
|
|
|
|
| 60 |
The BeyondWeb dataset was never released and the paper omits key details, yet claims strong performance. We tested their [continue](#continue) and [summarize](#summarize) prompts to verify those claims and make the knowledge publicly available.
|
| 61 |
</Sidenote>
|
| 62 |
|
| 63 |
+
Only [diverse_qa_pairs](#diverse_qa_pairs) (driven by very strong SQuAD performance) and REWIRE's [guided_rewrite](#guided_rewrite_original) match DCLM (see <FigRef target="dissecting-baselines" />). The BeyondWeb-inspired [continue](#continue) and [summarize](#summarize) prompts do not reach DCLM level. <mark>TLDR: Apart from two prompts, no existing synthetic method outperforms the DCLM baseline.</mark>
|
| 64 |
|
| 65 |
<HtmlEmbed
|
| 66 |
id="dissecting-baselines"
|
|
|
|
| 105 |
|
| 106 |
We test seven novel prompts ([math](#math), [table](#table), [faq](#faq), [tutorial](#tutorial), [article](#article), [commentary](#commentary), [discussion](#discussion)) using Gemma-3-1B on FineWeb-Edu-HQ.
|
| 107 |
|
| 108 |
+
Four prompts ([math](#math), [table](#table), [faq](#faq), [tutorial](#tutorial)) outperform both FineWeb-Edu-HQ and DCLM, while [article](#article), [commentary](#commentary), and [discussion](#discussion) fall short (see <FigRef target="new-prompts" />). The best-performing prompts all restructure the source content into pedagogically rich formats. <mark>TLDR: Math, table, FAQ, and tutorial prompts beat the DCLM baseline, while article, commentary, and discussion are at or below DCLM level.</mark>
|
| 109 |
|
| 110 |
<HtmlEmbed
|
| 111 |
id="new-prompts"
|
|
|
|
| 139 |
|
| 140 |
We compare all Gemma-3 sizes (270M, 1B, 4B, 12B, 27B) on the [tutorial](#tutorial) and [math](#math) prompts. Use the Setup dropdown to switch between prompts.
|
| 141 |
|
| 142 |
+
The 270M model underperforms, but 1B through 27B show no significant difference on either prompt (see <FigRef target="model-size" />). Even for the harder [math](#math) prompt, larger models do not help. <mark>TLDR: Beyond a baseline capability (reached at 1B), larger models do not improve synthetic data quality.</mark>
|
| 143 |
|
| 144 |
<Sidenote>
|
| 145 |
It is possible that larger models produce richer or more nuanced rephrasings that our benchmark suite does not capture. Our evaluations measure a fixed set of skills, and subtler improvements in data quality could go undetected.
|
|
|
|
| 186 |
|
| 187 |
We compare 1B vs 12B models on HQ vs LQ source data across four prompts ([continue](#continue), [summarize](#summarize), [tutorial](#tutorial), [faq](#faq)). Use the Setup dropdown to switch between prompts.
|
| 188 |
|
| 189 |
+
The results are mixed: for some prompts 12B helps slightly with LQ data, but for the [FAQ](#faq) prompt the 1B model actually wins (see <FigRef target="size-quality" />). We see no consistent advantage of using larger models for low-quality data. <mark>TLDR: We cannot reproduce the claim that large models are needed for low-quality data.</mark>
|
| 190 |
|
| 191 |
<HtmlEmbed
|
| 192 |
id="size-quality"
|
|
|
|
| 247 |
|
| 248 |
We test six model families (SmolLM2, Falcon3 [@falcon3], Qwen3, Gemma-3, Granite3 [@granite3], Llama-3.2) at ~1B scale on four prompts. Use the Setup dropdown to compare across prompts.
|
| 249 |
|
| 250 |
+
SmolLM2 consistently and clearly outperforms all others across all four prompts (see <FigRef target="model-family" />). <mark>TLDR: Model family matters a lot. SmolLM2 dominates, likely due to [rewrite tasks](https://huggingface.co/datasets/HuggingFaceTB/smoltalk/viewer/smol-rewrite?row=0&views%5B%5D=smol_rewrite_train) in its training data.</mark>
|
| 251 |
|
| 252 |
<Sidenote>
|
| 253 |
We hypothesize that SmolLM2's consistently strong rephrasing performance originates from explicit rewrite tasks in its instruction tuning data (smoltalk). This would mean the model already "knows" how to rewrite well before we even prompt it.
|
|
|
|
| 320 |
|
| 321 |
We compare Qwen models from versions 1.5 [@qwen], 2 [@qwen2], 2.5 [@qwen25], and 3 on the [tutorial](#tutorial) prompt.
|
| 322 |
|
| 323 |
+
While the differences are small, we find a consistent trend: newer versions lead to higher evaluation performance (see <FigRef target="model-generation" />). <mark>TLDR: Newer model generations tend to produce slightly better synthetic data.</mark>
|
| 324 |
|
| 325 |
<HtmlEmbed
|
| 326 |
id="model-generation"
|
|
|
|
| 358 |
|
| 359 |
We compare synthetic-only training vs mixed training (synthetic + source) for [tutorial](#tutorial) and [faq](#faq) prompts on DCLM and FineWeb-Edu-HQ sources.
|
| 360 |
|
| 361 |
+
Synthetic-only training beats FineWeb-Edu-HQ but falls short of both DCLM and mixed training (see <FigRef target="synthetic-only" />). Mixed training consistently improves over both the synthetic-only and original-data-only baselines. <mark>TLDR: Synthetic data alone is not enough. Mixing with original data consistently improves performance.</mark>
|
| 362 |
|
| 363 |
<HtmlEmbed
|
| 364 |
id="synthetic-only"
|
|
|
|
| 399 |
|
| 400 |
We apply the [tutorial](#tutorial) prompt using Gemma-3-1B on FineWeb-Edu-HQ, then mix in one of four datasets: DCLM, Cosmopedia, FineWeb-Edu-HQ, or FineWeb-Edu-LQ. Use the Setup dropdown to also see results with LQ source data.
|
| 401 |
|
| 402 |
+
DCLM and FineWeb-Edu-HQ outperform Cosmopedia and FineWeb-Edu-LQ as mix-in datasets. Adding synthetic data improves performance for all mix-in datasets, with the effect especially pronounced for the weaker ones (see <FigRef target="mixin-dataset" />). <mark>TLDR: The mix-in dataset is a major performance driver, sometimes more important than the synthetic data itself.</mark>
|
| 403 |
|
| 404 |
<HtmlEmbed
|
| 405 |
id="mixin-dataset"
|
|
|
|
| 445 |
|
| 446 |
We rephrase four datasets (DCLM, Cosmopedia, FineWeb-Edu-HQ, FineWeb-Edu-LQ) with [tutorial](#tutorial) and [faq](#faq) prompts. We test two regimes: (a) mix-in equals source, and (b) fixed mix-in (FineWeb-Edu-HQ).
|
| 447 |
|
| 448 |
+
When mix-in varies with source, source quality appears to matter: FineWeb-Edu-HQ and DCLM clearly outperform FineWeb-Edu-LQ and Cosmopedia (see <FigRef target="source-dataset-mixin-source" />). But when we fix the mix-in to FineWeb-Edu-HQ, the source effect nearly vanishes (see <FigRef target="source-dataset-fixed-mixin" />). This corroborates our finding that the mix-in matters much more than the source. <mark>TLDR: Source dataset quality is secondary to mix-in dataset quality. With a strong mix-in, even low-quality sources produce competitive synthetic data.</mark>
|
| 449 |
|
| 450 |
<HtmlEmbed
|
| 451 |
id="source-dataset-mixin-source"
|
|
|
|
| 517 |
|
| 518 |
We test three diversity strategies: mixing prompts, mixing model families, and mixing both. Use the Setup dropdown to compare strategies.
|
| 519 |
|
| 520 |
+
No significant improvement from any diversity strategy. Performance averages rather than compounds (see <FigRef target="diversity" />). However, our ablations train on only 20B tokens, so it is possible that diversity benefits only emerge at larger scales where the model can better exploit the varied signal.
|
| 521 |
|
| 522 |
<Sidenote>
|
| 523 |
Interestingly, when mixing enough different prompts together, we don't seem to need the source dataset for good performance. This could mean that diverse synthetic data can substitute for the original data, but a single synthetic dataset cannot.
|
|
|
|
| 579 |
|
| 580 |
We compare REWIRE's [original prompt](#guided_rewrite_original) (with typos) against an [improved version](#guided_rewrite_improved), at both 1B and 12B scale.
|
| 581 |
|
| 582 |
+
Surprisingly, typos don't have a negative effect on downstream model performance. For the 1B model, the typo-laden original actually performs slightly better (see <FigRef target="typos-effect" />). <mark>TLDR: Typos in prompts do not hurt downstream performance.</mark>
|
| 583 |
|
| 584 |
<HtmlEmbed
|
| 585 |
id="typos-effect"
|
app/src/content/chapters/introduction.mdx
CHANGED
|
@@ -1,5 +1,6 @@
|
|
| 1 |
|
| 2 |
import HtmlEmbed from "../../components/HtmlEmbed.astro";
|
|
|
|
| 3 |
|
| 4 |
{/*
|
| 5 |
Notes:
|
|
@@ -31,7 +32,7 @@ We continue with a walkthrough of the different approaches for synthetic data in
|
|
| 31 |
|
| 32 |
Finally we present the suite of XXX experiments we ran to figure out best practices regarding what models, prompts and settings work well.
|
| 33 |
|
| 34 |
-
Here's a preview of where we end up: FinePhrase, our best configuration, clearly outperforms all existing synthetic data baselines. The rest of this post explains how we got there.
|
| 35 |
|
| 36 |
<HtmlEmbed
|
| 37 |
id="finephrase-vs-baselines"
|
|
|
|
| 1 |
|
| 2 |
import HtmlEmbed from "../../components/HtmlEmbed.astro";
|
| 3 |
+
import FigRef from "../../components/FigRef.astro";
|
| 4 |
|
| 5 |
{/*
|
| 6 |
Notes:
|
|
|
|
| 32 |
|
| 33 |
Finally we present the suite of XXX experiments we ran to figure out best practices regarding what models, prompts and settings work well.
|
| 34 |
|
| 35 |
+
Here's a preview of where we end up: FinePhrase, our best configuration, clearly outperforms all existing synthetic data baselines (<FigRef target="finephrase-vs-baselines" />). The rest of this post explains how we got there.
|
| 36 |
|
| 37 |
<HtmlEmbed
|
| 38 |
id="finephrase-vs-baselines"
|