Live data from Hacker News

Google Cloud TPU Multislice Training

cloud.google.com

31–40 of 49 posts

Re: Google Cloud TPU Multislice Training

#31
post #29
post #25

Question for rwitten or anyone else involved in this project: I see a per-device batch size of 6 for the 16B model. With 256x199 = 50944 TPUs and a sequence length of 2048, this works out to 104M tokens per batch. This is much larger than typical for training runs of dense LMs of this size, which are usually closer to ~4M tokens per batch. Was your critical batch size really this large? In other words, did you really…

I’m confused - why do you multiply number of chips by sequence length? Shouldn’t the total batch size be 50k x6?

Token count. But tokens per batch is a bad metric. I learned this the hard way through experience.

It turns out that what matters is step count. Increasing batch size makes the model train faster, but increasing seq length from 1024 to 2048 doesn’t make it train twice as fast. So saying 104M tokens rather than batch size 50k x 6 is misleading to yourself. (One of the most surprising aspects of learning ML was how easy it is for me to trick myself in various silly ways like that.)

The mental model to make this easy to remember: progress happens in discrete quantities called steps. Training on 104M tokens per step means it’s embedding 104M tokens of knowledge every step. This isn’t the same thing as requiring an special case optimizer due to large batch sizes — sequence length adds "knowledge bandwidth", but otherwise doesn’t mess with the training dynamics.

As far as large batch optimizers, there’s LARS, which google used for their MLPerf results. I imagine they stuck with that. It creates a per-layer confidence metric, so that when the massive batch size makes a massive change, it dampens the change to smooth out the effect across the network. And since it’s a multiply, the shape of the gradient (by "shape" I mean in 3D space, where the Z axis is the intensity of the gradient) remains the same, so it doesn’t harm any knowledge transfer. It’s purely a stabilization aid.

Kind of weird I remember that after three years.

Re: Google Cloud TPU Multislice Training

#32
post #29
post #25

Question for rwitten or anyone else involved in this project: I see a per-device batch size of 6 for the 16B model. With 256x199 = 50944 TPUs and a sequence length of 2048, this works out to 104M tokens per batch. This is much larger than typical for training runs of dense LMs of this size, which are usually closer to ~4M tokens per batch. Was your critical batch size really this large? In other words, did you really…

I’m confused - why do you multiply number of chips by sequence length? Shouldn’t the total batch size be 50k x6?

You can measure it either way, and you’ll see it both ways in the literature. In this case it doesn’t matter much how you measure since 2048 is a typical pretraining sequence length. 300k sequences per batch is huge compared to typical batch sizes in the literature, which are closer to 2048, for about 4M tokens total.

Re: Google Cloud TPU Multislice Training

#33
post #29

Earlier quoted context omitted.

I’m confused - why do you multiply number of chips by sequence length? Shouldn’t the total batch size be 50k x6?

