AI Engineer World's Fair 2026
The Messy Reality of Scale: Synthetic Data and Pre-Training
About this talk
Marah Abdin and Robert McHardy describe how poolside combines synthetic-data generation with large-scale pre-training for its Laguna coding models. Abdin explains rephrasing, code and STEM pipelines, multi-agent orchestration, validation, and a 13% synthetic-data share in Laguna XS.2 pre-training. McHardy details failures involving defective GPUs, silent data corruption, exploding gradients, and insufficient BF16 precision during tensor-parallel accumulation, before previewing the larger open-weight Laguna S model.
Chapters
- 0:00Introducing poolside and the Laguna model family
- 2:06Why synthetic data complements organic training data
- 3:49Rephrasing, code and STEM generation, and pipeline composition
- 7:07Cross-domain porting, multi-agent conversations, and orchestration
- 9:03Large-scale pre-training failures and GPU corruption
- 11:43BF16 accumulation and tensor-parallel numerical precision
- 13:06Open-weight Laguna XS.2 and the larger Laguna S preview
Talk transcript
- 0:00
[upbeat music] Hi, everybody. Thanks for coming to our talk.
- 0:15
Uh, my name is Marah Abdin. Uh, I'm, uh, I'm from Poolside. I'm the synthetic lead for, uh, our, uh, data team. And, uh, today, my colleague Robert and I will be talking a little bit about, um, some of the challenges that we've seen as we scale our models, uh, over here.
- 0:33
Uh, particularly if you haven't heard, we've switched from recently from, uh, releasing our models towards enterprise to also releasing towards, uh, you know, uh, everybody. Um, we've actually put out two open weight models, uh, that are on Hugging Face a few weeks ago, uh, with Laguna M and Laguna XS.
- 0:50
We also put out a tech report, which has a ton of detail if you're interested. Um, as you can see here by the Laguna M.1 and XS.2, uh, this, uh, this is, this actually is because, uh, we have switched out quite a b- few things, um, between those two models.
- 1:06
And so, um, big flavor of this, uh, talk is going to be about kind of how did we transition from, uh, one to two. And in fact, we've continued to do so, and, uh, now we actually have a newer version and, uh, Robert will give a sneak peek about, uh, soon-to-be-released model. [lip smack]
- 1:21
Okay. So I will be particularly talking about synthetic data, uh, part of things. So, um, there's three things that we did on the data side to, uh, kind of resolve some of the issues that we've seen with scale.
- 1:33
One is that we implemented an auto mixer that, um, basically just gives us a chance to do a cheaper sweep on clusters of our sets before moving on to more expensive, uh, experiments.
- 1:44
And then we improved, we just rethought our, uh, sampling of web data for high recall.
- 1:50
Um, and then the third one is that we relied a lot more on synthetic data, uh, in a f- in a few forms, which I will go into. Okay.
- 1:57
So before we kind of going into what does that mean and what have we done, et cetera, um, one, uh, why would we kind of... It's, it's, it's sometimes it's fair at least to ask why synthetic data.
- 2:06
And, uh, the thing is that, [lip smack] uh, at least at Poolside, we don't see it as a way to replace organic data. I don't see it, so in the current state of the world at least.
- 2:15
But, uh, it is a way to kind of complement it. And the thing is that organic data has a lot in it that is basically kind of implicitly hidden.
- 2:23
A lot of things that could teach the model are not very presented in the most optimal way sometimes. And so synthetic data gives us, uh, a track to extract some of those features and then project them on some new planes.
- 2:34
And this is how we get to expose, um, implicit rationale, implicit planning, implicit structure, and a way for us to fill gaps and regularize not only how we present the tokens, but also how we are teaching the model.
- 2:46
Um, for XS.2 in particular, we settled on thirteen percent of the mix. This is only pre-training stages before post-training. Um, and since then, we've just been continuously generating more data in a bunch of directions.
- 2:57
Now we have a six trillion token, uh, corpus that's continuously growing. Okay.
- 3:03
Um, so yeah. So, uh, uh, w- kind of what I, uh, I, I just said is that we saw some, some, I guess, uh, limitations f- switching from Laguna M to, uh, point one to, uh, or point two models.
- 3:16
And so one of those things is that we basically be- it started on data. This is really not a, a crazy kind of problem. We tr- very intuitively started from a place on a smaller scale where we were, um, we were basically focusing on quality versus quantity, um, maybe a little too much because eventually when we started
- 3:35
scaling our models, we had to scale our training budget. And with that, uh, came some limitations because we started hitting repetition, uh, like non-optimal repetition on some of our higher quality data, which saturated the model a little too early.
- 3:49
So, uh, we-- one of the ways that we've, particularly for this reg- like a token uniqueness problem, uh, we relied on, which is a very common form of synthetic data, uh, rephrasing, uh, which, you know, you just, uh, might heard it in like Beyond Web, for example.
- 4:05
It's become pretty trendy these days. Um, and you can see here, uh, that, uh, uh, you know, this is a, take these oblation. This is an oblation result, so take the numbers with a grain of salt.
- 4:15
But what persists pretty consistently is the diff between using the orange would be just the seeds with repetition, and then the green would be replacing some of those repeated tokens with, um, higher, like with a multi-mode reverse, or at least, uh, yeah, all of them are at least reducing the repetition.
- 4:31
Um, and so, uh, for rephrasing in particular, we did do the, you know, what everyone's doing with the, you know, generic kind of multi-mode, very scalable pipeline, but we also took it a step far and, uh, we did two other specialized pipelines, one from to go from raw code to code and text and one to go specifically
- 4:49
for STEM data, just because this is a very cheap, scalable pipeline. So it kind of, you kind of have to rely very heavily on the seed, and we push a little further on that for the STEM documents.
- 5:00
Okay. So, uh, uh, okay. So, uh, if you kind of think of everything as a kind of in a, uh, modular way, uh, you can think of every synthetic data pipeline is composed of, uh, the same six components.
- 5:14
And so you have your seeds, your primary inputs, your metadata, your secondary inputs, your generator function, which can be an agent with tools or an LLM, you know, with some prompt funk- with some prompt template, and then some supplementary functions like filters and validators and so on.
- 5:26
And really, you can compose just about all pipelines from like very simple to very ex- to very expensive pipelines like this. And on, on that note, and kind of, uh, we've, we have covered quite a bit of a wide scope o- on the, the axis of complexity, and you kind of can think of it if at one
- 5:40
end you have like the cheap, scalable pipelines that have used smaller models and can get away with it be- because they're seed heavy, um, examples of phrasing. And then on the other end, you have more complex pipelines with, uh, a little more orchestration in the workflows.
- 5:54
Um, this is reserved when the s- like we're building on something that's worth it- Educational data, uh, but really it's, uh, this is how we're not blocked or limited by whatever teacher model can do, and this is how, um, we can be ambitious in our synthetic data.
- 6:09
Uh, because the rule of thumb is if a task is too hard for your model, then your model will start to fall on its bias, lose correctness, lose diversity.
- 6:17
So break down the task, make it simpler. Um, and, uh, uh, yeah. Uh, I will give some examples of kind of shapes, uh, rather than just like, uh, something more concrete about how do we use this, uh, this modularity.
- 6:32
And one shape is the form rewriting, it's just rephrasing. We already talked about this. Multi-stage, uh, pipelines and multi-stage, uh, workflows. Basically, this is, uh, what I also just said.
- 6:41
You take a step and you break it down into multiple steps. Uh, you can, uh, aggregate, uh, the process and it- it slowly build up the, the generation. Um, an example of this where if you wanted to generate a novel, for example, it's, uh, you could generate one chapter at a time, but you could also, you know,
- 6:58
take it a little slowly. One first like generate, you know, uh, I don't know, the setting, the character names, the, the character styles, the plot, um, you know, some twists.
- 7:07
And then, and then from there go into generating chapters one by one. You will absolutely get a better novel. Um, and okay. Third is cross-domain porting, which really is just like trans-- like moving from one mode to another.
- 7:20
Uh, example would be chang- like translating code. Another example would be, uh, something we did, which is take our math problems and convert them to code. The last one is, um, multi-turn roleplay.
- 7:29
And by that, all I mean is that instead of having kind of a very one, like very senior or, or linear, uh, or even non-linear kind of, uh, view of things, you have more of an iteration.
- 7:38
This encapsulates pretty much everything. Uh, and by that, uh, uh, like an example of that would be multi-turn chats when you have two agents talking to each other, or a task evolution pipeline where, you know, you have a judge and an evolver going back and forth for some K amount of time.
- 7:52
Um, and so on. Okay. So lastly, uh, forwarding off to Robert, I do wanna kind of just mention that we, because of the modularity of the way we think about this, we can implement infrastructure that's pretty configurable.
- 8:04
Um, so this is how we present Hive. Hive is basically a way for us to easily, um, that, uh, to easily construct, uh, generations where now you have, uh, a queue of agents that you define.
- 8:16
Each one has, you know, its prompt, its parameters, its model, et cetera, inputs, outputs. But it also has when, uh, you can configure when it enters the queue, when it exits, how many, how frequently they come in.
- 8:25
And then we have orchestration in the middle between agents. And with this orchestrators are really useful because they give you more flexibility and kind of presenting a hierarchy between the LLMs that we're generating is very, uh, th- th- it's, this is how you police them basically, but also give them some, some form of creativity and dynamically change
- 8:41
the instructions for the next agent, or choose which agent goes next, which agent skipped, and so on. Um, and lastly, you have the supervisor, which basically someone who polices the orchestrator and has more of a global view.
- 8:53
Um, cool. Okay. That's, uh, that's it for me and Sandiga. Hope you learned something interesting. Handing over to Robert for, uh, pre-training scale.
- 9:03
All right. Thank you, Marah. Um, 'cause I will talk a little bit more on the, um, actual pre-training side rather than just data. Uh, I liked in the previous talk, um, the, the speaker made a point that we should treat different data mixes, uh, holistically, different training stages.
- 9:19
I want to make the same point that we should treat, uh, data and implementation of your training code base, uh, correctness of it and so on, also holistically. Uh, if you've got data that sucks, you can't train a good model.
- 9:30
If you've got a training code base that sucks, you also can't. Um, so, uh, I specifically focus on architecture work on, and distributed training and so on. Um, and the way we, we look at things in my team is, uh, we don't trust anything.
- 9:43
There are so many things that can go wrong when you scale models to billions of parameters, to hundreds of billions of parameters, um, train on thousands of GPUs and so on.
- 9:52
And I want to show you some of the learnings that we got from training Laguna M.1. Um, and yeah, some of the surprising things that happen at scale. Um, so one thing we do is we've got these, um, model replica hashtags.
- 10:04
So essentially when we train a model, we've got multiple replicas of the same model, right? Um, distributed data parallel. And, uh, we know there's an invariant. The weights should always be the same across all of these replicas.
- 10:14
That's something you can verify, right? We-- You can calculate a hash over the weights, and you know that should always be the same across all replicas. So we do that in training and periodically compare them.
- 10:22
Um, if all of these hashes are identical, then we know we can continue training. If they're not identical, we know something has gone seriously wrong, uh, because that should never happen, and we crash the training.
- 10:31
And I will give you some examples now of things that we've not shared before publicly like this. Um, so I hope they're interesting. Um, so first example here of, uh, shit that happens at scale are broken GPUs.
- 10:43
On the left-hand side, we've got two loss curves. Uh, and on the right-hand side, the corresponding, uh, gradient norms, um, that we observe during training. And you can see that these loss curves look quite different, right?
- 10:52
Like the purple one has got quite some bumps, uh, looks a bit spiky. The gradient norms are huge for that run. And there's actually no difference, uh, in terms of model configuration, training data, training implementation, um, between these runs.
- 11:05
They're exactly the same run. Just in one of them, we got unlucky and we had a broken GPU included. That broken GPU caused silent data corruption and, um, therefore made the training behave the way it did.
- 11:16
Uh, and that is one of those cases that you can catch with these hashtags because you know this computation should be the same across all replicas, but it wasn't.
- 11:24
Um, which brings me to the next, uh, instance of shit that happens at scale. Uh, in this case, exploding gradients. Um, again, we're looking at two different loss curves and the corresponding gradient norm curves.
- 11:36
Um, the purple run is our initial training run for Laguna M.1. We're a bit further into training here, around fifty thousand steps or so. And you can see it stops converging, right?
- 11:43
Like it just flattens out. And the reason here was that during training, the, uh, activations grew and grew, um, right before the, um, LM head, the un-embedding. And, um, we have to perform some sort of accumulation here, uh, because we use Tensor Parallel for the, uh, un-embedding.
- 12:00
And that accumulation, um, was performed in BF16 by default. And because of the growing scale that we observed in the activations, um, there wasn't enough, um, numerical precision available anymore, um, to do this accurately, and hence the model just couldn't learn anymore.
- 12:15
And this is also very, um, dramatic point for this to happen because it-- from there on it really, like, back propagates into the full model trunk. Um, the orange curve is essentially just adding a fix on that.
- 12:25
So we took the checkpoint from the purple curve. We moved that accumulation into FP32, and then from there on, the model started converting again. Um, the gradient norms, you can see, actually started decreasing.
- 12:35
Um, before then we had an increasing trend and, um, this is also something you can only observe at scale, and that will break your model if you, if you're not careful about it.
- 12:44
So as Marah said, we took all of these insights on data, on, um, numerics and so on, and we turned them from M.1 into XS.2. That's why we say it's a newer generation model.
- 12:53
Um, this included, uh, increasing diversity, reducing data repetitions, um, all of these numerical things I just mentioned, and just adding more observability and checks on that side, as well as generally optimizing the training and the architecture.
- 13:06
And XS.2, if you look at it, it's open weights, right? So you can download, uh, can download and use it for free. Um, it's one of the most competitive models for its size and for coding specifically.
- 13:15
That's what we focus on, agentic coding. Um, so we're pretty happy with it. However, you can say that, um, the model with thirty-three billion parameters is pretty small. Like, you wouldn't probably observe any issues anyways training it.
- 13:27
So what was important to us was to scale this, right? And this is where Laguna S comes in. This model is not public yet, so this is a preview.
- 13:34
Um, as I said, we treated XS as a test bed in a sense and, uh, with Laguna S we scaled this to a model that's a hundred and eighteen billion, uh, total parameters and eight B active parameters.
- 13:45
Again, we trained it on thirty trillion tokens on four thousand GPUs. So the scale was sufficient to not only test whether, uh, all the improvements we made on the data and architecture side ha- hold, but also if any of these numerical issues come up again.
- 13:59
And, um, of course, something happened. Um, in this case, doesn't actually have anything to do with scale, so it was just unfortunate. Um, in this case, we had a race condition because we added FP8 training, um, based on DeepGem FP8 kernels that are also, like, open source.
- 14:13
Um, we noticed this because we had illegal memory accesses as well as NaNs in the gradients, uh, which after a while of debugging we traced back to those kernels.
- 14:21
Um, there's also an unobservable, unobservable effect, um, that you wouldn't know about if you don't know that there's an issue. Uh, in our case, we noticed about point five percent of the gradient gets silently corrupted, essentially replaced by random values.
- 14:33
Um, we do have a fix available that's, uh, in a PR right now. Uh, it's not been merged into DeepGem yet, but it's public, uh, on that QR code if anyone's interested.
- 14:41
Um, and it's also an interesting point because it's a blind jack in-- uh, blind spot in the hashtags. In real training runs, you don't have any redundancy where you have the same model weights and the same data, so you can never check if forward and backward actually behave the same across different model replicas.
- 14:54
So you can also never check if there's a race condition in that. Uh, that's something that we're working on right now, uh, to essentially have a hash checker, um, that can also do that as a, at least as a dry run.
- 15:04
Um, and I want to end on, um, some early results from, uh, this new model, um, and demonstrating how it performs against some open weight models and also against our previous models.
- 15:15
So first I want to caveat this with these are base model evals, right? They are partly indicative of how the final model will look, but also not perfectly, right?
- 15:23
Um, there's still post-training happening. Uh, not all of these will translate one-to-one to the final model. Um, but if we look at them, uh, specifically on the coding part of, of the evals, so for instance, MultipleE, LargeCodeBench, BigCodeBench, uh, Laguna S is not only stronger than XS.2, which is our previous, uh, smaller model that performed very well,
- 15:42
but also then the much larger M.1. Um, and it's also mu- much better than GLM four point five-R, which is admittedly a bit older. Nemotron 3 Super, which is quite recent, and then DeepSeek V four Flash Max, which is quite recent and a fair bit larger.
- 15:55
Um, we can see it's competitive on BigBench-Hard, for instance. It doesn't achieve the, the top eval results compared to these models, but it's quite close. Um, we also see it's quite close on Eval Plus.
- 16:06
And, um, quite importantly for us, it does very well on Speed Bench Agentless Multilingual, um, which we use to sort of proxy agentic performance during pre-training. Um, and in that case, it performs much better than all the other m-- uh, all other models we tested here.
- 16:21
Um, I also want to point out that, of course, there are-- like, it's not the strongest model in the world, right? Like for instance, MMLU Pro, a knowledge benchmark, is something we don't care about that much compared to coding because we want to build the strongest agentic coding models.
- 16:34
Um, so here, like compared to Nemotron and DeepSeek, uh, we have to say that they perform much better and this mainly comes down due to data, right? It's a data gap, um, that we could plug if we wanted to.
- 16:44
Um, but I think the, the point is all of the things we've, we've found before were included in the recipe. The recipe held, it scaled, and we will continue scaling it from here.
- 16:53
So this model will also be available sometime in the future, relatively soon. Um, again, open weights, so all of you can download it and use it for free. And, um, with that, I want to thank everyone for attending our talk.
- 17:06
Um, I added also a link to our careers page and our Twitter page if you want to, uh, check it out. And yeah, thank you very much. [applause] [outro jingle]