Latest / Agentic Conversations (formally mlops.community) / Introducing DBRX: The Future of Language Models // [Exclusive] Databricks Roundtable
Transcript
- 0:07up everyone welcome, welcome, what a day to be alive.
- 0:14We are here with the Databricks team.
- 0:17They've got some huge news that just came out as you probably
- 0:21saw last week and after we saw it we said you know what, let's
- 0:26have a round table session about this because there is too much
- 0:31news to let just slide by. I would like to bring out the
- 0:37Databricks team, but I'm going to do it in true MLB's fashion
- 0:41and I am going to sing a little song about him to making us
- 0:47start off on the right foot. Hopefully you all are ready for
- 0:51this. You may not know what you're
- 0:53getting yourselves into, but let's get it rocking.
- 0:56If anyone has any key that they want me to sing this intro song
- 1:01for the Databricks team in Speak now or Forever Hold your peace
- 1:04and if you want to prompt me throw it in the chat.
- 1:06I am listening. Of course C# is going to be the
- 1:10go to 1. Here we go.
- 1:13C# minor. Can you all hear that
- 1:56this model? And to answer that question
- 2:01we've got my good friend Danny Lee.
- 2:04Ohh where you at Danny? Hey, Hello.
- 2:07Hello. Hello.
- 2:09Great C#. Thanks very much.
- 2:12Demetrius, always glad to be hanging out with you like usual.
- 2:15So. Is you don't know who I am.
- 2:17I'm just saying. Hey you, you said the interest.
- 2:19I'll do it real quick. Names Dan Italy, but apparently
- 2:23a developer advocate at Databricks, Demetrius and I had
- 2:27been guilty of doing many fun things.
- 2:28Together and we're back at it again.
- 2:30That's probably all you really need to know, so.
- 2:33What do we call in this model? Dude, that you've got a big LM
- 2:36out in the open source land and I think that I pronounced it
- 2:41earlier and you said no, that's not what it's called.
- 2:45That's right, it's OK Now of course the name is DB RX, but
- 2:48I'm trying to make it a thing where we all say Dabba Rex.
- 2:52OK, so that's the idea. It's Gonna Stick by Rex
- 2:56Navarrete wanted to stick double wrecks.
- 3:00Rightly for us, we've got some other people that have worked on
- 3:04Dabber X and are able to. We're going to have over the
- 3:07next hour or so, we're going to talk with some of the actual
- 3:13talent behind it. Look at this.
- 3:16Dabba Rex just popped on the screen.
- 3:18Oh my God, there we go. First up I'm going to bring on
- 3:21to the stage AJ where you at, AJ?
- 3:24There he is. What's going on, dude?
- 3:27Hello. Tell us.
- 3:29What have you What have you been up to?
- 3:34So I guess first quick introduction.
- 3:35So yeah, I'm AJ, I'm the engineering manager for the
- 3:38generative AI training platform team at Databricks.
- 3:41And yeah, I mean, honestly for the past few months it's been a
- 3:43lot of cranking away making this model train largely running all
- 3:48over the back end infrastructure for training it, making sure it
- 3:51works while making our making sure the model is actually
- 3:53going. You've had your work cut out for
- 3:57you, so I'm going to keep bringing the team onto the
- 4:00stage. Bendish, I know you're in there
- 4:03somewhere. There he is.
- 4:04What's up dude? How's it going to be at your
- 4:06house? Glad to see you again.
- 4:07You too, man, So give us the rundown.
- 4:10What have you been up to? Yeah, I mean I think what we
- 4:13talked about 2-3 weeks ago, well caught up on a sleep a little
- 4:16bit, a little more grey hair after this.
- 4:18But yeah, we've yes, my name is Bandish I I'm another
- 4:22engineering manager at Databricks and my team basically
- 4:24builds all the training tooling like composer, LM Foundry,
- 4:28streaming data sets. You know for those folks
- 4:31following our open source rules that were used to train DB racks
- 4:35or Dopa Rex, I guess we're calling it a little bit.
- 4:38We're trying to figure out what to call it.
- 4:39We're trying a few different things off size.
- 4:41Yeah, so, well, I'm excited to talk about it.
- 4:43We got a B. Where you at, dude?
- 4:46Where you at? There he is.
- 4:48Hey, great to be here. My name is Abby, I'm an
- 4:51architect on the NLP team. I've been helping lead a lot of
- 4:54the modelling choices and development around X and it's
- 4:58been a crazy couple of months to everything from pre training,
- 5:02data prep, all the post training as well.
- 5:04It's been a huge team effort. Yeah, super excited to be here.
- 5:08Excellent. Well, we've also got Davis
- 5:10coming on in just the second. We got to kick it off, man.
- 5:13Like Denny, can you lead us through the sequence of events
- 5:18that has happened over the last month when it comes to Dobber X?
- 5:22Well, actually, no. In all seriousness, I I that's a
- 5:25great question, but I would rather have bought this.
- 5:27Ajay, Ajay or ABI actually take care of the biggest.
- 5:30They are integral for its creation.
- 5:34I think when we look back at sort of you know, last year, you
- 5:37know originally we were a lot of us came from the most high team
- 5:40and our goal is to really help people build and train their
- 5:42models and build the infrastructure around that.
- 5:44And I think we got to this point, we showed that you can
- 5:46actually training up to GBP three quality models for a
- 5:49relatively low, low price. And as we looked ahead, you
- 5:52know, especially after about the car by Databricks, we really
- 5:54want to see like can we push the quality to the next level,
- 5:57right, can we get to like 3.5 and beyond and what were the
- 6:00different things that need to go into that.
- 6:02So a lot of it came down to obviously needing to scale up to
- 6:05bigger models but to do so in an efficient way.
- 6:08So you know, we really like dug into this new mixture of experts
- 6:11architecture which I'm sure we can talk a lot about, which
- 6:14really helps us train higher quality models without
- 6:17increasing the cost too much. And that involved a lot of both
- 6:20the research and engineering figure out how to make these
- 6:23models average bringing how to actually train them at high
- 6:26performance on big clusters. And so we spent a lot of time
- 6:29like digging into the research And then I say right about like
- 6:32around Christmas time actually that's when we decided, hey, we
- 6:35actually want to go for it. We want to try and build a new
- 6:37model that's way more powerful than our previous MPT series.
- 6:41And that's really kicked off this effort.
- 6:42So the past three months or so have been just round the clock,
- 6:46you know, research and engineering.
- 6:47I'm trying to get double X out. So good.
- 6:50So we have a new a new person that joined us.
- 6:53Davis, can you give us a quick intro before we dive deeper into
- 6:57this? I know it's like we're taking
- 6:59one step back and two steps forward, but if we're going to
- 7:02get there. OK, what what's the back in two
- 7:05steps forward? Sounds exactly like training a
- 7:07huge model, so it's it's pretty fitting so.
- 7:10Yeah, like we're on point. Yeah.
- 7:12So hi, I'm Davis. Good, good to be back here.
- 7:15I am a researcher at Databricks as Mosaic AI team, formerly
- 7:23Mosaic as well. So I'm always interested in
- 7:26hearing and and Danny, feel free to jump in if you have any
- 7:30thoughts on this too. But when it comes to training
- 7:33one of these models and and thinking about it like you did a
- 7:37lot of testing beforehand, right?
- 7:40And Abby, you were just talking about how we you at some point
- 7:45you were like, OK, we've tested enough.
- 7:47Now we think we can go for it. You have to make that gigantic
- 7:51investment into training the model.
- 7:53You have to be pretty confident that what's going to come out on
- 7:58the other side is going to be useful and going to make an
- 8:02impact. What are some things that gave
- 8:04you all the security to know that you can do this?
- 8:11Like if you're going to invest this time and effort and
- 8:13resources into it, it's going to be good.
- 8:16Yeah. So you know, I think there
- 8:18there's like both the the research and the engineering
- 8:21risks. I can talk about the research
- 8:22and it may banish Raja us talk about the interesting stuff too.
- 8:26So you know the basic thing we try to do is really nail down
- 8:31the recipe for modelling. So you know the architecture,
- 8:34the choices of how much data to use versus the number of
- 8:38parameters. And we do a lot of these tests
- 8:40at smaller scale and we try to basically benchmark ourselves
- 8:43against like other existing models out there and our
- 8:46internal benchmarks, you know, our previous MPT models.
- 8:49And we tried to see that we're hitting the same quality as
- 8:51those other benchmarks would like much less compute our money
- 8:54than before. And so we do a lot of those
- 8:57experiments, you know, like a smaller scales and eventually we
- 9:00start like kind of scaling it up and making sure that we actually
- 9:02hitting the quality we expect. And that's what kinds of gives
- 9:05us the confidence that like hey, now we're going to really crank
- 9:08it up and go 10X farther than we ever have before.
- 9:10It's just a lot of those little scaling experiments.
- 9:13That's the research. But on the infra, yeah, maybe
- 9:17someone else was talking. About, yeah been from the kind
- 9:21of the training side, right. I think you know research was
- 9:24really kind of pushing the frontier as far as far as kind
- 9:27of when we work with our research team.
- 9:28And I think that's like very it's a really great product
- 9:31collaboration that we do right. We we innovate because customers
- 9:35zero is always research for us. And so you know I think sometime
- 9:39last year Abby comes up and says hey I got this this MO
- 9:42architecture and we had just put out right MPT 30B and kind of
- 9:46riding that wave and we were kind of busy with the
- 9:48acquisition and it was like that I kind of frame is our Gen one
- 9:54stack right. Like that was our dense model
- 9:55training stack. We were really good at doing
- 9:58this at hundreds of GPUs. We've been working with
- 10:00customers and we've kind of proven it out over and over
- 10:02again. And that's a major thing that we
- 10:04do right. If you don't do this once, we
- 10:06have to do it once with our research team.
- 10:09That's like creating these new capabilities and like really
- 10:12pushing the boundaries of what we can do and then we have to
- 10:14repeat that for Databricks customers.
- 10:16And so it's kind of that, right. And then scaling in a lot of
- 10:20different ways. And so when we build these new
- 10:23stacks, right, that's that's really the crux of what's
- 10:25happening. So we have this new MOA
- 10:27architecture. It, you know, everything breaks,
- 10:30right. It's like ohh, we're ready to
- 10:31start training this. And it's like not what what do
- 10:34you mean? We're nowhere near ready, right.
- 10:35We need like, you know, and so a lot of this, you know, when
- 10:38we're doing it is almost like, you know, we're we're we're
- 10:41already, you know, fly. We're building an aeroplane
- 10:44literally while it's flying in the air and on fire, right.
- 10:46And but we do that so that you don't have to.
- 10:49Right. And and you don't do it later.
- 10:51And so a lot of this kind of involved looking.
- 10:53Now we have this MO thing like how do we split this workload
- 10:56across hundreds of thousands of GP's, right.
- 10:58We trained B racks on over 3000 different GPUs.
- 11:03What are the things that are going to fail?
- 11:04Right. When you go from like 512 like
- 11:07block sizes to over 1000? Like things that didn't fail at
- 11:11those smaller scales are definitely failing at larger
- 11:15scales. You know, and you're kind of
- 11:17onion peeling. You're doing a lot of these
- 11:19things. And so like a lot of the, a lot
- 11:20of the engineering effort starts going into, hey, how are we
- 11:22gonna solve these problems, you know, and you start by patching
- 11:26and, you know, and then you kind of just build up from there, you
- 11:29know, start understanding, hey, like checkpoint loading is
- 11:31breaking for some different reason than it was before.
- 11:35How do we make this go fast and how do we eventually do it so
- 11:38that we're up Time is very long, right.
- 11:40And and you know, I think we did pretty well.
- 11:42I mean being able to train this model in three months or so is
- 11:45is pretty amazing. And you know, I think we're
- 11:47going to, as we kind of commercialise the stack and
- 11:49start training with customers, it's gonna, it's gonna continue
- 11:52to improve, get even better. Alright this is perfect.
- 11:54So actually I've got two sets of questions just based on what you
- 11:58just said Amish. OK, so but I'm gonna direct it
- 12:00to Davis. I wanted you to talk a little
- 12:02bit MEX. I'm gonna do that first but just
- 12:05as a lead in for the next one. Then AJ, I want to talk to you
- 12:08about the hardware failures and the training because that part
- 12:11super interesting that bondage was referring to.
- 12:13But First things first you know Davis wanted to talk a little
- 12:17bit about the memory architecture because you know we
- 12:19we we we spunk we we we went around it talking about like
- 12:23this idea of mixture of experts. But this is not necessarily the
- 12:26most obvious thing that we're talking that typically when
- 12:29you're looking at Lamma 2 and even the older 3D models, we're
- 12:32talking about dense models and now we'll talk about sparse
- 12:34models. Can you talk a little bit about
- 12:35that, maybe within the context of the Mega Blocks paper for
- 12:37sake argument? Yeah, absolutely.
- 12:40So here's one way to think about mixture of experts.
- 12:45A simple approach that you could do is you could just train
- 12:50different models for different subsets of your data.
- 12:53Like you have a model that's good at processing math, model
- 12:56is good at processing Python code, whatever.
- 12:59You could just have different specialised models and like you
- 13:04can run that. That's the thing you can do.
- 13:06But you'll hit a fair amount of redundancy.
- 13:10Like they're all going to have to have big embedding tables
- 13:14with different input tokens. They're all gonna have to figure
- 13:16out how to do reference resolution for pronouns.
- 13:20There's just a lot of the model that translates across domains,
- 13:25and only some of it there is specific to a particular domain
- 13:29O in a mixture of experts model. What you do is instead of having
- 13:32completely separate models, you're going to have one model,
- 13:37but all of the feed forward networks are pairs of linear
- 13:42layers in a transformer are going to be duplicated, say 8 or
- 13:48in our case 16 times. You have 16 different feed
- 13:52forward networks in every transformer block and every
- 13:56token is going to go to a subset of these feed forward networks.
- 14:02In our case we send each token to four of them.
- 14:05So what this means is that we have many different supposedly
- 14:10specialised feed forward networks and every transformer
- 14:13block and tokens go to the relevant ones.
- 14:17There are a bunch of things that are nice about this.
- 14:21One is that you have 16 times more parameters.
- 14:25That's a lot more model capacity.
- 14:28One thing that's not very nice is that you end up with 16 times
- 14:34more parameters in each of your layers.
- 14:36So that causes a number of technical challenges.
- 14:39As far as which experts are given.
- 14:42Token goes to you. You learn a so-called routing
- 14:46functions that hopefully does something reasonable.
- 14:48There are a lot of open questions about how to do this
- 14:50really well in the research literature, but that's kind of
- 14:54the high level idea. You're adding way more
- 14:57parameters, but then at runtime you use them sparsely so that
- 15:02each token only sees. So you had just mentioned the
- 15:07fact that we're talking about you're using 4 experts out of
- 15:10the 16 that are available, right?
- 15:12So could you provide what is the benefit, right, Because you
- 15:15didn't note the fact that with 16 experts you have that many
- 15:18more parameters to work with. So what's the benefit of doing
- 15:20for experts out of 16? And then do note the fact that
- 15:23we're talking about, for example, like with Minstrel and
- 15:26with Grock, it's 2 experts out of eight.
- 15:29So I'm just curious from that. Context.
- 15:31So why 4 experts out of 16 is really two questions.
- 15:36One is why only for experts and the 2nd is why four and not just
- 15:39one. So why choose only four?
- 15:42Why choose a subset? Or the amount of work you have
- 15:47to do computationally? The number of Flops for each
- 15:51token you feed into your model is going to be proportional to
- 15:57the number of experts that are used.
- 16:00O. If I take a token and I feed it
- 16:02through 16 different linear layers, that's of course 16
- 16:06times as much work as only feeding it through one linear
- 16:09layer. So in order to reduce the amount
- 16:13of work we do per token, we only routed each token to a subset of
- 16:18the experts. Now if that's the case, like why
- 16:23not just only do one? Why not maximise the number of
- 16:27ratio of parameters to the amount of work you do?
- 16:30And yes, there there is that. There's a tradeoff and you kind
- 16:33of have to tune it. The trade off is that your model
- 16:38still does benefit from doing more work.
- 16:42One way to think about this intuitively is that the amount
- 16:46of expressiveness you get here is proportional to the like N
- 16:50choose K or to better, the entries K of how many experts
- 16:54you use. There's only one expert.
- 16:56There are only 16 possible ways the token can get processed.
- 16:59You have two out of 16 experts, you have 16 * 15 weights hoping
- 17:04you can get processed and so on. So if you use 4, you end U with
- 17:08this really expressive combinatorial space where each
- 17:14token you're still only using a small fraction of the
- 17:16parameters, but the number of functions you can express here
- 17:22is really, really huge. So you end up with a big model
- 17:25capacity win. That still gets you like a lot
- 17:28of the benefit of having just using all of the experts or an
- 17:33equivalent dense model the same Perimeter account.
- 17:36OK. And I think that like the one
- 17:38the context that I would add before I switch, I'll switch
- 17:41over today is that there's also the benefit of speed, right?
- 17:46Basically, by reducing the number of experts going overall,
- 17:50you've actually basically get the best of both worlds where
- 17:53you basically have the higher volume of quality due to the 16
- 17:56experts, but you actually get the better inference speed
- 17:59because you're using force. Did I get that correct?
- 18:03Just to verify here. Yeah, that's that's a really
- 18:06good summary, kind of getting the best of both worlds.
- 18:10Cool. I I probably asked Albert that
- 18:12question honestly, so that's probably why I don't know.
- 18:16Alright. How are the truth?
- 18:17OK, yeah. Yeah.
- 18:19No, no, no. That's always the truth.
- 18:20I'm not pretending I know anything.
- 18:21I I literally asked overextend. That tells me.
- 18:23And then I just get the site, the site and give me some
- 18:27citations that I can act like, I know we're talking about.
- 18:29But the one thing I definitely want to talk about, like, OK,
- 18:33dude, like paralysing something like this is going to be
- 18:37complicated. Like, you got to tell me a
- 18:39little bit about the harbour challenges.
- 18:40How do you run something like this at scale?
- 18:42Because that's all. That's 3072 GB, Houston, you're
- 18:45running. This can't be like a like a walk
- 18:47in the park, right? Yeah, so this is a fun one.
- 18:51So one. Piece is large model.
- 18:54Training well, fun and fun and not fun, depending on how you
- 18:57see it. But basically one piece of large
- 19:00model training that people don't really talk about as much is how
- 19:03much of A systems and operations problem it really is when you
- 19:08throughout our time, you know, kind of running the Mosaic
- 19:10training platform, we we had run across thousands of GPUs before,
- 19:13but we had never done a single training on that many GPUs.
- 19:16It had been a whole bunch of smaller separate ones.
- 19:17And when you hit that scale, as Ben just had mentioned earlier,
- 19:21all sorts of things statistically actually people
- 19:24say you can you observe roughly one GPU failure every 1000 GPU
- 19:28days. And on a 3000 GPU cluster that
- 19:30means you're seeing three per day.
- 19:31And I can tell you empirically, we actually did see three to
- 19:34four per day throughout the entire training run.
- 19:38So in order to deal with this, I mean one, you have to have
- 19:40really good monitoring. So we were monitoring the GPUs.
- 19:42We were monitoring things at the Kubernetes level, which is like
- 19:44the foundation of how our platform was built.
- 19:46But you'll also have to monitor the entire network because it
- 19:49really critical part of training like paralysing this model
- 19:52across so many GPUs is that you need to have really high
- 19:55throughput communication between all of the GPUs.
- 19:57So the network layer is super important, and what you end up
- 20:00having to do is basically check every single pair of.
- 20:03Machines are like what we call nodes in the cluster to make
- 20:06sure that you're actually getting that really high
- 20:08throughput. And many times like random
- 20:10network links will go down and you'll have to go figure out
- 20:12what they are. So there was this whole
- 20:14operational thing of building all of these, this monitoring
- 20:16layers, all this health checking and then on top of that no
- 20:20matter how hard you try to actually catch all these things,
- 20:23you will never catch everything. So the next piece of it is, OK.
- 20:26Now in the cases where you don't catch the failures, do you have
- 20:29the right operations in place to be able to deal with it in a
- 20:32very timely manner? So we actually had a dedicated
- 20:34on call rotation specifically for this training run where if
- 20:38anything ever went wrong, we had a whole bunch of monitors and
- 20:40alerts that would be a a 24/7 on call page that would just wake
- 20:43people up in the middle of the night and go debug some hardware
- 20:45or go back to sleep, wake up again, go do it.
- 20:48And it kind of just went on for for weeks.
- 20:50That's amazing in fact that you're literally reminding me
- 20:53now this is, this is I'm basically ageing myself very
- 20:58horribly. I just want to call that out.
- 21:00I Did you guys ever deal with like, for example, like HP Super
- 21:03Domes like the old school ones? Because that's basically exactly
- 21:08the same thing. Like, the idea was that
- 21:10incentive bad connections were still really, really new, and
- 21:13they're really, really fragile at the.
- 21:15Time. So exactly the same concept in
- 21:17order just to get up, we were I was part of the SQL Server team
- 21:20where we're actually running SQL Server on super dose and that's
- 21:24exactly it. Yeah, like basically calls at
- 21:26all hours just because then that work like wasn't working and
- 21:29then all hell broke loose. And so like I'm just curious
- 21:33from your perspective, did this reduce overtime as you were
- 21:38training or like you know training Democrats or was it
- 21:41pretty consistent anyways just because of the nature of the to
- 21:44fit actions of this nature of the GP themselves?
- 21:47So we had pretty close relationships with the cloud
- 21:49providers and we were able to kind of report all of our
- 21:51failures after we detected and mitigated them.
- 21:54So we did actually see improvements in health over
- 21:56time, but also over time, we got a lot better at monitoring and
- 21:59checking for these things automatically because every time
- 22:01we had something go wrong, we were able to develop some kind
- 22:04of script or something to like diagnose it for future times.
- 22:06And now we have this gigantic logbook with all of the things
- 22:09that that went wrong. And we're actually actively
- 22:11working on automating all of these things so that when we
- 22:13have customers training models like this, they will run into
- 22:16the same problems. That's nice of you thinking
- 22:19about the customers. Yep.
- 22:21Workers. Right.
- 22:23Yeah, I I'm sure a lot of people really enjoyed that.
- 22:26So there's a question coming through in the chat that I
- 22:29wanted to ask, which is about have you ever experimented with
- 22:34training strategies other than FSP?
- 22:37Like using frameworks such as Megatron or Deed.
- 22:41Yeah, I know I'll be. I'll be here.
- 22:43We wish everyone you want to take in, then I'll maybe add in
- 22:45afterwards. Sure, yeah yeah.
- 22:48So we primarily use like a Pytorch based training stack and
- 22:51we have this library on top called Composer which is open
- 22:54source. So anyone please.
- 22:56And what we've tried to do with framework is make it as flexible
- 23:00as possible for different models.
- 23:01And we use composer to train not only our alms like BMX, we also
- 23:06use it to train diffusion models.
- 23:08We have other future models coming out and one of the
- 23:11reasons that's possible in our opinion is is because we use
- 23:15Pytorch FDP, which really doesn't enforce like any
- 23:19requirements from the model architecture.
- 23:21It makes it easy to distribute it across big clusters without
- 23:26using 3D parallelism or pipeline parallelism or anything like
- 23:29that. And I think that that
- 23:31flexibility is what we require for most of all.
- 23:33And we found over time that we've been able to optimise FSDP
- 23:35to actually achieve very, very close performance to a thing
- 23:38like even these 3D parallel strategies.
- 23:40And so that's kind of like the tradeoff we've made.
- 23:43I think like Deep speed in comparison is basically
- 23:47implementing the same algorithm. So whether you use Deep Speed 03
- 23:50versus Pytorch FSP, I think you'll see a very similar
- 23:53situation. We just tend to use the portal
- 23:55all of our natively integrated with things like Pytorch,
- 23:58autocast and stuff like that. Yeah, I'll hand over to Banish
- 24:02as well, who is also a lot of these different framework.
- 24:05We love the simplicity, right. Like FSDP is like very
- 24:09straightforward to think about. We're able to keep optimising it
- 24:12and keep pushing the bounds. And you know we work very
- 24:14closely with Pytorch on this and that's been that's actually been
- 24:17a really great partnership. But I think the other side is
- 24:20you know I think what actually AJ was talking about like having
- 24:22super high speed interconnects really helps and and that's you
- 24:26know again not everyone's going to have that.
- 24:27So we're not saying like things like oh like pipeline
- 24:29parallelism or different parallelism strategies aren't
- 24:32necessarily needed. But we, you know when we
- 24:35actually build these clusters, when we train on these things
- 24:38like having those high performance networks really goes
- 24:40a long way. And I think you know as we keep
- 24:44pushing the bounds we'll we'll evaluate kind of how do we keep
- 24:46pushing the utilisation counts that yeah and you know we're
- 24:50really maximising the amount of performance we can get per
- 24:52dollar. But so far, yeah, we've we've
- 24:54basically gotten away with FTP and then kind of variations on
- 24:57that and just really, really, you know, being very intelligent
- 25:01about how we optimise things. All right, I'm going to lob
- 25:04another one out at you all because the chat has been
- 25:07awesome. Keep the questions coming in the
- 25:09chat. You all are incredible.
- 25:12So what tools do you use to benchmark your LLM inference
- 25:18regarding latency, GPU utilisation, et cetera, et
- 25:22cetera? So I know the inference people
- 25:25have some very specific tooling that we didn't use to pre train
- 25:29it necessarily, but it's mostly off the shelf stuff.
- 25:33We get a lot of mileage out of the Pi Torch Profiler as well as
- 25:41the Pi Torch Memory Profiler. I think those two were about 80%
- 25:45of it. Occasionally we would also use
- 25:48just like a little bit of our own tooling to say log all the
- 25:53distributed calls, but it was mostly off the shelf stuff and I
- 26:00think for inference a lot of the challenges there.
- 26:04Or maybe less around which tool are you using, because you can
- 26:07often indirect to very high performance kernels in TTL or
- 26:14other libraries where you can kind of get away with not
- 26:16looking at like the hardware perf counters and the L2 cache
- 26:19bandwidth and so on a pretty good fraction of the time.
- 26:24But it's also hard to get a good representation of your
- 26:27workloads, especially when your workloads are very bursty.
- 26:31Because, OK, what your inference latency is going to depend on
- 26:36your back size. Like, how much work are you
- 26:37doing right now? How many other queries are you
- 26:39having to answer, and how do you get a realistic setting so you
- 26:41can measure that in a situation that's going to be relevant for
- 26:44what your customers are seeing? It's not quite an answer, but I
- 26:48know we had to build a fair amount of scaffolding around
- 26:50that to really get accurate answers to these sorts of
- 26:53questions. Yeah, so just to quickly add on,
- 26:56add on to what Davis is saying, there's there's like the
- 26:58inference latency piece and for inference specifically, there's
- 27:00also throughput which matters a lot.
- 27:02So one thing we did for serving DBX is actually we built our own
- 27:06kind of optimised inference web server that has a whole bunch of
- 27:09customizations in it to make the model super performant when it's
- 27:12being served. And the way we test this is
- 27:14actually the the very simple deploy the model using the
- 27:17server and then absolutely bombarded with requests and see
- 27:19what throughput we're able to get.
- 27:21There's nothing like basically trying to simulate live actual
- 27:24workloads and then from there measuring, measuring the
- 27:26performance and then optimising from there.
- 27:28Yeah, I think the only thing I would add, I mean you know I
- 27:30think the inference that is definitely a full kind of end to
- 27:34end in that sense like systems problem, right.
- 27:36Like just talking about the web server that we have to kind of
- 27:39optimise all the way from sort of the REST API call to the
- 27:43actual model call itself, right. So I actually I think we were in
- 27:47a great blog post about this and it kind of highlights our
- 27:51benchmarking or inference benchmarking.
- 27:52So you know we look at things like time per output token or
- 27:55time to 1st token time for the generate calls to actually
- 27:59happen and you know what is compute bound, the other is
- 28:01memory bound and also you look at kind of memory bandwidth
- 28:05utilisation. So you kind of highlight that
- 28:07framework definitely would point of focus to that log.
- 28:11And then in terms of actual tooling for the model, right, I
- 28:13mean a lot of it is like OK, how do we get those metrics.
- 28:16And so a lot of it kind of looks at OK, hey, like what do we
- 28:20expect, right, Like if we know that the how much data we're
- 28:23moving around and we know that feeds and the speeds of the
- 28:25system, what should we actually expect to see in terms of model
- 28:28performance? And then we also use a lot of
- 28:31the vendor tools, right. Like I know we've actually
- 28:33looked at things like insight from NVIDIA to actually model
- 28:37kind of like how long certain kernels are taking and and a lot
- 28:41of that also happens in partnership with those vendors,
- 28:43right. Like we worked very closely with
- 28:44the TLM team to really optimise that and yeah, and that's kind
- 28:49of how what led to those, you know, those those PR's to TRL
- 28:52every bow and the the VLR bills for for both of those solutions.
- 28:56Beyond the chinchilla model or beyond the chinchilla scaling
- 29:02guidelines, how did you choose the number of tokens to pre
- 29:05train on and maybe I'll call out, I'll be on this one.
- 29:10Ohh, and just as a quick call out before you do it, most
- 29:14people probably here don't even know what the council guidelines
- 29:16are, right? They probably haven't read the
- 29:18research paper around us. Again, I only know because I've
- 29:20asked Alex to tell me so. So what do you want to provide
- 29:23the context first. Just want to call that out
- 29:25though. Yeah, absolutely.
- 29:27So you know when it comes to sharing these models, a lot of
- 29:31times you're trying to produce the highest quality forgiven.
- 29:34Compute, friendship and compute is kind of basically a product
- 29:37between how many parameters are many tokens you use.
- 29:40And so if you look back at the history of LM scaling in the
- 29:44early days, people are training very, very large models on a
- 29:47small number of tokens. Few P3 was kind of like this I
- 29:51think 175 billion parameters, only 300 billion tokens and they
- 29:55tried to develop scaling laws to protect both the most optimal
- 29:58way to assign those two components the the parameters of
- 30:02the tokens. Now a few years later there was
- 30:05a paper that basically trained a model called Chinchilla and they
- 30:10re measured the scaling laws more precisely and they found
- 30:13that actually you want to have a lot more tokens than parameters.
- 30:16So they came to recommendation that is approximately about a 1
- 30:19to 20 ratio. So if you want to train 100
- 30:22billion parameter model, you should use actually 2 trillion
- 30:26tokens. And so that actually
- 30:28dramatically changed how people built models.
- 30:30People started building smaller models, trained on much more
- 30:32data. Beyond that, people found that
- 30:36hey, actually we can extend it even farther, although it's not
- 30:39exactly compute optimal, you can train on even even more tokens.
- 30:43So you can increase that ratio from 20X to 100X, even 200 X,
- 30:48and then you get models like the Llama models.
- 30:51So for example, Llama 7B is only a 7 billion power model, but
- 30:54trained for 2 trillion tokens. So that's a humongous ratio way
- 30:58beyond Chinchilla and so on. So we look at all these
- 31:01different strategies and we know for our customers basically
- 31:04being on this very efficiently. So the smallest parameter size
- 31:08possible is really important. So we basically want to ask
- 31:10ourselves what is the highest token to parameter ratio we can
- 31:14achieve without getting too much quality away.
- 31:17So, so not quite Chinchilla, not quite like extremely large
- 31:21amounts of tokens. And we had a lot of experience
- 31:23with smaller scale basically at the same compute budgets where
- 31:26we tried to shrink the model and increase the token count as much
- 31:29as possible to basically see where that trade off was.
- 31:32So I think when you look at Java Rexite, it has basically 132
- 31:38billion LOL parameters and 12 trillion tokens.
- 31:41So it's pretty close to 100 X and I think that's what we kind
- 31:45of came to. So if you're interested in
- 31:48these, kind of unless there are new papers out there for mixer
- 31:51scaling loss, I think there's one even destroy a few weeks
- 31:53ago, but that's how we came to it.
- 31:57Let's talk a little bit about the data quality like in terms
- 32:01of one that recurring themes from the from the blog post was
- 32:05just that the higher quality data.
- 32:07So we can break it down in terms of for example, the GBT 4
- 32:10tokenizer, right from Token, we can talk about from the
- 32:13standpoint that we have higher quality data which resulted in
- 32:15US doing the Dents MOA versus MTLB, right.
- 32:20So I'm just, I'd like to chime in a little bit about that just
- 32:24to provide the context that we end up utilising the very data
- 32:28tools that Databricks has. I'm not trying to upsell that by
- 32:31the way. I'm just calling out that we're
- 32:32from Databricks, so cool of using our own tools.
- 32:35We end up dog fooding yourself basically to go in and actually
- 32:38produce, get high quality data so that we could go ahead and
- 32:42actually produce more. And that's more open for anybody
- 32:46here right now at this point? I think you should observe it.
- 32:50I think when we moved from was it like I I think our our data
- 32:54processing literally got 100 X faster.
- 32:56Like I think not even exaggerating, It became much
- 32:59much much easier to deal with these huge text datasets.
- 33:02I think it was pretty remarkable for our data team because
- 33:07obviously when you're dealing with many terabytes of data,
- 33:12that's not something you want to do on your laptop.
- 33:14So getting everyone on board with Spark and having the
- 33:19ability to write something you're kind of pandas, Likely
- 33:23something, something fairly familiar, but that kind of
- 33:26justice works at scale was really helpful.
- 33:30We had very interesting time exploring the data, trying to
- 33:37run all sorts of different transformations, keeping track
- 33:41of everything. Because you try lots of
- 33:43different experiments, you try lots of different preprocessing,
- 33:45you have this whole data science pipelines to go from raw text to
- 33:49this subset of really clean data that you actually want to use.
- 33:53So yeah, it ended up working really well getting acquired by
- 33:59Databricks. Like honestly, I think that when
- 34:01we first found out is a little bit like OHH, data breaks.
- 34:04OK, right. Not like the first company you
- 34:07think of as deep learning, but in retrospect seeing how much of
- 34:11the work is the data pipeline and data management and how much
- 34:16alpha there is in doing that really well, it's like ohh, this
- 34:19makes total sense. Like I I really see the
- 34:22integration here. So it's been a very positive
- 34:26experience for everyone who had to crunch large data sets here.
- 34:29Bendish, I know you got something.
- 34:31For us Ohh yeah sure. So I think when one of the
- 34:34things that was that was actually I mean like we're kind
- 34:38of talking about why this was like a match rated habit, right.
- 34:40Like we, you know and I think we talked about this a few weeks
- 34:44ago too like our data processing speed up so much after after the
- 34:48data we're acquisition, right, Because it it's just we have you
- 34:52know these experts and and this is this is this amazing system
- 34:55that in this platform that we built to do this.
- 34:58And then once you have that data, you have to pump it into
- 35:023000 plus GPUs and actually train these jobs, right.
- 35:05And so there's actually a problem that we had started
- 35:06working on at Mosaic. But you know especially when you
- 35:09have these cloud built platforms, the underlying
- 35:12storage is object storage, right.
- 35:14And so when you want to distribute this data right where
- 35:18you, I mean at at scale right, we're running one training job
- 35:21but we're carving up the work and kind of giving it to these
- 35:25different GPUs. And in order to do that, you
- 35:27also have to take your data and split it up and send it to these
- 35:30different GPUs. So doing that 1000 GPU scale is,
- 35:33you know, turns out it's really difficult.
- 35:35And also then streaming it over the Internet or streaming it
- 35:38over a kind of high bandwidth network also has comes with its
- 35:42own set of problems. So for you know, anyone who's
- 35:45been on the other side of a DDoS attack, you know, you kind of
- 35:47hit these issues especially when you're paying these service
- 35:49providers. And so you know, splitting up
- 35:52that data and then really streaming it or chunking it up,
- 35:56downloading it, making sure that you're downloading stuff that
- 35:59you're going to need next in the background of being able to
- 36:02shuffle it at scale. And then kind of, you know
- 36:06basically you're reorganise it to all these different GPUs.
- 36:09You know that's kind of what our streaming data sets library lets
- 36:12us do. And and you know it's it's it's
- 36:14really just even gotten better and in a more capable right to
- 36:17to kind of train the scale of this model with with B Rex.
- 36:23I think that the streaming team sounds good.
- 36:26Yeah. Ohh yeah.
- 36:27I was just gonna say, like out of all the different pieces of
- 36:29infrastructure, we had, all the different tools.
- 36:31I think streaming is the one piece that didn't break it all
- 36:34as we scaled. Yeah, So this is pretty
- 36:36unremarkable. It was pretty amazing.
- 36:38That's like that's like almost for one person team and a lot of
- 36:41sense like that's like you know it's like it is impressive with
- 36:44those guys like that that kind to us but like yeah no, I mean
- 36:48it's it's a it's an incredible piece of engineering that that
- 36:51we kind of built there. Yeah, actually I think you want
- 36:56to try it too, so go for. Go another another fun story
- 36:59about kind of scaling up our data.
- 37:00So our streaming data loader held up and was very scalable.
- 37:03Object stores on the other hand not not as much.
- 37:06So fun story. We actually have to switch
- 37:07object stores at one point and then also implement some hacks
- 37:10to be able to download the data and not get throttled or have
- 37:13other issues with objects or in the cloud providers.
- 37:16Just because we were it. Not necessarily with data, but
- 37:18also with checkpoint download. When we're when we're launching
- 37:20a whole bunch of training runs. When you start to really scale
- 37:23up, you start to make the object or about happy, so.
- 37:27Yeah, and. Essentially, you're trying to
- 37:28list the, right? So yeah, like the listing alone,
- 37:31basically you're doing a DDoS attack directly on the object
- 37:33store. Yeah, that's always pretty much,
- 37:36yeah. Yeah, you have thousands.
- 37:37Of these workers blasting away. So sorry, go ahead.
- 37:41You know, I I think it was cool about that is like some of them
- 37:44were were things in our libraries where we had done at
- 37:47first like what seemed like a natural thing to do.
- 37:48Hey, you know every GP should go download the metadata file,
- 37:51right? That can't be so bad, right?
- 37:53And that's totally fine when you only have under GPU.
- 37:55That's why we have 3000 to the object store.
- 37:58It looks like you're spamming them and you get like shut down.
- 38:00So then we had to like put in all these fixes which which
- 38:02surely makes sense, you know, like just one guy downloaded and
- 38:04then share the out of date or something like that.
- 38:07But now we've actually fixed these, our customers won't see
- 38:09these problems at all, which is, which is kind of cool.
- 38:12Cool, cool. So before Dimitrios takes over,
- 38:14I just wanted to do a quick call up because Davis did bring that
- 38:17up. He said you don't want to run
- 38:18this on your laptop. Now I did want to clarify that's
- 38:20running on your laptop for trainee, which we're completely
- 38:23agree with it if you to go get the the quantized version.
- 38:27I think Abby correctly is the guy from Apple who actually
- 38:30quantized the Uber X down. If you've got what I think
- 38:34you're telling me, 96 gigabyte MacBook Pro, you should be able
- 38:38to go ahead and run and run imports directly on the laptop
- 38:40itself. Yes, yeah, yeah.
- 38:43So, so there are at least a couple of high end laptops which
- 38:45coaching on it. I think, I think the Llama CVP
- 38:48folks are also working on it. So hopefully that will open up.
- 38:50Today, yeah, yeah. Yeah.
- 38:51Yeah. Yeah, no, I've been playing with
- 38:53that myself and my poor will back studio is not.
- 38:58Right. You should be able to run I
- 38:59think once Llamas CPR that you should be able to run on your
- 39:04gaming rig at home right after it's quantized and.
- 39:06You gotta like, yeah, I know. But see, I only have 32 units of
- 39:09this one. So it's just that excuse for me
- 39:11to buy more memory now. Yeah, yeah, yeah, that's all.
- 39:15So, yeah, to help me out here. Come on.
- 39:16Come on. Exactly.
- 39:17Quality. That's, Yeah, that's.
- 39:18That's personal. I don't know that's that's just
- 39:2132 gigs. I didn't come on.
- 39:24I I feel over the horrible right now.
- 39:27No back on track the me too. Let's go for but.
- 39:31We digress, but there is this data quality issue and there was
- 39:35a question coming through in the chat that I think is great,
- 39:38which was about thinking about future models is moving towards
- 39:41synthetic data modalities on the road map.
- 39:45Yeah, I think that's definitely a a researcher.
- 39:48We're very interested particularly because as you try
- 39:52to to even even larger models, we're starting to run out of
- 39:55just data on the Internet. I think one of the core beliefs
- 39:59we had with training custom models is that there's actually
- 40:03more useful data held privately by enterprises, right.
- 40:07And like potentially that's like a like a way for people to tap
- 40:10into it. But since I think we found even
- 40:13with Drex and we're just trying to explore what this that
- 40:17basically being able to take a small data set that you have and
- 40:21expand it. And then like fine, that is
- 40:23helping a lot. We're trying to figure out ways
- 40:25to do that with our customers as well.
- 40:26So, so generally, generally like very interested in synthetic
- 40:30data and hopefully in the coming months and stuff a lot more
- 40:33saved. Ohh, sorry, just had a quick add
- 40:35on to that. So I'm on the topic of a lot of
- 40:38our research eventually funnelling into the product and
- 40:40things we offer to customers. One of the biggest.
- 40:42So we actually have a a fine tuning API and coming soon
- 40:46ability to fine tune DRX as well.
- 40:48And one thing that we really learned through a lot of our
- 40:50customer conversations is that customers struggle to have very
- 40:54large labelled datasets for supervised fine tuning and
- 40:57synthetic data is one really great way to kind of address
- 41:00that. And that's something that we're
- 41:01actually looking at first first obviously doing all the research
- 41:03on and deeply understanding ourselves, but then eventually
- 41:05actually building into the offering as well.
- 41:07So very much on the road map. Perfect.
- 41:10No, so I just realised basically both from what you're talking
- 41:13about in terms of the latest research, I don't one thing we
- 41:16may or may not have discussed, it was a curricular learning and
- 41:18I was wondering if one of you can chime in a little bit about
- 41:20that because that actually had to do a lot with the improvement
- 41:23for training as well. I just realised because we
- 41:26talked about together. We talk about data, but I forgot
- 41:28about the curriculum. Anybody wanna chime in on that?
- 41:33Yeah I I can try in a little bit.
- 41:35So what we found is that that and we did found this through
- 41:39small scale experiments that it helps a lot to kind of change
- 41:42the distribution of your data towards the end of pre training.
- 41:46So we did these experiments when the last 10% or 20% of training
- 41:49we would focus the the brain data on less just web scale tax
- 41:53and more on like the high quality data or code data that
- 41:55we actually wanted the multi really good at And that turned
- 41:58out to help performance a lot on the sort of benchmarks that we
- 42:01care about. So for DBX broadly we wanted a
- 42:05general purpose LLM that was also particularly really good at
- 42:09coding and reasoning. So when we when we basically
- 42:12tailored the pre training data towards that and again this is
- 42:15really easy with our tools because we use these kind of
- 42:18streams and you can change the ratio of the streams at runtime.
- 42:21That helped a lot in the final performance.
- 42:23And I think actually when we talked about with some of our
- 42:27reporters as well, we tried out different data mixes.
- 42:31So this is actually a pretty exciting moment during the
- 42:34Imdbpro X and we found that the Curriculum Learning One worked
- 42:37the best. Which is by the way, I don't
- 42:40know. I mean that is super exciting to
- 42:42me, right? Like like you know, because you
- 42:44you hear all these stories about people who like are spent a lot
- 42:47of money trying to like take these base models, you know,
- 42:49fine tune them or or or change things.
- 42:52And I think like if we can get really good at continuing to
- 42:56teach these models more and more effectively, you know, and and
- 42:59kind of get away from hey, I I added a bunch of my data but the
- 43:02model actually got worse and a bunch of other stuff.
- 43:05You know, if we can kind of crack that that that's kind of
- 43:09amazing and that's like super exciting I think about being
- 43:11able to kind of like change the data mix or training like kind
- 43:16of look at where it's at. If you have good evals in place
- 43:18and that kind of tweak it as you're going along, right,
- 43:20you're almost kind of like figuring out what you can
- 43:22continue to teach the models. So, so really looking forward to
- 43:24kind of like what we kind of keep developing on that front.
- 43:28O, there's an awesome question that came through the chat again
- 43:32from Max, and I think this one is directed towards you, AJ.
- 43:35For a large scale training or generally switch to Slurm
- 43:40instead of OK eight, does Kate effect itself affect your
- 43:44training, the pipeline? And what factors could you make
- 43:47you switch from K to slide? Ohh that that's an interesting
- 43:50one. So the reason why we chose
- 43:53Kubernetes is actually because we were building this training
- 43:55platform to be multi cloud and also to be something customer
- 43:59facing and provides A significantly easier to build
- 44:01multi cloud. You can run on AWS, Azure,
- 44:04Oracle, GCP, wherever much more easily than you can with Storm
- 44:09and that was actually the big reason.
- 44:10Like at the end of the day when we built our product, our
- 44:12research team is is treated just like a customer and to an extent
- 44:15and our research team plus all of our customers running multi
- 44:18cloud Kubernetes is just significantly easier.
- 44:20Now in terms of scalability, yes there's a point there.
- 44:23I think the reality is once you really scale up the number of
- 44:25machines and the amount of hardware it's managing it, you
- 44:28have some challenges in scaling. But those are things that we
- 44:31actually built on workarounds for within our own platform to
- 44:33deal with. So at the end of the day,
- 44:35Kubernetes is simply you can think of as the foundational
- 44:38layer that manages the hardware, but we've built a whole stack of
- 44:41systems on top of it to really enable this large scale
- 44:44training. The whole chat wants to know
- 44:46this question which is smaller models on the road map.
- 44:52I mean why, you know, we just gotta go bigger.
- 44:56No, I mean, yeah, you know, I I think, you know, I think again
- 44:59like I think what we're doing is making, we're trying to make
- 45:02this available to a lot of different market segments,
- 45:04right. And so small bottles, big
- 45:06bottles, you know, everything in between I think are things are
- 45:09fair game. You could train a smaller model,
- 45:12right, with data bricks if that's really what you need.
- 45:16But you know, I think longer term we want to support as many
- 45:19use cases as we can for our customers and and so that's kind
- 45:22of how we'll tackle it. Excellent.
- 45:24All right. This is the last one I think
- 45:26that we can hit before at the end it's gonna be a rapid fire
- 45:29round so that we can all make our next meeting on time.
- 45:32And speaking on the topic of fine tuning, if we go with Q,
- 45:37Laura or some sort of Laura for do you what's it, what do you
- 45:41call it again DBX, DBX? Daba, Rex fan, etcetera.
- 45:47You got to work with me about. Going to state one of these
- 45:50times it will stick in my head anyway.
- 45:52Lightning round Q Laura or some sort of Laura for Dabber X?
- 45:56Which framework would you suggest?
- 45:58How many GPUs would make sense? I think for Kelora I we are
- 46:06working on modifying the Transformers integration to make
- 46:10it easier to use. I don't know exactly which
- 46:13frameworks are best for right now we are working on Laura Fine
- 46:17Tuning Support, just an 11 foundry which is our public
- 46:20training repo. So check that out and post an
- 46:23issue there depending on what you're looking for.
- 46:26But yeah, you can also take a look at just the the
- 46:28Transformers repo we were working on or basically right
- 46:31now. Excellent.
- 46:33So I think that is all for today.
- 46:38The last thing Jonathan got back to us in the chat for you AJ
- 46:41about the flavour of Kubernetes and was asking was it Open Shift
- 46:44Rancher? What?
- 46:46What did you use to manage the Kubernetes cluster, if anything?
- 46:51So very, very early on we used to use Rancher for a lot of our
- 46:54stuff, but we actually replaced large components of Rancher with
- 46:57our own with our own stack. Overtime for some of the more
- 47:01established cloud providers like 8 WS GCP, we'll just use their
- 47:05their managed one and build on top of that an OCI will kind of
- 47:08roll one of our own like open source distributions Kubernetes.
- 47:12Guys, I feel like we could have continued this for another hour.
- 47:15The chat is going wild. We didn't get to half of the
- 47:18questions and I appreciate everyone that came and was able
- 47:23to talk with me. I also appreciate everyone that
- 47:26is in the chat being super active and we're going to be
- 47:29doing more of these. So stick around and we will
- 47:33probably be emailing you when we have the next one.
- 47:36I really appreciate this. If anyone wants to dive in
- 47:38deeper, Davis and Bendish and I had a podcast about three weeks
- 47:45ago that came out and it talked a lot about the the different
- 47:49pains that you all felt when you were going through this.
- 47:53So we dove deep into it. I want to thank you guys so
- 47:56much. Even though I can only see your
- 47:59frozen faces, I'm visualising you, smiling and being very
- 48:05happy right now. All right.
- 48:07I'll vote for you buddy. We're all happy right now.
- 48:09So we're getting and thank you very much to everybody who's a,
- 48:13who's watching us. I really, we really appreciate
- 48:17you guys diving in and like always to me, Joe, thank you
- 48:20very much man. This is always glad to join.
- 48:23This was awesome. So much so much fun.
- 48:25Thank you for hosting. This was great.
- 48:27Thank you all. We will see you all later.
- 48:29Have a good one.