Token count. But tokens per batch is a bad metric. I learned this the hard way through experience. It turns out that what matters is step count. Increasing batch size makes the model train faster, but increasing seq length from 1024 to 2048 doesn’t make it train twice as fast. So saying 104M tokens rather than batch size 50k x 6 is misleading to yourself. (One of the most surprising aspects of learning ML was how eas…

Whether you count tokens or sequences, it’s about 25x the usual batch size. My guess is it makes for a fancy benchmark but isn’t actually useful. Would be interested in being proven otherwise.

Re: Google Cloud TPU Multislice Training

#34

Ok so they claim in the article, 50000 TPU’s is equivalent to 10 exaflop floating point computations. That is equivalent to ~2,512 NVIDIA H100’s, which is like really small. Just shows the difference between TPU’s and GPU’s I guess. Inflection, a new LLM company created a 20,000 H100 cluster, I’m positive OpenAI, Tesla, Meta etc have orchestrated a job on more than 2500 H100 GPU’s.

It sounds like they partnered with CoreWeave to use their equipment and it is "only" 3500 gpus so far. https://inflection.ai/inflection-ai-announces-1-3-billion-of... https://inflection.ai/nvidia-coreweave-mlperf

https://youtu.be/z3hmfSVmyqg?si=eLPZ0D6ug3D6PreI

As of 2 months ago, they had at least 7000 up and running, fwiw

Re: Google Cloud TPU Multislice Training

#36
post #26

Earlier quoted context omitted.

Unlikely. One reason Google Cloud is so terrible is that nobody in Google actually uses Google Cloud. It used to be that every time I mentioned this, somebody would jump in and say, "Well actually, Google Domains runs on Google Cloud," and we'd discuss whether Google Domains was a business critical part of Google. https://support.google.com/domains/answer/13689670?hl=en

> Unlikely. One reason Google Cloud is so terrible is that nobody in Google actually uses Google Cloud. Well, actually, Google Cloud is just an abstraction on top of internal Google infra, so this isn't the right question. So, it depends on what you want to infer/compare.

> Well, actually, Google Cloud is just an abstraction on top of internal Google infra

I didn't say otherwise. Of course Google Cloud runs on internal Google infrastructure. They wouldn't have an entirely different stack to build Google Cloud on. The problem is that Googlers don't use Google Cloud.

Amazonians use AWS. https://courses.cs.washington.edu/courses/cse452/23wi/papers...

Microsofties use Azure. https://www.zdnet.com/article/microsoft-moves-closer-to-runn...

Re: Google Cloud TPU Multislice Training

#37
post #33

Earlier quoted context omitted.

Token count. But tokens per batch is a bad metric. I learned this the hard way through experience. It turns out that what matters is step count. Increasing batch size makes the model train faster, but increasing seq length from 1024 to 2048 doesn’t make it train twice as fast. So saying 104M tokens rather than batch size 50k x 6 is misleading to yourself. (One of the most surprising aspects of learning ML was how eas…

Whether you count tokens or sequences, it’s about 25x the usual batch size. My guess is it makes for a fancy benchmark but isn’t actually useful. Would be interested in being proven otherwise.

Proof by contradiction: they used batch size 6 because 7 was past the point of diminishing returns.

Re: Google Cloud TPU Multislice Training

#38

Earlier quoted context omitted.

Unlikely. One reason Google Cloud is so terrible is that nobody in Google actually uses Google Cloud. It used to be that every time I mentioned this, somebody would jump in and say, "Well actually, Google Domains runs on Google Cloud," and we'd discuss whether Google Domains was a business critical part of Google. https://support.google.com/domains/answer/13689670?hl=en

Lots of stuff inside Alphabet runs on GCP. And yes, Google Domains pisses me off.

If anything important ran on Google Cloud, you can bet we'd see a blog post from Google Cloud marketing about that. Yes, many of the money losing side bets from the non-Google companies under the Alphabet umbrella use Google Cloud. That's only because they want the optionality to spin them off if by some miracle any of them are ever worth anything. If they were part of Google, they would use internal infrastructure. If they weren't under Alphabet, they would use AWS or Azure like everyone else.

Re: Google Cloud TPU Multislice Training

#39
post #26

Earlier quoted context omitted.

Unlikely. One reason Google Cloud is so terrible is that nobody in Google actually uses Google Cloud. It used to be that every time I mentioned this, somebody would jump in and say, "Well actually, Google Domains runs on Google Cloud," and we'd discuss whether Google Domains was a business critical part of Google. https://support.google.com/domains/answer/13689670?hl=en

> Unlikely. One reason Google Cloud is so terrible is that nobody in Google actually uses Google Cloud. Well, actually, Google Cloud is just an abstraction on top of internal Google infra, so this isn't the right question. So, it depends on what you want to infer/compare.

It is the right question. It's the right question because Google doesn't dogfood Google Cloud like they should/could. Dogfooding a bunch of stuff at a lower level of abstraction isn't the same thing.

Re: Google Cloud TPU Multislice Training

#40
post #33

Earlier quoted context omitted.

Token count. But tokens per batch is a bad metric. I learned this the hard way through experience. It turns out that what matters is step count. Increasing batch size makes the model train faster, but increasing seq length from 1024 to 2048 doesn’t make it train twice as fast. So saying 104M tokens rather than batch size 50k x 6 is misleading to yourself. (One of the most surprising aspects of learning ML was how eas…

Whether you count tokens or sequences, it’s about 25x the usual batch size. My guess is it makes for a fancy benchmark but isn’t actually useful. Would be interested in being proven otherwise.

This is a great series of questions and it isn't our goal to prove you otherwise!

We work with customers interested in training models who run their own ablations, including batch size and learning rates.

Based on that, we demonstrate workloads that we think will be interesting to potential customers! Absolutely agreed that this workload has a larger batch size than the public literature suggests.

Post reply on HN