today we are taking a deeper look at of the secret behind LLM pretraining which is synthetic data pipelines with Joel Niklaus machine learning engineer at Hugging Face!joel an his team ran 90 controlled experiments and burned over a trillion tokens to figure out what actually makes good pretraining data and in huggingface fashion provided all of their findings/artifacts openly! lots of things to learn from experiment like this and to be honest there is still so much more to do! couple of useful links: 👉Joel Website: https://niklaus.ai👉 Twitter: https://x.com/joelniklaus👉 Paper: arXiv: https://arxiv.org/abs/2604.13977👉 Blog: https://huggingface.co/spaces/HuggingFaceFW/finephraseAlso check out Arcee (American open research lab and sponsor of this interview):♥️ https://www.arcee.ai/Also trinity large thinking is available on open router:♥️ https://openrouter.ai/arcee-ai/trinity-large-thinking#providers♥️ and check out the NAC harness https://www.arcee.ai/blog/nac on the menu: - 0:00: synthetic data in pre-training LLM - 3:36: Joel Niklau ML Research Engineer at Hugging Face - 4:50: how to approach research problems at the edge? - 7:26: the label here is still wrong is should be “benchmarking work overview” - 9:10: what are the first few steps to get started building a private benchmark. - 11:18: synthetic data pipeline and it’s impact in benchmark making - 13:19: Synthetic Data Playbook Presentation Overview - 19:30: what is rephrasing in synthetic data? - 21:05: why are large scale ablation studies on data pipeline becoming feasible now? - 24:00: how is rephrasing done? - 25:42: experimental results - 27:58: why does synthetic restructuring hurt common-sense knowledge? - 30:10: what’s the value prop behind doing rephrasing? - 32:16: is math a type of rephrasing? - 38:02: what’s up with closeness between generator vs the student? - 39:40: synthetic data + mixing real data - 41:20: what drive this real-to-synthetic ratio? - 43:50: what other structured formats could be explored for synthetic data? - 45:20: is the order of datasets used for pretraining also affecting the distribution? - 46:40: would adding multilinguality be considered a form of rephrasing for LLM? - 50:40: which non-synthetic dataset should you mix in? - 1:03:20: do model-specific writing habits survive the rephrasing process? + sawing off the edges? - 1:08:30: would their be a gain to have a purpose built 270M model for being a generator? - 1:14:30: does generator diversity still help as the student model scales? - 1:26:30: ❤️❤️❤️ - 1:27:15: useful of synthetic data for post-training? - 1:28:50: what’s next for this direction and for the field? btw: do follow joel he is a fantastic scientist and a very good educator! Get full access to learning with yacine at www.yacinemahdid.com/subscribe
Audio and video play straight from the show's own hosting. PodSubs stores and serves no media.
Transcript
From the show. Tap a time to play from there.
SPEAKER_01Originally, pre-training data for large language models was mostly built by scraping the web and then filtering it down aggressively with quality classifiers. Now, basically every recent flagship models like Nemotron 3, Gwentry, GLM, He's leaning heavily on adding synthetic data to their training recipes. The way it works is that you take a web document, you run it through a strong enough LM, and ask it to produce a variant that keep the meaning but change the presentation. Something like rewrite this as a tutorial,
SPEAKER_01Then you mix the synthetic data back into the real web data and you pre-train on the mixture. For example, NVIDIA rephrase about 2 trillion tokens this way for Nimetron CC. The issue is that the literature on how to properly build such a synthetic Pre-training pipeline is pretty sparse. The frontier labs like OpenAI, Google, Entropic, and even the Chinese labs usually don't publish their training data recipes. And the academic groups that would publish them usually don't have the compute
SPEAKER_01to run all the ablation In this video, we're going to look at the amazing work from the team at Hugging Face that actually ran a full ablation suite on the synthetic data pipeline. We're talking about 90 rephrasing configurations, 300 evaluation experiments, There's a trillion token generated just for the ablation, which total up to about 12 plus GPU years of compute. We'll even have the chance of interviewing Joel Niklas, who led the work into making this synthetic data pipeline playbook possible. The core idea is that there are three axes you can vary
SPEAKER_01when you generate synthetic pre-turning data. The prompt, used to rephrase, the generator model, doing the rephrasing, and the source data, plus whatever real data you mix it back in. The result Hugging Face found was pretty counterintuitive. For instance, the prompt is by far the biggest lever, and what work is mainly restructuring. Meanwhile, the generator model barely mattered past the billion parameters. The dataset, every prompt template, all the adlation data, the generation framework, and the full benchmark result are all open source,
SPEAKER_01which is You can check out right here their 90-page document on the full methodology. Speaking of fully open technical artifacts, let's talk a bit about RC, the open-weight lab that is sponsoring this interview. If you're familiar with the open AI model landscape, you know it's pretty much Well, RC is a pretty cool lab right here in North America that not only open weight their model, which you can download and run on whatever system you want, but it's also very open about their training methodology and release a lot of like their research artifact.
SPEAKER_01You can get their latest model on Open Router and if you're into personal agent you can literally shove it into your Hermes setup. You can also run it straight into One fresh new thing that they recently released is Knack, which is an open-source harness for long-running agentic work. It's pretty useful for research that are complex but decomposable with well-separated part and concrete acceptance criteria.
SPEAKER_01Stuff that you would do in like a machine learning experiment. How it works is that you give your model in that harness a high-level objective, some constraint stated upfront, an acceptance criteria, and then you let it roll on a research idea for days and dates. The team at RC is actually building their next version of Trinity, their flagship model using that. You can try out this harness out there on GitHub or install the current Edge build by checking their blog post. Big thanks to RC for sponsoring this video, a very cool app to keep your eye on. Let's now dive into the interview.
SPEAKER_02Yeah, my name is Joel. Actually, I started studying sports science and then switched to computer science in my bachelor's. Then I did specialization in data science in the master and then PhD in NLP. The PhD was focused on legal NLP, like mainly evaluation. The project was about anonymization of people inside Swiss court decisions. And then after the PhD, I worked for Harvey for a year as a research scientist,
SPEAKER_02made a benchmark for translating Swiss legal documents in five languages and worked on improving retrieval systems. And then in August last year, I joined Hugging Face and my first project was the Synthetic Data Playbook.
SPEAKER_01That's a good first project. This is pretty good. I think what's nice here is that it ties up to a lot of your work that you've done previously, which is really cool. You work in like you did a PhD, you work in academia and industry. Like now you're doing kind of a kind of mix of the two with like ugly face. What's your overall general philosophy with research problem? I know you've done benchmark stuff. You worked on various different projects.
SPEAKER_01But when you're tackling a research project that has at the edge of the knowledge quality, what's your philosophy to tackle it?
SPEAKER_02Yeah, great question. I think similar a bit to how startups operate in general, I would say like if you're tackling a new research project, you don't really know where it's going, what's going to work and what's not going to work. So in the beginning, you want to explore as many different parts of the problem as fast as possible. So for example, in the Fine Phrase project, a big issue was that I had to rephrase like 10 billion tokens just to run one experiment and that even on the Huggy Face cluster, it takes a while.
SPEAKER_02So you can't really run that many experiments, right? So you wanna figure out ways to like speed up The iterations as much as possible, and then try to explore the tree of possible options as broadly as possible, as early as possible, so that you can then narrow in on the ones that sound promising. I did some work on Monte Carlo Tree Search in my master's.
SPEAKER_02And I feel like, yeah, maybe to be a bit nerdy about that, I would say I would follow Monte Carlo Tree Search, where I first explore. And then when I find one branch of the tree that looks promising, I exploit until I have a project that is well-rounded and can be finished.
SPEAKER_01Yeah, same thought here. Because I've done startup stuff for a while, research stuff also. Same mental model I have. I've done a lot of graph theory things in my research for the project that I've been doing. And my view is that if you can just rephrase and rethink about your problem in this way, it's usually much easier to understand the scale of what you're trying to accomplish and How useful it is to kind of go fast at the beginning,
SPEAKER_01even if like it's a bit messy and you're just trying to explore a bit the space. But once you have something good that like fit your criteria, like just going over there and getting like juicing up as much as possible is usually like very, very good. And then you're able to kind of get the good stuff. I also see that you've done a lot of benchmark, which is funny because I think you're the third or fourth person I'm interviewing that has a heavy background in making benchmarks.
SPEAKER_01First off, can you talk about these different benchmarking work that you've done?
SPEAKER_02So one of the most recent ones that we made was, it's called Lexam. So it's legal reasoning evaluation based on Law exams from the University of Zurich in Switzerland. And the new thing there was that we really evaluated like long form reasoning. And that was like one of the first works that they test that in the legal domain. So like really hard, really hard. Provide long-form reasoning questions in the law domain. Another one I've touched upon briefly before was called SwiltraBench,
SPEAKER_02where we benchmarked translation models on law translation and headnote translation from Swiss court decisions, and then made some before on general... Like back in the days in NLP when we looked at named entity recognition tasks or text classification tasks for multilingual legal data sets.
SPEAKER_01In the ancient time, right? Like the ancient time of machine learning, right? 2021 or something like that? Hey, this is crazy how like time in... The field moved. I had a question that I got from somebody that I was collaborating with. It was mainly on manufacturing data with their company. One thing that they found very hard is trying to get an internal benchmark for their own stuff.
SPEAKER_01What would you say is the first few steps? Let's say you're working in a legal business or whatever it is, right? What's the first few steps that you do in order to get started and have this benchmark set up, this eval for yourself?
SPEAKER_02Yeah, I think especially like in the commercial setting, it's very important that the tasks that you look at are like as close as possible to what the system is actually going to do in the end, right? And then diversity is really important. I think these are probably the most, like the two things I would focus on first. From the academic side, I always have a bias to making the benchmark as hard as possible.
SPEAKER_02Maybe in the commercial side, you have a bit of a different incentive sometimes to show that your system really performs well. You don't want the hardest tasks in your benchmark. Maybe more for an internal one to see where still the gaps are and where you can improve. But for the academic side, I think that's the most interesting part, especially now that the methods develop so fast. For example, Lexam is almost saturated already and we only published it a bit over a year ago,
SPEAKER_02so it goes fast.
SPEAKER_01So you take like six months to do it and then saturate. This is good. Yeah, because also like I've worked with, I am currently working with like a few clients and like every time we get into like the internal evaluation part, it's always like almost a challenge because like they never done That's in a rigorous fashion that much. And like it's hard for somebody from the outside to kind of like do it for them because they have the most context right about like the problem set
SPEAKER_01and like what they actually want. Right. So they kind of have to help like us do it in some way. But this is usually the part that is taking so long with your work that you're doing right now with the synthetic data pipeline. Do you see like a connection and impact for like benchmark making?
SPEAKER_02Interestingly, I've just reviewed a paper for NeurIPS that suggested creating a benchmark as a benchmark task itself, which I found really interesting. Basically, they measured the LLM's ability of benchmark creation as a task. So that's one interesting side. And then on the legal side, Harvey recently published the legal agent benchmark
SPEAKER_02that was entirely synthetically created. In the legal domain, we always have, like, when we're talking about public documents, like court decisions or legislation, then it's fine, right? We can use those to create benchmarks. But like most tasks that law firms care about, like they use client data, right? And obviously client data, you cannot publish it. So for that, synthetic data is also a great application.
SPEAKER_02And that's exactly what they did there.
SPEAKER_01Cool. Cool. So it's good. Yeah. So like, can I use it as a, a data augmentation mechanism or like from the get go, just trying to optimize for like a few, um, kind of criterion and then like the model will build this on that. And then you evaluate basically like, uh, how close to this criterion it is just like the rough idea.
SPEAKER_02Yeah, so basically they created the, like the whole benchmark is completely synthetically generated. So I think they had like some descriptions of how they, like they want, like of what tasks they want to be present in the benchmark. And then they had the models generate sample documents that would be used as inputs for the agents to accomplish certain tasks. And then they had like rubrics that are being used to create
SPEAKER_00the agent outputs.
SPEAKER_02Yeah, today what we'll cover first, why synthetic data in the first place, right? A bit of a background about pre-training data in 2026. Then how we structured the experiments. So we looked at three axes mainly, the prompt, the generator model, and the source data. Then we ran 333 experiments in total to figure out what moves the needle, what leads to good pre-training data. And then we did some analysis to satisfy our curiosity,
SPEAKER_02like why does it work, what issues are there still. Then, as I mentioned already a bit, running these experiments at scale is kind of expensive, so you want to make sure that you really utilize the GPU as well, and there's a few infrastructure considerations there. And then finally, we ran the final pipeline over 350 billion tokens of fine web edu data four times
SPEAKER_02for four prompts, which created this fine phrase data set of 486 billion tokens. So why synthetic data in the first place? Synthetic data is everywhere now, so here we have an example for GLM, but most recent flagship LLMs heavily use synthetic data like Mnemotron 3, Qn3, 5.4, RC, Trinity for example.
SPEAKER_02NVIDIA even released a huge synthetic dataset called Mnemotron CC that we compare against. CEII used synthetic data in mid-training for GLM 4.5 and small LM from Huggy Face also used synthetic data a lot in post-training.
SPEAKER_01The issue is the recipes are
SPEAKER_02mostly secret. So the frontier labs, they don't tell you how they build their training data, right? They don't know how they filter it, how they construct it, and also obviously not how they use synthetic Also not the Chinese labs that are releasing their model's open weight. And training data is arguably the most important ingredient in building a world-class LLM, but the recipe is still a black box.
SPEAKER_02So if you can't build the data, you can't build the model, and that's why we're focusing on the data side here. Early on, lots of the compute or most of the compute was spent on model training, but now more and more of the compute goes into actually creating or curating training data, and this both in pre-training and in post-training. For generating synthetic data and then post-training during the rollouts for RL, for example.
SPEAKER_02So you might ask model collapse, right? Like there is this well-known paper from Shumailov. They basically said if you're training on synthetic data, at some point your model collapses. Here we have to be a bit careful because the setup that they used was quite constructed to showcase that you can collapse a model, so they used a closed-loop training.
SPEAKER_02Ran inference on the model and then trained the model on its own output. No human signal in between, like no seed documents. And then the model collapsed. But you would not really do this in practice, right? When you actually create synthetic data in practice, usually you start with a seed document. You have a strategy of how you want to do it. And you always mix in real data as well. In Findphrase, we didn't see...
SPEAKER_02And also in the fine web paper before that, I think they trained on certain documents that were already known to be AI generated on the web at that point.
SPEAKER_01We are still in a phase of alchemy and we want to
SPEAKER_02turn this alchemy into chemistry and make it a bit more known how this exactly works. And for that, we use these three axes, the model, the prompt and the data. And we do this with systematic and reproducible experiments. So to give you a bit of the numbers, in the end, we did 90 rephrasing configurations. So 90 times we generated synthetic data and then had 333 evaluate experiments on top
SPEAKER_02of that, where we trained a model and evaluated it on the downstream benchmarks. In total, just for the ablations, this generated 1 trillion plus tokens, just synthetic data, and this used 12.7 GPU years or 111,800 hours to generate. In the end, we used the final recipe to generate these 486 billion tokens of Findphrase. So to start with the headline figure, using our data,
SPEAKER_02you can train a 1.7 billion model, either to 31% better benchmark performance or 3.2 times faster than the best baseline that we Compared to at the time. So this is the table prompt, more about that later. And we mixed it at its optimal 70% synthetic ratio, 30% fine web edu high quality data. So we have a little bit of an animation that I had fun generating with Claude.
SPEAKER_02It's not rendering in the presentation, but maybe we can have a look at it later in the blog post. So part two, what is rephrasing exactly? So the way we see it is you start with a random web document and then you run it through an LLM to produce variants that Change the presentation, but keep the meaning intact. So here you can imagine all kinds of different reformulations, right? You could write the tutorial,
SPEAKER_02write FAQs, turn the article into tables and ask questions about it and so on. So there is a lot of prior work on this, but it was still the alchemy phase. No one really had done a systematic comparison against prompts. Across prompts. Nematron CC, I think they tried like five different prompts, which was the most I can remember. We look at three axis of synthetic data, the prompt, the generator model, and the source data.
SPEAKER_02So for the source data, we have DCLM, FineWeb, High-quality data, FineWeb low-quality data, and Cosmopedia, another synthetic data set by itself. Then we had nine different prompt strategies ourselves and compared also against The nemotron ones and the rewire ones. And for the model families, we used the best ones that we saw at the 1 billion scale here. And for Gemma, we also scaled up from 270 million to 27 billion parameters to see what difference
SPEAKER_02the size makes.
SPEAKER_01I understand that the frontier labs don't want to reveal their data stuff because it's very secret sauce sensitive and stuff like that. And I also understand that there's the different open labs that try different recipes and stuff. But rarely they've been doing an ablation at this store in this, right? Why do you think that is? Why do you think that this experiment now is possible to run before it was not actually done?
SPEAKER_01Is it because it's in infancy and we're still figuring out what made sense and what didn't make sense? Or is it the compute that is too much? What's your thought here?
SPEAKER_02I think for the Frontier Labs, I would not be surprised if they have done similar things internally. I just assume they don't publish it. For example, Google, where I know some people, they just tell me that they can't really publish these things anymore. And OpenAI Anthropic, they didn't really start in the first place, I guess. And for the academic community, I think there have been some works on this, just that usually, I guess, they don't really have the compute to do it at this scale.
SPEAKER_01And yeah, it does seem like, I don't know, they are talking about some aspect of the modelization, I would say, like the Frontier Lab and stuff, but the data stuff, it's mostly silent. We get some information through, I don't know, like Entropic burning all these books and stuff like that, right? But it's never something that is disclosed in such a way. Okay, cool. Thank you.
SPEAKER_02Yeah, so how do we do the rephrasing? We have generator models from 270 million to 27 billion parameters, the models from the families I mentioned before. We have different source corpora that we rephrase. So we looked specifically at different quality sets of fine web to differentiate whether low quality data is enough for rephrasing, for example. So we have this eduScore classifier that Five is the highest score and zero the lowest one.
SPEAKER_02So we have two sets of low quality and high quality one. And then DCLem and Cosmopedia. And each experiment rephrases roughly 10 billion tokens and then applies on a 1.7 billion student and evaluates on 12 benchmarks. We used VLLM for inference, ran speculative decoding because that made sense in the first initial trials that I did, then we also scored each output by The FineWeb Edu and DCLM quality classifiers
SPEAKER_02to figure out if there is like a proxy that could help us figure out the data quality beforehand, before training the ablation model. And then we, yeah, we distributed this to a hundred parallel SLURM tasks and each of those SLURM tasks runs one VLLM model instance. And this enabled us to like scale up on the cluster Like quite well, also allowing other people in the company to use the cluster, right? So just whenever the cluster was free,
SPEAKER_02it would rephrase web data and whenever someone else used it, it would pause. So yeah, how do we measure your success? We just used the ablation methodology from FineWeb because they took a lot of care into making sure that the methodology makes sense at this scale because there's a few gotchas to be aware of. So at the 1.7 billion scale for just 20 billion tokens, These models, they can't really do a lot.
SPEAKER_02So you wouldn't be able to evaluate them with the normal multiple choice setup. You would just see random performance at that point, right? So that's why we use the close format. And then we evaluate on 12 benchmarks across six categories with 3Shot. And yeah, a single seed. So general knowledge, reading comprehension, reasoning, natural language understanding, math and table understanding. So it's quite a broad coverage of the benchmarks that we use.
SPEAKER_02So now to the actual results. First, we'll start with the baselines. So, TCLM performed the best on these benchmarks at this 20 billion scale. And then second is the NVIDIA Rewire is a synthetic dataset from Facebook, and then we have more web dataset. Interestingly,
SPEAKER_02Cosmopedia and Synth from Playus did not perform very well, just a little bit better than the low quality fine web dataset. So from here on, we just compare to DCLM as the best baseline. Then some of these synthetic datasets, they consist actually of multiple different parts generated with different prompts. And they were generated with different models, but just to compare the prompts,
SPEAKER_02we just used the prompts and regenerated and evaluated on our benchmark so we could compare. Particularly for the NemoTron dataset, the performance seems to be mainly carried by this QA pairs prompt, whereas the other ones fall behind. And then there is like the summarize and continuation prompt from the From the etology paper that were very simple,
SPEAKER_02just continue this web document or summarize it. And the guided rewrite prompt from rewire is quite complicated. They use the Lama 70b model for that. And yeah, it performs at the baseline level for us here. Then we saw a recurring trade-off, for example, that certain datasets perform better on certain benchmarks. For example, DCLM performed well on common sense tasks.
SPEAKER_02And then rephrased data, for example, performed well on knowledge and reading comprehension tasks.
SPEAKER_01And I've seen this repeated in the paper and stuff. I know that you may not have an answer here, but just your general intuition, because I have some ideas, but I think you have more of a structured understanding of the problem space here. Why this is? Why when we rephrase and change synthetically the structure of the content, we lose this common sense element?
SPEAKER_02Yeah, I'm very curious to hear your ideas as well, because yeah, I don't really have a good explanation for it. Maybe for Hellaswag, this is about continuation of sentences. Maybe the benchmark sentences, they're created by humans, right? And maybe that's just a different distribution than the LLM. Generations and then the model is thrown off. And for the knowledge and reading comprehension ones, maybe this is like a format thing where for squat,
SPEAKER_02for example, it's like a question answering benchmark. And if we train on FAQs, that may help. But yeah, that's as far as my hypothesis go.
SPEAKER_01My hypothesis is that like a bit in the distribution element is that like you saw off all of the kind of little noise that the humans are like producing, even like the low quality noise that will be like invariably present in the actual test set. So it doesn't know how to handle these, right? Because it never kind of saw it because it did kind of like saw it off. That's kind of how I'm intuitively looking at it.
SPEAKER_01Which this could be tested by taking the rephrased one, adding back some of this noise synthetically, right? And you could maybe see if you're able to get that common sense back. Because if it's really a noise element, and then now because you've seen all these weird edges around the data, it knows how to not think too much about that and go in and answer the task or stuff, yeah. That's my rough understanding of this, but I think this is testable.
SPEAKER_01What's the value problem doing rephrasing? Why do it at all and what is it trying to do?
SPEAKER_02I guess one of the easy answers is that we have lots of seed documents. We have basically the whole internet and if we rephrase it to a different structure, Then we can reuse a lot of the data. Another early hypothesis or reason for us was that maybe we can upcycle lower quality web documents by rephrasing them and synthetically Generating a higher quality document that still keeps
SPEAKER_02the overall content. And by starting with the general diverse web data, you can keep this diversity, right? Because if you don't start with any seed documents, the model collapse would be More of an issue, I would assume. We even see it a bit later with the Quen versus SmallLM analysis we did, where Quen generated higher quality math data sets.
SPEAKER_02Problems when you look at it personally, but then it led to lower quality ablation models trained on for the benchmarks. And our hypothesis there is that the Quent's rephrasing leads to less diversity in the output data because it's just like it's too templatic.
SPEAKER_01I think this is also what prompted me for this to think about noise and little edges that are not there, right? Because I think on this part, it's a bit different, but still with the small versus the quen, you see kind of this element. And here on the raw data and then synthetic, you see kind of a similar situation. Math is a type of rephrasing, question mark. Maybe explaining the flow from the document to a math problem.
SPEAKER_02Yeah. Yeah. So yeah, basically the, the idea was just like turning some article about like some, like let's assume we have like some art, some Wikipedia article, right? Like similar how you would just ask like, um, questions about it. Um, you could also think of generating some math problems about that article, like grade school math, like, uh, some sentence problems you, you would remember from, from primary school.
SPEAKER_02There is this limitation that some articles may just not be suited for math problems, right? And I think that would be interesting future work, right? Similar to my colleague did it for fine translations, where he basically had a gate inside the prompt for the translation. So yeah, a bit of context, he translated all kinds of web documents in all kinds of languages to English,
SPEAKER_02and that can be used to train translation models that go back to these languages in the end. And what he did was he had like in the prompt saying that if this document is like low quality, then don't translate and just like output some flag so they can easily filter it out. And we could do something similar here for the math problems, right? Like if this document is not suitable for math problems, just ignore it.
SPEAKER_01Yeah, here are the nine prompts that we
SPEAKER_02tried out. So, article like writing an encyclopedic write-up or an opinionated analysis as a commentary or a discussion and so on, right? You can imagine all kinds of different structures that you want to use to rephrase the data. And the four ones with the stars were the ones that performed best. So in this case, we use the Gemma 1B model as a default.
SPEAKER_02And we see that the math prompt performs best. And up to the tutorial, we see gains. Compared to the baseline. These are all mixed 50-50 with original data, which is FineWeb, Edu, high quality data. If we would just do synthetic data by itself, we wouldn't see these gains, but we have another experiment showing that clearly later on. Yeah, so it's more of a restructuring as well, not really like a rephrasing.
SPEAKER_02I think we started a bit with rephrasing, just like a simple prompt rephrase this, and then we saw that restructuring actually helps a lot. And we also see that different prompts help on different benchmarks, right? So then to what extent does the rephrasing model matter? So here we look at the generator size. So from Gemma 3, 207 million to 27 billion parameters. Here I was a bit surprised to be honest, right?
SPEAKER_02Like you would expect that the 27 billion model generates the best data and then the 270 million generates the worst, right? For the 270 million, we actually see that, but then We saw that the 1B model generated at least as good data as the model that was almost 30 times bigger. I was a bit curious about why that's the case and to not tell you everything about it yet. But the reason is probably because we measured on a 1.7 billion student model.
SPEAKER_02So if we change the size, we get different results and they have to be adapted. Then another hypothesis we had was, do we need bigger models? Results for low quality data, right? So we rephrased high quality data and we rephrased low quality data, and then we used different model sizes to do that. And interestingly, as well here, we don't see better results with the bigger models. We also see that the low quality data overall leads to a bit worse performance than
SPEAKER_02the high quality source data, but the difference is not that big. To what extent does the model family matter, right? And here we see that SmallLM outperforms all the other models and Quen in this case performed the worst. We think that the reason for that is Like a rewrite heavy data set in the instruction tuning data set for smaller length. Then to what extent does the model generation matter? Here we see what we would expect.
SPEAKER_02We see from QN 1.4, So to recap this part, it looks like you can just use a small model for rephrasing in pre-training. So you just really get better data if you use large models. Then SmallLM is the model family that dominates across PROT. Newer generations of models are better.
SPEAKER_02Cost matters. So if you can rephrase with a 1B model, you're so much faster than if you have to use a 27B model for rephrasing. This makes a huge difference in how much data you can rephrase for the same amount of compute.
SPEAKER_01And I had a question about this part because like at this point, I know you're going to do something different afterward, but at this point you're training like a Quinn-like model here. From well understood, the architecture is closer to, I think, a Quen 2.5 or something like that, if I remember correctly. I think Quen 2, yeah. Okay. So do you think this is a form of self-teaching distillation that is going on here
SPEAKER_01for the formatting of things? And just intuitively, if the architecture is closer to Quen, I would have assumed that a Quen model would have been the best generator for this, but it doesn't seem to be the case. It seems to be like the small one is a bit better on our front here. So what's your intuition here about the closeness between the generator and the actual student?
SPEAKER_02Yeah. Yeah. It's a good question. I think to me, this just makes clear that the data matters more than the architecture, right? I would also assume that the I mean, I'm not a specialist on that at all, but I would assume that the architectures of the smaller lamb, quen, llama and so on are fairly close, but the data just makes much bigger of a difference during the training as well.
SPEAKER_01Yeah.
SPEAKER_02So next, to what extent do the dataset choices matter? Yeah, here we were interested in seeing whether synthetic data is enough on its own, right? Can we just train on synthetic data in the limit, basically? And here we have quite a clear answer. Synthetic data by itself pretty much always underperforms synthetic data mixed with some original dataset.
SPEAKER_02And I think this goes together with the thing we've talked about before a bit, that certain datasets are good for certain tasks, right? And when you can switch, when you can mix in DCLM, which is good for Hellaswag, then you will see an increase in Hellaswag, right? And then if you just remove it altogether in the synthetic data only case.
SPEAKER_01So, yeah, if you look here, right,
SPEAKER_02like table plus DCLM versus table only or yeah, so math only and math DCLM is like the only exception where it's like not better, right? FAQ plus DCLM is better than FAQ only and so on. There is also other work that did this and they came to a conclusion that 30% rephrased and 70% web data gave the best speedup.
SPEAKER_02For us, it's the other way around almost. So for us, we saw that around 70%, depending on the prompt, synthetic data gives us the best results. Table being the one that outperforms in total.
SPEAKER_01This part was very interesting to me. Here it could be multiple reasoning why. You just need to have the proper distribution of the two things. Do you think it's a proportion thing or that the model needs to at least see X amount Of token that are real, right? And then whatever you add on top will just lead to better performance.
SPEAKER_01Even if it's synthetic, it doesn't matter. Do you think it's more like this or literally a proportion where like, let's say like you have a lot of token for like the real one, but you make so much synthetic data that now it's kind of confused and stuff. So which part are you aligning more here on the proportion side or like a threshold of a capacity for the model?
SPEAKER_02Yeah, it's a good question. I don't have the Kang et al work very present. But one reason that I could imagine for them arriving at the different rephrased mix Maybe their rephrase data is not as good as the one we generated. It takes quite a bit of experimentation to find prompts that work well versus others that don't. For example, here the commentary prompt just worked much worse than the math prompt.
SPEAKER_02And it's rephrasing the exact same data, right? Training the exact same model. So the prompt makes a huge difference, right? Maybe for different prompts, the synthetic data almost hurts, right? And then you just want to have more real data, whereas in this case... The synthetic data pulled the other ones up. That could be one hypothesis, but it's also quite difficult to compare across benchmark setup
SPEAKER_02and training configuration. I don't know how many tokens they trained for. It could be a scale issue as well. Maybe they trained for longer or less long.
SPEAKER_01Yeah, that's really cool. Can you go back to the previous slide also? Because this was also very stuck. You have the commentary that kind of stuck, right? And then you have the table mat stuff that is kind of at the top. Is there any other format, wacky format that you've tried to say, I don't know, generating... What did I say? Generating HTML website or even XML type of structure Over the content, right?
SPEAKER_01Same content, but like an XML structure, same content in the HTML structure, or like same content, but in a kind of discussion format, like a forum type of stuff, right? Like a Reddit or Acuneews. Have you explored like different other ways of creating these prompts?
SPEAKER_02Yeah, so I've tried these nine ones. Yeah, just like thinking about how I would rephrase it that like makes sense, right? XML, HTML, I didn't try. Usually in pre-training, you do the opposite, right? Like you extract the text from the HTML and from the XML. And it's probably also not measured by the benchmarks, like to what extent the model can generate HTML or XML. Like in the ones that we measure, right?
SPEAKER_02So there you would probably see no gain for that. If you have benchmarks that actually measure that, then I guess it would be useful. Another thing we tried early was just rephrase in general, right? Just telling it, make this higher quality. But yeah, that's really exciting.
SPEAKER_01Is there also the order of these data sets being used for pre-training that matter for the distribution? That's actually also very interesting. What's your thought here?
SPEAKER_02The order. Yeah. I mean, that's like curriculum learning is a whole different field of study, right? I'm not an expert, but to the extent of my knowledge, it's quite clear that curriculum learning doesn't really work for pre-training. There's no clear gains as far as I know. I think it's very important for RL, I've been told, but... Yeah,
SPEAKER_01post-training, yes. Yeah. I think he has quite a lot of gain, how you engineer the ordering of the different tasks that you're giving, especially for continual learning. I've been talking to Aiden, and he seems to have an impact on it, especially on the... The difficulty of the question that you're asking and ordering them properly, but also this is a whole other mess.
SPEAKER_02Yeah, it's a very interesting approach. I'm also a bit sad that it doesn't work for pre-training, but it's good to see that it works for post-training.
SPEAKER_01Do you think that like, I don't know if a 1D model is too much for it, but like maybe bigger, like adding multilinguality to the format, right? It's the same thing, but like now it's translated in like this other language. I would assume that like. The generator then needs to be kind of a bit better, let's say, than 1B. I think that then will maybe make a difference. But would it be even useful as a synthetic, I would say, element for the model that are being trained?
SPEAKER_02Yeah. That's a, that's a great question. Yeah. I think, um, like, would you do the rephrase, like the, the translation at the same time as the restructuring, um, or in a next step?
SPEAKER_01Yeah. Like there's two ways of, of doing it, right? You either have it as the same thing, but now it's like a rephrase in the language, so we can keep the same format and stuff like that. Or what you could do is you have your nine things, your nine different prompt, but then you Translate all of these into another language. Then you have this bigger augmentation. But I would assume that it would be better to do the first one. You just gain one of it, but you keep the noise and then the particularity around the actual messier text.
SPEAKER_01That's my hunch, but I'm basing it on absolutely nothing.
SPEAKER_02So basically just do the translation, right? Yeah, I mean like fine translations did basically this, but from the low resource languages to the high resource languages, to English basically, because we know that, Language models seem to be similar to humans, that they understand languages they don't know very well, but they can't speak them very well. So they can translate much better from a low resource language to English than the other But
SPEAKER_02the value of this fine translation dataset is mainly for training in translation model. If your goal is to get a dataset that can be used to train better multilingual models, then we would need to do it the other way around. And that's exactly what you're asking for. I think for that, it would be a very valuable thing to do, yes.
SPEAKER_01My hunch is that like, since they understand like these, like a low resource language, but like they're not that fluent to kind of move in it, right? And they would much prefer to have it in, I don't know, English, which they've seen more. My hunch is that like, it would just introduce another kind of noise, right? But that still fits what we're trying to get them to output, right? That's kind of my hunch around it, right?
SPEAKER_01It will create a bit more diversity. But for this to be correct, you need to have a good translator. Otherwise, it will be mostly kind of garbage translation. Yeah.
SPEAKER_02Okay, cool. So you're saying it might not be that bad if translation is not perfect, right?
SPEAKER_01I think it will not be that bad. It still needs to be kind of coherent in structure, right? So that like the other model can kind of pick up on that, right? Yeah. I think like there's different type of translation to different type of like if you do this from like English to Arabic, I mean, that's going to be a pretty huge lift for the model. But like language that are kind of adjacent, I would say, to English might introduce some of the I don't know,
SPEAKER_01the particularity of a language that can be captured for the benchmark. And it's not going to be too hard of a task, but then you create this diversity in formatting that we're capturing with the rest of the format.
SPEAKER_02I mean, yeah, I guess you would need multilingual benchmarks to measure the gain, right?
SPEAKER_01Yeah, yeah, maybe.
SPEAKER_02But yeah, I think that could be a really cool project. Maybe I should consider working on that next. Continuing on the dataset choices. Which non-synthetic dataset should you mix in, right? And here we see that basically FineWeb, Edu, HQ and DCLM, they're like the same basically. It doesn't really matter. And Cosmopedia and FineWeb, Edu, low quality are worse. And interestingly, there is quite a big lift from just training on FineWeb,
SPEAKER_02Edu, high quality data to mixing it into like synthetic data. Whereas for DCLM, we don't really see that gain, which I was a bit surprised by. Then here we test what happens if the mix-in is the same as the source. That means we have the source, we rephrase low quality fine web edu data here, and then we mix in the same data again.
SPEAKER_02And the same for Cosmopedia, DCLM, and high quality, right? Here we see that, yeah, FineWebEdu, high quality, and DCLM just clearly beat the rest. So it looks like the source does matter. But if we fix to a strong mix-in, I think in this case we fix to fineweb edu high quality, then the source data doesn't really matter that much anymore.
SPEAKER_02And this is a really cool result, I think, because this tells us that the data wall that we've been hearing about a bit is not really an issue, right? You can even take very low quality data here, like FindWeb Edu low quality is really the worst of the worst almost in terms of web data available. It's Edu score zero to one, right? It's really bad.
SPEAKER_02But if you rephrase this and mix it with high-quality data, you can get almost DCLM-level performance, which is a cool result, I feel. So yeah, this opens up a much larger pool of data, because DCLM, I think, they start with an initial pool and then filter it down to less than 1% of the data that they actually use for pre-training in the end.
SPEAKER_01I haven't looked at like fine web, like low quality, but like at this point, what is it that we're generating? Like, uh, if it's like, this is low quality, it's like, is it more of a sort of literally desolation of, uh, whatever the generator is, the one B and that's kind of what's, what's, uh, what's going into the, the model. And then like the edu low quality just doesn't matter anymore. Like, is this, this, or like, it literally is fixing these, um,
SPEAKER_01What's your thought here?
SPEAKER_02To me, I don't think it's distillation because the rephrasing is being done by a 1B model, right? I mean, the 1B model is trained for a long time and the student model is from scratch. So it could be, I guess, yeah. How would you test that? I don't know.
SPEAKER_01And if it's distillation, a bigger model should get better performance, right? Or maybe the capacity of the model is capped at 1B and stuff. So this, I'm not sure. But then what you could test is just try to lower the quality even more. At some point, if you're just feeding it pure garbage, like literal, literal, you stripped away all information, and then you shove it through this model and say, this is interesting data, you should go ahead and make these in different templates.
SPEAKER_01And you see what happened. And if it is able to boost the performance, then you could theoretically say that that portion of the gain from this literal noise Data that has a structural language, but there's nothing in there for sure. We removed all possible information. This is the portion that can be attributable to distillation. And this other portion is the actual gain from the dataset. And you can have the dataset being varied here.
SPEAKER_01I think that will be a way to test this out.
SPEAKER_02I think there is also work on like literally training on like random stuff, right? Like in pre-training. I think even there they see like surprisingly strong models.
SPEAKER_01The model just want to learn, right? You fit it, whatever.
SPEAKER_02Yeah, so then I think another natural question is to what extent does it help to combine different prompts, right? But here I was a bit surprised about the results. So I would expect if you combine all the different datasets, you would get better performance. And we see it to some degree, but not really clearly, right? All the prompts, it's just a little bit better than just using the math prompt together
SPEAKER_02with FineWeb high quality. I think the interesting result here is that all prompts, they can basically almost replace the source, right? If we have lots of different synthetic data with different prompts that are all good, we don't need the high-quality source data anymore.
SPEAKER_01We're almost at the math-level quality here.
SPEAKER_02Another thing, just like a small experiment I ran out of curiosity was the typos. The rewire paper, the prompt there was full of typos. And I was like, does this make a difference if I improve it, if I fix the typos and the grammar? But interestingly, it turns out to be the opposite way or no difference at all. So for the 1B model, they engineered the typos very well,
SPEAKER_01it looks like.
SPEAKER_02And yeah, so to summarize here, It really looks like prompt design is the most important part, maybe a bit sad as a result but that's what it is. Size, it seems like beyond 1B, it doesn't really help that much, maybe 4B, but 12B or 27B doesn't improve. Then you should always mix with original data.
SPEAKER_02Don't just train on synthetic data alone. And the source seems secondary if you have like a strong mix in data set. So let's look a bit in more detail how and why this works. So first we were interested in seeing if rephrasing like leaks the benchmark.
SPEAKER_01This is so funny because like on Twitter, there's a guy that has the same question. He says like, what about benchmark contamination? Have we covered that yet? We're literally here now.
SPEAKER_02We ran a 10 gram overlap audit of the benchmarks to the rephrased corpora, and we just sampled 5 billion tokens for each of the corpora. The reason for that is that depending on the prompt, there is different amounts of tokens being generated. So we always started with 20 billion tokens input data, and then some models, some prompts lead to much more rephrased data than others. And yeah,
SPEAKER_02we see that the rewire is like the most contaminated, but still it's like at a low rate. So that's like the number of documents per billion training tokens. And so, for example, here, like the FindWebEduHQ also is contaminated to some degree. And the rephrased corpora that we produced are not... They're on average less contaminated. There's just one that is more.
SPEAKER_02Then another question is how much is seed noise? We have a data seed and a training seed, like model initialization seed fixed. But what if these seeds are lucky for some prompts and unlucky for others? So we ran the same recipe across nine seed pairs, so three data seeds and three model in a And across four student sizes. And we see that the difference is very small.
SPEAKER_02So just like a gain of 0.05 is like already way above the noise. It depends a bit on the benchmark. So for drop... The noise is much bigger than for Hellaswag, for example. Also, the model initialization seat dominates the noise much more than the data ordering seat. Here we see an overview of all the rephrasing runs plotted across GPU time and
SPEAKER_02the aggregate macro score on all the benchmarks of the student model trained on the dataset, and we see that the The Pareto frontier is dominated by the small models. So, yeah, like we don't really see big gains like as we've seen before, right? Like from rephrasing with huge models that generate a lot of data. For example, here,
SPEAKER_02like we spent a year of compute for one rephrasing run and it is worse than spending one week with this other model, right?
SPEAKER_01Oh, this is kind of crazy. This is insane. And I think this has to do with maybe the limitation of the 1B that is addressed with the other experiment that you've done, right?
SPEAKER_02Yeah, exactly. So this ties back a bit to the original question that you asked, how to do research. And I really wanted this to work, but it didn't, unfortunately. The current setup is really time consuming, right? You first have to generate 10 billion tokens. As you see here, if you choose the wrong model, it takes you a year of GPU time. And then you need to train a 1.7 billion model on 20 billion tokens,
SPEAKER_02which also takes three hours on eight nodes, so 64 GPUs for three hours. That's also quite an investment, right? And only then you still need to evaluate, right? It's quite an investment for each run. So it would be great if we could just have a small proxy like the quality filters that were used to create the Web Edu or the DCLM pre-training data sets.
SPEAKER_02But unfortunately, it doesn't really work that well for synthetic data. So the highest correlation with macro average scores after the benchmark is the DCLM score difference between the input data and the synthetic data, which is 0.6. Not bad, but still not great. And the EDU score,
SPEAKER_02like if we just look for the output score from the EDU classifier, there's like No correlation at all. Interestingly, if we have a high output EDU score, we actually get bad benchmark performance. So the EDU score even seems to be sometimes negatively correlated with the final benchmark performance, as we can also see here.
SPEAKER_01I've noticed that LM have a favorite vernacular. Does that vernacular survive rephrasing, like Opus, for example, really like load-bearing? Do you see, depending on which of the generator, if it's using more the ticks of these models, or there's not that much difference at the scale?
SPEAKER_02Yeah, I haven't noticed that, but maybe I need to look into the data a bit more.
SPEAKER_01And there's another question that says, do you think that the technique like rephrasing could be contributing toward the model better understanding a true language semantic invariant to the exact word choice? I mean, like, I think like a bit similar to my thought about like, it's solving And it's like more standardizing. I mean, the language that is being used and like, because there's no different format, like, do you think that this plays a role in this? I mean, my worry about the standardization is a bit like the loss of diversity.
SPEAKER_02Similar to the thing we've seen with the Quen model, right?
SPEAKER_01But yeah, the original hypothesis
SPEAKER_02was that the original web text can be very noisy and full of grammar errors or typos or OCR errors and stuff, and that we can get rid of those. And this generates more high-quality data that improves for pre-training performance. But yeah, I'm not sure about the exact mechanisms behind it.
SPEAKER_01Yeah.
SPEAKER_02So we also looked a bit at diversity metrics. So can maybe diversity metrics can predict performance. There is different ones like Vendy score over sentence embeddings of the output. This helps on some benchmarks, but not on others. On the aggregate score, it doesn't help. There is gradient diversity, like GVENDY score, and this is the best predictor That we found for reasoning performance.
SPEAKER_02So if we go back, we see that for reasoning, there's like no really good score, right? But the GVENDY score works well for that one, but then it doesn't work for others. So maybe like if you combine different scores, then you could achieve like a higher than 0.6 correlation. But yeah, I don't know. To me, it seems a bit over-engineered and a bit Like overfitted in the end. So yeah, I didn't do that.
SPEAKER_02So yeah, it looks like there really isn't a good proxy that you can use and you really need to train and evaluate each dataset independently.
SPEAKER_01It looks like, unfortunately.
SPEAKER_02Then another thing we saw, like we talked about the 1B generator a lot, right? So one reason for that could be that the student model that we train is just too small, right? Like maybe if you train a 1B model, then it just can't learn from like better data generated by the bigger models. Right. And when we look at this, we train student models of different other sizes from 0.5 billion to 6.2.
SPEAKER_02Billion on the exact same data mixes. And then we sweep the Gemma 3 generators from 270 million to 27 billion on three different prompts. And again, always mix in the FineWeb Edu. And what we see here is basically the bigger the student gets, the easier it can differentiate between good and bad data. So for the 1B model, what we saw was that like after the 1B generator,
SPEAKER_02it just basically squashes everything together, right? It just can't differentiate anymore. And same for the 0.5B, right? Here, it can't even distinguish the 1B model from the 270 million model, and the difference between the smallest and the biggest model is just very small. But then when we go to the 2.9 billion and the 6.2 billion, we see a much bigger difference, and here we actually see the
SPEAKER_02The 12B model performing quite well. We see that the 207 million model across all prompts and student sizes is really bad. The 1B model as a generator is quite good already, much better than the 270 million. And then if we train a bigger student model, then we see that bigger models actually have benefits.
SPEAKER_01For me, this was also super interesting. When you look at the chart, the gain with the bigger generator, at some point you have to do the trade-off with the compute that you're taking because it jumps. Because the 270 still is doing something. It's not doing nothing. But do you think that like purpose built trained 270 million parameters, right? Like that is specifically like a fine tune or something like that to be a very good generator.
SPEAKER_01Do you think that there will be gain over there to kind of climb up to the I don't know, the 4B and stuff like that. Because then you would just need to train and make sure that whatever prompt that you're using for the translation here from one data format to another is well done, right? But then you have the gain of having this very compute efficient model. I would assume it's The perfect task for a small model because you have
SPEAKER_01the information and then you have the output. There's very little unknown that you have to work with here. You just have to be able to understand the different templates. What do you think?
SPEAKER_02For sure, yeah. I think here I just focused on prompt engineering, right? Because the design space was so huge already. But I think this is a very interesting future work. Concurrently, an intern at Huggy Face did something similar where I think he fine-tuned. I don't recall the results, but yeah, I think this could be really promising. I agree, a 270 million model should be able to do this, right? It's not like the task is super hard.
SPEAKER_01Maybe there's some templates that are harder than others, let's say the matte one, maybe it's like the hardest and stuff, but then you can kind of mix and match the different model size and you don't have to kind of use like the 27B for like just making tables, right? Maybe there's a trade-off also at like the different difficulties that you can Yeah,
SPEAKER_02it also just matters a bit like on the prompt, right? Like for the math prompt, we see the 1b model being the best even with the small student size, right? Also, one thing we saw in the plots here before, right? Like the student size just makes a huge difference in terms of the macro Macro score on the benchmarks. I mean, it's not very surprising, I guess, but still, after 20 billion tokens, the difference is quite big.
SPEAKER_02And the generator size. The data doesn't make that big of a difference. You can still scale a larger model by quite a lot, but just having a larger model by itself, you see quite big gains.
SPEAKER_01Then also
SPEAKER_02here we investigated how chatty the models are with different prompts. So overall, the table prompt led to very short outputs and the FAQ and the tutorial ones led to much more verbose ones. And also the variance across models was much bigger there.
SPEAKER_01Yeah, we also looked a bit about compression ratio versus downstream performance.
SPEAKER_02Very early in the project, I chatted with a friend of mine and his hypothesis was that synthetic data generation is basically like Doing compression or like because of compression, it leads to better pre-training performance. Like you start with a certain amount of information, say like in a thousand tokens, and then you rephrase it into 200 tokens and you still have the same information or most of it, but now represented in 200 tokens. And since you still train for 20 billion tokens,
SPEAKER_02you have much more information in the synthetic data now than in the original one, right? That was his hypothesis. It's a bit difficult with our results now because for some, we do see that relationship, but then also it goes in the other direction. We just see very big variance in the space where the compression happens.
SPEAKER_01So I can't really answer this question, unfortunately.
SPEAKER_02Yeah, I've talked a bit about this already. So, like, we were a bit surprised when we looked at the results, like the output from QN and smaller LAM. When you look at the QN output, it looks great. And when you look at the smaller LAM output, it looks weird. And then you see the small LM outputs being much better on the benchmarks. So we tried to figure out why that's the case. And yeah, the hypothesis we arrived at was in the end that the small LM just creates much more diverse outputs.
SPEAKER_02Outputs and diversity seems to be important for pre-training. So, for example, we see that Quen only has 40 different 10-char openings, whereas SmallLM has like Almost 2000 ones, right? Then we also looked a bit at the math output. So for example, SmallLM has like in 23% of cases, there's no numbers in the math rephrased data.
SPEAKER_02Whereas for Quen, it's just 0.1%, right? Like we see that Quen follows the instructions much better
SPEAKER_01than SmallLM.
SPEAKER_02We also checked the accuracy of the equations and saw more accurate equations for Gwen and more valid math overall, but still for pre-training, this doesn't seem to matter. For pre-training at this stage, it's probably just not about correctness, but yeah, more about that.
SPEAKER_01And does these results hold for small and Quinn as the model grows in size? For the student, if the student is bigger, let's say it's a six or whatever, does this still hold that the diversity of the small one doing whatever is better than Quinn just following the instruction?
SPEAKER_02That's a good question. That I don't know. I haven't run that experiment. Yeah.
SPEAKER_01Because for me, this is the dumping down with the numbers, I think, almost make me think that the problems are now more in the capacity of the 1B model to kind of understand. I'm thinking more from a post-training curriculum learning lens here where The problems are easier and then like you can just kind of like figure it out better than like just Quint being this kind of distilled kind of god model that like knows much better than like this poor one beat train from scratch.
SPEAKER_01And it's like just putting numbers everywhere and like I don't understand numbers yet. Right. That's my that's like the rough feeling I had when I saw these. But it doesn't explain the diversity of messed up information. Maybe it's adding enough noise with simple enough structure and output that it can pick it up and remove the noise and say, yeah, this is what matters for me now. Versus the other one is like, Kind of a ruthless teacher in some way. We're like, no, no, this is the thing that you need to understand.
SPEAKER_01It's clean. This is it. But it doesn't have enough diversity to figure out the hardness of it. And it just doesn't get it, right? Well, the other kind of climb up a bit. And even if the teacher is messy, the problems are kind of more in the ballpark of this poor train from scratch 1v.
SPEAKER_02Yeah, that's a good explanation. Maybe it's too hard, right? It can't learn. Math is just at this training stage at 10 billion tokens or something that it has seen, just not possible to solve. And since the small LLM output has less math in it, Yeah, so some summaries about this. Yeah, we tested whether the results are within the noise, but we can pretty confidently rule this out.
SPEAKER_02The student scale matters a lot, so we need bigger students to be able to differentiate between bigger generation models and smaller ones. Unfortunately, quality scores can't be used as proxies, also not diversity scores, even though G-Wendy helps for finding good reasoning data. So there is unfortunately no substitute for training so far. And it looks like diversity is more important than polish,
SPEAKER_02at least for
SPEAKER_01the math example that we looked at.
SPEAKER_02This is the content part. Now it's about how we made this run. So we're looking a bit at the infrastructure now. So each experiment rephrases 10 billion tokens. And as you've seen before, right? If you choose the wrong model, it takes you a year of GPU compute and also the serving setup makes a big difference, right? Since I ran this for 90 configurations, I wanted to make sure that I don't burn months of GPU time For nothing
SPEAKER_02when I could have optimized it a bit more before, right? BLM and SGLang already are like quite good at serving models fast, but still like configuring them correctly can make a huge difference. Leandro and Carlos from Huggy Face I had a challenge together with Google recently about serving Gemma really fast and they had like a challenge with agents optimizing like throughput for Gemma and I think they pushed it like fourfold within a few days with
SPEAKER_02a few optimizations there. So there is quite a lot of potential here. I didn't go as far, but still there is quite a lot that can be done. How did we run this? We used Datatroth for generating the data at scale. So the way it works, we start with a HagiFace hub dataset. We have a reader, then a transformer, which makes calls to an inference engine like VLLM here.
SPEAKER_02This also supports more More complicated rollouts, like where you have like a verifier inside as well, and then you reject certain outputs and so on. But here we just wanted to optimize for throughput, so we had the most simple setup possible. And then you write again to Huggy Face dataset usually, right? You can run this locally or on the Slurm cluster as we did it for scaling it up then. Here we ran like a throughput sweep across different models.
SPEAKER_02And we saw that for some models, you can speed them up quite a lot. For example, for smaller M2, 1.7 billion, the model used for generating the final fine phrase data set, we saw a 1.75x speed up in the end. So I had two tiers here. First, tweaking tensor parallel, maximum sequences, and maximum batch tokens. And then in tier one, afterwards, the GPU memory utilization and speculative decoding.
SPEAKER_02Different bottlenecks need different fixes. So for large models, they seem to be more memory bound. If you add more tensor parallelism, even though the model fits on one GPU already, it adds to KVCache headroom and you can fit more concurrent sequences and that leads to a speedup. And for smaller models,
SPEAKER_02This type of speculative decoding helped here, like ngram and suffix, where you look at the inputs and then you just copy them over and verify with the model how much of the input is correct. And for the small models, we saw quite an increase with So with the small LM2, we arrived at 9200 tokens per second per GPU in the end.
SPEAKER_02And for, we also managed to optimize like GPT OSS 120 billion. To 6,000 tokens, so we could also have run that, would not have taken it much longer. You see there's like quite a big gain for each experiment in terms of GPU costs that can be saved. There's another visualization here, but viewed better in the blog post. We also added some convenience features for automated updating of dataset cards
SPEAKER_02that show you the progress of how the data is being generated, which can be helpful if you run it for multiple days or weeks. So finally, we arrived at the completed dataset. We used the smaller than 2, 1.7b instruct model that won the family ablation. And with speculative decoding, we arrived at 9,000 tokens per second. We used the fineweb edu as a source dataset and used the four best prompts we had
SPEAKER_02and ran it on 100 H100s in parallel. So we generate around 3.3 billion tokens per hour. In total, we had 339 million documents, each rephrased four times with the different prompts. In the end, we arrived at 486 billion tokens rephrased. So 100 GPUs, we get to 920,000 tokens per second. So 3.3 billion tokens per hour takes 612 GPU days in total. So around six days to...
SPEAKER_02To really generate it if we had access to 100 GPUs
SPEAKER_01at all times.
SPEAKER_02And here are a few examples of the dataset, but it's also better viewed in the blog post. Again, here to compare to the baselines with the different prompts, the table one is the best we found in this case, but the math is very close and FAQ and tutorial are also still quite a bit better than The best synthetic baselines we compared to. We also compared a bit the cost per token to the peers, like Cosmopedia,
SPEAKER_02for example, generated 2.5 million tokens per GPU hours and rewire only 1.1 million because they used a much bigger model and didn't optimize as much maybe. So we used 24 times less compute, but generated more tokens. So to conclude, prompt design wins. It's by far the biggest lever. Structured prompts like table, math, FAQ, format, tutorial work quite well.
SPEAKER_02Always mixing raw web data. Synthetic data alone loses on common sense tasks. 60 to 80% synthetic data worked the best for us. Small models seem to be enough. 1B or 4B models seem to be good. If you're training like a bigger student model, then it makes sense to use bigger models for synthetic data generation. And diversity seems to be better than or more important than polish
SPEAKER_01at this scale.
SPEAKER_02There's still many open questions. So for example, like, can you repeat data more often without performance loss if some of the repetitions are rephrased, right? So is the 60 to 80% optimum? What does it depend on, right? Does it change with larger student sizes or longer training? I fixed all the generation parameters, so what happens if we change temperature or others?
SPEAKER_02Best of n filtering, we could generate multiple. Rollouts for each example and then have a verifier that scores and only keeps the best one, but obviously would be much more expensive again. Could use tools like prompt optimization to improve the rephrasing performance. I did that a bit, had negative results in the beginning. And longer pre-training. So far, I've trained for 21 billion tokens,
SPEAKER_02so I don't have to generate too much synthetic data and that I could have fast experimentation cycles. To what extent does it hold at longer scales? I did an initial experiment at the 100 billion token and it held. So it was like pretty much the same ranking, which is good to see. But what happens if we scale to a trillion?
SPEAKER_01I don't know.
SPEAKER_02So we open source everything, the whole code, all prompt templates, evaluation details, fine phrase data sets, ablation data, generation framework, and all the results. Everything's open source. You'll find it and all the links in the paper or on the blog post. And here as well, happy to share the slides as well later. Thanks a lot.
SPEAKER_01That was awesome, man. This is great. It's so thorough. I mean like all the different permutations you've done and then there's still so much to do, but then like the fact that like you went and then you did all these ablations and all these different experiments and you still kept everything kind of coherent. And order. That's super cool. These are actually my favorite experiment because, I don't know, you can ask so many questions back to back and still get a lot of insight.
SPEAKER_01But then you can distill the stuff that matters afterwards and then kind of sprawl more questions, right? But with a better ground that you're in. Just like your general thought here about, like this is for pre-training, right? What are you taught with the usefulness of synthetic data But on the post training side, right? Did you have early experiment or like taught around that already?
SPEAKER_02So I'm not really well versed in post-training, but members of the team use synthetic data quite heavily for post-training. I think there was recent work called QED Nano where they generated lots of reasoning traces with big models and then fine-tuned the model there. And I think they were able to match Like Gemini 3's performance on math reasoning tasks like IMO.
SPEAKER_02So, yeah, I think you can use it to distill knowledge from bigger models to smaller ones, for example.
SPEAKER_01And also my thought here is that like it would be very useful kind of documentation in an environment to have like this sort of like on the fly rephrase or like in different like structure, but still kind of keep like the The overall problem set that you're using. So it can make the problem easier a bit by taking you step by step as a tutorial, or it can make the problem a bit harder by asking it as an actual problem, or handling it as a discussion.
SPEAKER_01But then you distill it down to like not thinking too much about the format, but thinking about like the actual thing that you want the model to be training about, which is pretty cool. What's next on this direction for you, like on the field and stuff like where you want to put and bring this next? I think you're trying to get the paper accepted at the conference, right?
SPEAKER_02Yeah, we got some good reviews, so I hope it will work out. Yeah, I think you had a really cool idea about making it multilingual, like basically find translations in reverse to generate a really big pre-training data set for multilingual pre-training. That could help like low resource languages a lot. I think that could be a very cool direction. At the moment, I'm working more a bit on harness engineering.
SPEAKER_02So I helped out a bit on a project called Physics Engineering. In turn, that was about engineering a harness to solve physics problems much better. So we were able to push performance of Gemini from 17% to 30% just by using a different harness, which seems to make a huge difference. So quite excited about that work currently. But synthetic data also seems like a really cool direction, so I might go back later.
SPEAKER_01Cool. I mean, like everything is kind of connected. I was talking to Florian from Prime Intellect and like, I don't know, like the harnesses, like the evals, the benchmark, the environment, right? It's all, it's all roughly the same structure. It's just the infra. Behind that is a bit like it might be a bit different. But at the end of the day, just like trying to give the right format and data to the model so that they can just kind of learn or to evaluate them in like specific configuration. Really cool stuff, man.
SPEAKER_01Thank you a lot for coming and going through all my questions.
SPEAKER_02Sounds great. Amazing questions. Was a lot of fun.
should you do a PhD? should you leave your software engineering job for grad school? how do you get into AI research coming from industry?I get these questions all the time, so I sat down with Andrew Drozdov, senior...
most robot datasets give the robot one instruction for a whole episode, like “clean the table”, and then a few minutes of motion. the model has to figure out by itself where one step ends and the next begins which is...
there is this kind of renaissance in robotics / physical ai at the moment and it's very stimulating.things finally just work ™️I had the pleasure of chatting with two experts from HuggingFace immersed in this...
it’s very interesting to see where next-token transformers still fall short (like the path-star graph problems) while crushing problems that look even more daunting.I had the pleasure of chatting with jayden teoh from...
RLM + continual harness + multi-agent communication is what compose the prime agent harness developed by prime intellect which now sits at a gazillion stars on github (22.3K).I was kind of already mesmerized by the idea...