Latest / Agentic Conversations (formally mlops.community) / AWS Tranium and Inferentia // Kamran Khan and Matthew McClean // #238
Transcript
- 0:01My name is Matt McLean. So I lead the Annapurna customer
- 0:04engineering team. So my team essentially help
- 0:07customers adopt, adjust training and friendship for their
- 0:11workloads. So yeah, so I work for Adams.
- 0:13I've actually been working for a jobs for more than eleven years
- 0:16now, and I've been working in the Annapurna and Address
- 0:19training team for a couple of years.
- 0:21And how I take my coffee? Well, my wife's Italian, so I
- 0:25prefer to take it in Italy. And yeah, and a a cafe place
- 0:28with Italian coffee tower courtroom.
- 0:31Hello, my name is Kamran Khan. I lead our business development
- 0:34and go to market teams around in French and Tranium and I like
- 0:39all types of coffee. So generally I'll take A at home
- 0:44I'll make myself a flat white and on the go I like a variety
- 0:48of kind of light to medium rows and drip coffees.
- 0:53Welcome back to the ML OPS Community Podcast.
- 0:56I am your host Dimitrios, and we're back with another banger.
- 1:01Today we're talking to Matt and Cameron about Inferencing and
- 1:05Tranium, these 280 AW services that were demystified for me.
- 1:11Over the next 40 minutes, I got the deep dive on what exactly
- 1:17they're good for, what they're not so good for, how they work,
- 1:20what they work with. If you're using Sage Maker, do
- 1:24they work with that? If you're using Bedrock, how can
- 1:26you utilise them? Why would I even utilise them
- 1:28instead of the common GPUs and what are their strengths?
- 1:34They really breakdown why they created both of these, which are
- 1:38basically they said, you know what, we want a chip that is
- 1:42tailor made for deep learning workloads.
- 1:46And so you know how Amazon and AWS like to do it.
- 1:50They just went out there and they they made it happen.
- 1:52They turned it into a reality. We talked with Cameron and Matt
- 1:55all about it. If you like this episode, as
- 1:58always, share it with a friend. We would love to hear from you
- 2:02on the Spotify feedback section. That's always great.
- 2:07I get a nice little chuckle when people send in funny comments.
- 2:11I read every one of them and let's get into it.
- 2:14I'll see you on the other side with Matt and Camera.
- 2:22All right, so Matt, I gotta call it out first.
- 2:25You were in the community in 2021.
- 2:28I was just looking at our conversations in Slack from
- 2:32three years ago. It's awesome to finally get to
- 2:35have you here on a podcast, but it's almost like we get a 2 for
- 2:381:00 today with Cameron. Two we want to talk all about
- 2:43AWS is Influencia and Tranium. It's probably a good place to
- 2:47start with just giving us a rundown on what it is and why AW
- 2:53has invested in something like this.
- 2:56Yeah, absolutely. So we've been at AWS been
- 2:59investing in different types of accelerators and use cases for
- 3:03customers for a very long time, right.
- 3:06And so as the AI revolution has really taken hold, and I would
- 3:10say like, you know, I think the, the interesting part is right,
- 3:14like most consumers or most people are really picked up on
- 3:17AI with the introduction of chat TPT last year, right?
- 3:21Where they're like, oh man, look what I can do for me.
- 3:23Look what these large language models can do for me.
- 3:26But I think, you know, the US in this community have been seeing
- 3:29this trend for the last 10-15 years, really since Resnet
- 3:33really started showing the potential of what models can do
- 3:38and how they can kind of start providing, you know, more
- 3:40superhuman responses to simple applications like computer
- 3:44vision and classification, but now with language, with video,
- 3:48with images and so much more. So because of this, you know,
- 3:53AWS has been looking at this space and like, well, how can we
- 3:56offer customers more choice, higher performance, lower cost,
- 4:01of course, and make it easier and more accessible to more
- 4:05users and developers and customers ultimately, right?
- 4:08And so they started investing in our own generation or purpose
- 4:14built accelerators, our AI chips called Influencia and Tranium.
- 4:18And we launched our first Infancia AI chips back in 2019.
- 4:23And in 2019, it was inferential 1 focused on inference
- 4:26acceleration and it was really good for CNN applications like
- 4:30Yolos and and Residnets and image classifiers.
- 4:33And then in 20 years time is flying right.
- 4:37In 2022, we introduced Tranium and Tranium really was designed
- 4:44as the successor to infrared state in some regards.
- 4:47It was our second ML chip. This really brought a lot of
- 4:50modernizations and really focused on LM's and generative
- 4:54AI and how to accelerate and distribute large, large models
- 4:57across multiple accelerators and make it very efficient and cost
- 5:00efficient as well. And then last year, we
- 5:03introduced Inferential 2, the successor to Inferential O.
- 5:07Now we're building kind of this family of accelerators basically
- 5:11to provide users choice, right? So give them opportunity to get
- 5:15higher performance, lower cost, make it easier and more
- 5:18accessible for more users. And we want to continue to
- 5:22invest in these types of accelerators, right?
- 5:24So training them two was announced at last reinvent by
- 5:27Adam and it's going to be available later this year.
- 5:31But it's going to come with 4X higher performance than tier in
- 5:34one. And we're pretty excited about
- 5:36what that's going to open up and what the possibilities that's
- 5:38going to open up for a lot of users as well.
- 5:41So I, I love that you're talking about the choice and bringing
- 5:45more choices cause Amazon is kind of known for that,
- 5:49especially at AWS, they're known for all the different choices.
- 5:52And I want this conversation to really be around like, when
- 5:57would we use it? Why would we use it?
- 5:59And what the strong points are, the weak points and whatnot.
- 6:04Of course, the first question that comes to my mind really is
- 6:08about how does this compare to a GPU?
- 6:13How is it different? What are things?
- 6:15How does it match up right? Like and what GPUs, what should
- 6:19we expect? There's like a lot of unanswered
- 6:22questions that I can imagine. People are sitting at home or in
- 6:26their cars listening and thinking like, OK, cool, so
- 6:30train him and Influencia. It's like GPUs but not.
- 6:35Yeah. So we have designed training and
- 6:39inference are really to be a super specialised accelerator
- 6:44for deep learning applications. So GPUs originally were there
- 6:50are graphical processing unit, right.
- 6:52So they were never designed for deep learning workloads.
- 6:55But obviously it's a it's a great fit, but we decided to
- 6:59desire something really specific to deep learning.
- 7:02OI guess the key difference is, you know, comparing a GPU and
- 7:07our hardware was that GPU. You have a lot of these
- 7:10streaming multiprocessor, lots of thousands of cores and and
- 7:14tensor cores going essentially, you know, what is a deep
- 7:17learning application? Why do you need an accelerator?
- 7:20It's primarily to, I would say a couple of cool things.
- 7:23One, you need to accelerate matrix multiplications, right,
- 7:26the linear algebra, you know, calculations so that and that
- 7:30kind of forms think more than 90% of the like the operations
- 7:34or the T flops, right. And any you know, this is for
- 7:37both training and inference. So you need something because
- 7:40our standards, you know, CPU is just not fast enough.
- 7:43So GPU is good for that. And what we provide essentially
- 7:46in our hardware is what we call a tensor engine.
- 7:49So it's actually a systolic array that can really accelerate
- 7:53these matrix multiplications. So it can do for example, a 128
- 7:57by 512 in a single clock cycle. So really and it really is
- 8:02designed for an accelerated those matrix multiplications.
- 8:06The other part of accelerators that is needed is really high
- 8:10bandwidth for memory, right? And in this respect, they're
- 8:13quite similar. So we also have HPM, right?
- 8:15And, and it's really designed to, you know, take the weights,
- 8:19gradients and so forth, you know, that's stored and then,
- 8:22you know, really quickly moved them into the cache, move it
- 8:27into the accelerators to do the computation.
- 8:29So that's kind of the the other key part.
- 8:32So yeah. So the main difference I would
- 8:33say is though the way computation is done.
- 8:36OK. And that's through the Tensor
- 8:37engine. I like that, and I can imagine
- 8:41people are going to want to know like actual numbers and
- 8:45benchmarks, and so we'll leave a link to a blog post.
- 8:49But do you have any numbers off the top of your head?
- 8:52Yeah, some, some numbers up. So of course, I think the best
- 8:56place is gonna be our documentation.
- 8:59We publish actually a range of different benchmarks and kind of
- 9:02like hardware specs as well, right.
- 9:04So you could learn exactly what the Tflops are.
- 9:07But for training applications, we kind of like to think about
- 9:09what is the effective Tflops you can achieve while training, you
- 9:13know, large language models for example, right.
- 9:15And so we like to kind of look at what is our effective Tflops
- 9:22per dollar. So when we look at that and we
- 9:24compare it to, you know traditional accelerators on the
- 9:28market on AWS today, we're able to lower the cost to train
- 9:31models by up to 46% using tier and one even against kind of
- 9:36like the more common or you know, like latest generation of
- 9:40other accelerators available on the AWS.
- 9:43So it's very competitive. And at the same time on the
- 9:46inference side, we see a very similar story as well, right.
- 9:49So with the kind of conscious decisions we made in our
- 9:53hardware really specialising on just these, you know, machine
- 9:58learning workloads, rather than trying to be general purpose,
- 10:00like for example, we get this question quite a bit is can I
- 10:03run crypto algorithms on inference and training or can I
- 10:06do like graphic simulation on inferential training?
- 10:10Going back to your earlier point of like, you know, like, I think
- 10:13it's like a GPU. So can I run other workloads
- 10:17that require that level of horsepower?
- 10:19And, and the answer is no, we, we can't actually run crypto
- 10:23algorithms. We can't run, you know,
- 10:25simulation workloads and not that that hardware necessarily
- 10:30can't support it is like we haven't invested in the software
- 10:32stack to enable them because we want to be specialised, we wanna
- 10:35be focused and that gives us the ability to really hyper tune
- 10:40lower cost to train, you know, to 50% lower cost to training
- 10:43models. And at the same time when you're
- 10:45deploying models get higher performance and reducing your
- 10:48deployment cost by, you know, up to 40% as well using inferential
- 10:51too. And I like this idea of,
- 10:54alright, you're trying to make sure that you're looking at the
- 10:59price of training or the price of inference and you're seeing
- 11:04that it's going down like 46%, which is not a small number.
- 11:08And I like that number when I'm especially if I'm thinking about
- 11:12spending a lot of cash. If it's 46% less, that's a good
- 11:17chunk of change right there. And the next obvious question I
- 11:22think I have just as someone who is not super familiar with
- 11:26training or influencia is do I still use CUDA?
- 11:31Like what do I work with inference and training mode?
- 11:35Yeah. So we don't support KUDA.
- 11:37So KUDA is you know, a, a library very specific to GP's
- 11:41and very specific NVIDIA GPUs. So what we have instead is our
- 11:46own, we call it SDK, it's the Neuron SDK.
- 11:49And So what that comprises of is essentially of kind of think of
- 11:52it three blocks. So we have the framework
- 11:56integration. So for example, we integrate, we
- 11:59work with Pytorch, Tensorflow typically for inference and
- 12:03we're very soon going to have Jack support.
- 12:06So basically the the first part is to tie in.
- 12:08So basically what we want to do is allow our users to stay in
- 12:13the e-mail framework that they prefer, right?
- 12:15Minimise the sort of code changes they need to make to use
- 12:18our, our purpose built hardware. So that's kind of the first part
- 12:22of the SDK. Then we have the compiler
- 12:23itself. So our compiler stack is based
- 12:26on XLA. XLA was originally part of the
- 12:30Google Tensor Flow project, but is now, and we are one of the
- 12:32founding members of the Open XLA initiative.
- 12:36It's an open source initiative. So there we work with Google, we
- 12:40work. With.
- 12:41Others like Meta, Invidia, Apple, other companies in terms
- 12:45of evolving the XLA standard. So that kind of defines the all
- 12:49the operators and that kind of get lowered in the in the in the
- 12:54in compilation plug and uses an intermediate representation
- 12:59called stable obituary to define all those operators.
- 13:02So our compiler uses hello and then it compiles essentially the
- 13:06computational graphs forward backward pass optimization step
- 13:11all into low level machine code, right?
- 13:13And we call that the neuron executable file for in there.
- 13:16So basically that runs the specific commands on the
- 13:19different engines are now an accelerator and that then these
- 13:23nips get run on the accelerator by a runtime.
- 13:25So the runtime executes these compiled artefacts and also does
- 13:29a lot of the networking, right? So when you're doing a
- 13:31distributed inference or training job, then you have all
- 13:35these collective communications, right?
- 13:37You need to communicate between the different accelerators.
- 13:40So the runtime also handles that.
- 13:42So with all these kind of components, you kind of get into
- 13:45end coverage of our software stacks and able to run your
- 13:48Pytorch, your your code on our accelerator.
- 13:53So if I'm understanding this correctly, you're really trying
- 13:55to allow people to use it Torch or Tensorflow or whatever
- 14:00they're used to using. But then and if you want, you
- 14:05can just stop there. But if you want to go deeper,
- 14:08you can through neuron. Yeah, you can.
- 14:11There's a few different ways. So for example, if you know,
- 14:15most users would just use, you know, standard Pytorch and then,
- 14:18you know, compiled their model for Pytorch.
- 14:20We use the XLA version of Pytorch, right?
- 14:24That is also used by Google when running on Tpus.
- 14:28So most users can just stay writing their code on Pytorch
- 14:31and work fine. If they want to have more
- 14:33control. Then there's a couple of
- 14:36different ways that people can, you know, get better
- 14:38performance. Or, for example, if there's a
- 14:40certain operator that we don't support and they want to
- 14:43implement that, then they can actually write their own custom
- 14:46C operators. So one of the engines in our
- 14:48accelerator is a signed engine. And so you can write 6 plus plus
- 14:53code to execute custom operator, say Pytorch operator, and that
- 14:57will run on the accelerator. In a couple of months, we're
- 15:02gonna have a, a new kernel interface.
- 15:05It's called Neuron kernel interface or Nikki for short.
- 15:08And this will provide a if you're familiar with Triton.
- 15:11So it's many customers that want to further optimise performance
- 15:16and they want to do kind of what kind of tile level computations,
- 15:21right? So we're, you know, reduce the
- 15:23amount of kind of memory transfers between HBM and SRAM.
- 15:27So if you're familiar with, for example, the Flash tension
- 15:30algorithm, right, that is the core, you know nice how flesh
- 15:33attention works, it's operating in ISRAM rather than going back
- 15:37and forth to HPM. So you can do very implement
- 15:39algorithms like Flash Attention like Mumba using Nikki that will
- 15:43be launching very soon. And there's another way that
- 15:46customers can get further performance have more control
- 15:49over how the code is run on our accelerators.
- 15:53And is it only like do they have to go together?
- 15:59Are they married at the OR joined at the hip type thing?
- 16:02Or if I use Tranium, then I can use whatever else I want and I
- 16:07don't necessarily need to be stuck in with Influencia.
- 16:10Yeah, that's actually a really important one because we get
- 16:13that question all the time, right.
- 16:15If you utilise or let's say you're starting with training,
- 16:19you train your model and fine tune your models.
- 16:22You know, starting from let's say Metas Lama three model,
- 16:25which is, you know, a great choice to start and then you
- 16:29fine tune it. It's working great for your
- 16:31application. Are you locked in?
- 16:33And the answer is no, are kind of philosophy is trying to be
- 16:38part of the heterogeneous world. I think we know, you know,
- 16:42working on and building with inferential and training and the
- 16:44software stacks around it that users and developers are going
- 16:49to be pulling and, you know, mashing together different
- 16:53libraries and environments that will be best for them and maybe
- 16:57not for everyone, but they'll be best for them.
- 17:00And so the idea is we want to work within that world.
- 17:03We know it's going to be a heterogeneous compute
- 17:05environment where you're going to be utilising CPUs for certain
- 17:08tasks, GPUs for certain tasks and in French and training them
- 17:12for certain tasks. So when you're training a model
- 17:14with training them, you could deploy that model or I should
- 17:17say that the entry and exit, let's say you're fine tuning
- 17:20that model is going to be starting from a checkpoint,
- 17:22right? You could pick up metas,
- 17:24checkpoints off Hugging Face, for example, fine tune it for
- 17:27your with your datasets for your application space while
- 17:30utilising training. The output is just going to be
- 17:33another checkpoint that's defined by Pytorch.
- 17:36And then you can then deploy that anywhere in French is a
- 17:39great option, but you could pick U, you know, any GPU or embed
- 17:43that model down. If it's, you know, for like in,
- 17:45you know, on Prem solution or like an embedded device, you
- 17:49know, there's a lot of wearables and a lot of different versions
- 17:53now with like we're seeing a lot of the AI wearables, right?
- 17:56Like with what humane is doing with what other solutions are
- 18:00doing. And then and then vice versa as
- 18:03well, right? So you could take models that
- 18:04are pre trained or fine-tuned on Tranium and then deploy them to
- 18:09in friendship seamlessly as well, right?
- 18:11Just kind of taking those checkpoints.
- 18:14Umm, so basically that's just one part of the whole workflow,
- 18:19right? Like if you're trying to go and
- 18:22do something with deep learning these days or AI machine
- 18:27learning, whatever you want to call it, you've got all the
- 18:31other pieces around it. And I instantly think about how
- 18:36does this work with Sage Maker? So that's probably where we
- 18:40could start. But then I want to know like,
- 18:42OK, So what if I'm running Kubernetes and what if I have
- 18:45Ray or what? Like how does this fit with all
- 18:49of those different pieces of the puzzle?
- 18:51And so with Sage Maker, that's probably the easiest one to
- 18:55start with because I think a lot of people in the community and
- 19:00listening are using Sage Maker. And then maybe we can go to
- 19:04Bedrock and we can go to just EC2 or whatever it may be.
- 19:09Yeah. I think it always starts with
- 19:11the team right, responsible for, you know, either training or
- 19:15deploying the models, right. And what is there for example
- 19:19level of competency, what do they know today?
- 19:22What is their kind of maybe company policy or standard, you
- 19:28know, that they have to adopt because, you know, a lot of
- 19:31companies will standardise on a certain technology platform and,
- 19:35and kind of seems a little bit, you know, constrained to adopt
- 19:38to that policy. And it's always I, I see it as a
- 19:41spectrum of ease of use and control, right?
- 19:45So taking into the bill as a team, taking the sort of the
- 19:49spectrum easy of control is kind of where you kind of land in
- 19:51terms of what is the best choice.
- 19:53Obviously Sage Maker is an excellent, you know, the best
- 19:56service and offers the full lifecycle management and it has
- 20:01full support for infringing training.
- 20:02So for example, there's kind of two options.
- 20:05Actually on the training side, we have the kind of the standard
- 20:09sort of ephemeral training jobs that made many of the listeners
- 20:13are familiar with. You know, if you want to, you
- 20:15know, using the Sage Maker SDK or through Studio, you can like
- 20:18launch a training job, it'll spin up the instances in the
- 20:21background and kind of manage infrastructure.
- 20:23So that's kind of one option. We also have support for a new
- 20:27service that was launched end of last year, Hyper Pod, Sage
- 20:30Maker, Hyper Pod. So if customers are familiar
- 20:33with kind of a slum interface and more of a fixed cluster,
- 20:37right, they maybe want to have many different jobs or one long
- 20:40running say training jobs. So they don't want them to be
- 20:42ephemeral, they want to sort of have dedicated cluster.
- 20:45Then hypothesise is a nice solution there and it handles as
- 20:48well all of the kind of the failover managing essentially
- 20:51the infrastructure when you have a hardware should replace the
- 20:54hardware for you. O those kind of two, two options
- 20:58in Sage Maker. And then on the inference side,
- 21:00but you also have the endpoint support.
- 21:02So you can deploy to either in French or you can even deploy to
- 21:06training because training has a few more accelerators, more HBM
- 21:10memory. So for large model, we'll save
- 21:12that LAMA 370 be sometimes the train makes a better instance
- 21:18choice for inference for doing your inference of those models.
- 21:21So that's also supported in the Sage Maker endpoint service.
- 21:26Oh, interesting. Yeah, that that is another piece
- 21:29to it. Like Influencia basically can
- 21:31take whatever you throw at it. Yes, Remember I can explain the
- 21:35difference between infringing Tranium.
- 21:38So essentially at the accelerator level, it's
- 21:41basically the thing basically the same they have for the each
- 21:46accelerator chip has two neuron cores.
- 21:48So you can kind of think of a neuron core a little bit like a
- 21:51GPU. So an inference, so inference
- 21:53here is is essentially a, it can be deployed in more regions, it
- 21:58has lower power requirements because it has less chips.
- 22:00So in training we have 16 accelerators, whereas in in
- 22:04friendship we have 12. Also the network connectivity
- 22:08between the instances. So we're using ear networking
- 22:11between the instances. So in training we have up to
- 22:141600 gigabits per second network connectivity.
- 22:17Whereas an infringer we don't need, you know, typically when
- 22:19you're doing inference, you don't need this high speed, high
- 22:22bandwidth networking connectivity between the
- 22:24instances. So it's only 100.
- 22:27So yeah, so infringe share is also cheaper instance option,
- 22:32but you can actually train on infringer, which is interesting.
- 22:35And you can actually do inference on training.
- 22:37So yeah, I know it's a little bit confusing, but they're they
- 22:40hold some. Just to make it easy for
- 22:42everybody. But it are there people doing a
- 22:46lot of that? Like just because you can
- 22:48doesn't mean you should, right? Are there people?
- 22:50That are doing it. So there are so as I mentioned,
- 22:53so for customers who want to deploy large alms like Llama 370
- 22:59B. So when you getting into sort of
- 23:02towards the 100 billion parameter models, actually
- 23:04training is actually a better a better choice.
- 23:07OK, OK, fascinating to think about that.
- 23:10Now what about with just like an EC2 instance?
- 23:14Yeah. So on EC2 there's many different
- 23:17options. So we have a lot of customers
- 23:19who have kind of standardised on using, for example, Kubernetes
- 23:23right as their platform for doing either inference or
- 23:26training. So we have full support.
- 23:28We've even developed a Kubernetes plugins which will
- 23:32help kind of, you know, with the resource management or for
- 23:35example, your we call the neuron devices.
- 23:38So for example, when you configure your Kubernetes pilot,
- 23:41you can say, OK, I want to have four on your own devices.
- 23:44So it'll be actually the the we have a plug in that will help
- 23:47manage the, you know, reserving and allocating those resources.
- 23:52And so that's a very popular option.
- 23:55We have customers using parallel cluster.
- 23:57So parallel cluster essentially is a for customers that like
- 24:01using a slum interface. It's an open source offering
- 24:04targeted kind of HPC and machine learning workloads, as I said
- 24:07through a slim interface. So that is also a popular option
- 24:12for training, training large models.
- 24:14And then we have some good collaboration with partners.
- 24:17So we have support and race. So we've worked with the any
- 24:20scale team and the open source community.
- 24:22So for example, you can deploy your models with reserve and
- 24:26also use the Ray train when just recently we've announced support
- 24:30for Ray train. So you can use their API and use
- 24:33Ray as a way of of managing your training or inference workloads
- 24:37and as well out of bounds. So I'm sure many people are fans
- 24:41of the Metaflow open source project.
- 24:43So we had a recent blog. So they have actually added
- 24:46support for training and and friendship and the metaphor
- 24:49platform. So that's also an another great
- 24:51option customers like. Nice.
- 24:54And last but not least, because there is such a rich ecosystem,
- 25:00I am wondering about Bedrock and maybe you guys can just clarify
- 25:06too, when you've seen people using Bedrock versus Sage Maker,
- 25:10why, what the use cases are there?
- 25:14I think there's many, right? And so going back to our the
- 25:17beginning, you know, AWS is about offering customers choice.
- 25:21And so when we think about it at AWS, it's like this.
- 25:25We have this concept of like the generative AI stack, right?
- 25:29And at the top you're going to have the services Amazon is
- 25:33building like Transcribe, like translate things like this that
- 25:37are like end to end services where the models are integrated,
- 25:40the user experience is integrated.
- 25:42And it's just an API or service that you use.
- 25:45And, and you know, it makes it really simple for developers to
- 25:48integrate, but it provides you less customizability, right?
- 25:53Like you get the performance you get, you get the feature set you
- 25:55get. And then overtime, it improves
- 25:58the kind of next layer down that we've now added, which is like
- 26:02the bedrock level, which gives you a little bit more
- 26:05customizability right now, as more models have become popular
- 26:08as and to consume those models is models as a service.
- 26:12And that's where bedrock really sits right.
- 26:14So if you want to get access to the greatest models being
- 26:19produced today, right now, like from Anthropic or Mistral or you
- 26:24know, AI 21 and many others, and even Amazon with our Titan
- 26:27series of models, right, you can you very quickly get access to
- 26:32those and other open source models and then just consume
- 26:35them as an API, pay for them with a per token, you know,
- 26:38tokens per dollar, right? A very simple use case there.
- 26:42And now even you can even fine tune certain open source models
- 26:45as well, kind of make customise them for your.
- 26:48Liking as well. Are you fine tuning them with?
- 26:50Training them, yeah. So we utilise bedrock heavily
- 26:54utilises inference and training, but also other accelerator
- 26:57types, right. So it uses, not only is it uses
- 27:01Tranium, it uses inference to kind of build and serve these
- 27:04models across the board. So basically all of the
- 27:06resources AWS has at its disposal to engage with
- 27:10customers. And I think better off makes
- 27:12sense for a lot of folks. And it depends kind of where
- 27:15your ML expertise is, right? So if it's like, hey, we're just
- 27:20trying to build a really quick prototype or we're just at the
- 27:22application level, we don't have a lot of folks that understand
- 27:27how to train models because, you know, as easy as it's getting in
- 27:30today's world, it still requires some experience to do it
- 27:33efficiently or to even build the services around them.
- 27:36So Bedrocks are great answer for that.
- 27:38But if you're going down the stack a little bit, where you
- 27:40want to customise the interaction of models, you
- 27:43really want to own all of the data around the model and how
- 27:46it's being deployed and where it's being deployed.
- 27:48Certain applications where are very sensitive to data,
- 27:53residency and lineage, right? Like where is the data coming
- 27:55from, the train, the model, where is the servers running
- 27:58everything? It can't leave our borders.
- 28:00And this is probably more important for European
- 28:03countries, which have really strict data privacy.
- 28:05Laws love it. So for that, you know, Sage
- 28:08Maker in French and Tranium or EC2 are going to be better
- 28:12options. It gives you that same kind of
- 28:14ease of use, but greater flexibility of where you're
- 28:17deploying your models, how you're setting them up, which
- 28:20libraries are they integrating with?
- 28:22You know what, what other data it's Co mingling with right like
- 28:25and if you're building a broader pipeline of services, you can Co
- 28:29locate your accelerators into one region to improve the
- 28:33overall throughput and latency. So there's a lot of benefits and
- 28:36it's really just about what are the users objectives?
- 28:39What is the total applicable, the end application look like
- 28:42and what's the right fit for them and what's the right
- 28:45choice? And actually, we have, you know,
- 28:48I would say it's it's not a one, it's not an either or decision,
- 28:52right. So what we see a lot or with the
- 28:54customers we work with, they'll use services from bedrock,
- 28:58right? They'll be using one model from
- 28:59bedrock. Let's say that they're like, all
- 29:01right, I want to use one of the cloud models from bedrock.
- 29:04I also want to integrate with a utilising chat GPTS APIs, right?
- 29:09And so they have part of their services coming from there.
- 29:12And then, hey, we're going to be running all our Llama three
- 29:15models at, you know, 70 billion parameter Lama three models on,
- 29:18on inference and training, right?
- 29:20And so it's kind of a, you know, it gives you that choice like I
- 29:23can, I can get the right models for the right part of my
- 29:26application and build the best experiences for users and
- 29:31customers. Yeah.
- 29:33And that in a way makes a tonne of sense just because you're
- 29:37giving so much resilience to your application to by having
- 29:41that. And so if that rule, I fully
- 29:44understand Bedrock now. It's like, all right, if you
- 29:47just want that API, that's Bedrock.
- 29:49It's that like open AI API experience in a way where you
- 29:54get a model, you call the API and you're good.
- 29:57But if you want to go deeper, you want to have much more
- 29:59control, that's where you're going into the Sage Maker
- 30:01territory or the EC2 depending. It's like there's levels and
- 30:05there's layers of how much control you need and want, and
- 30:09that is which service you're going to use depending on what
- 30:12you're looking. For yeah, I mean, if, if
- 30:14Bedrocks kind of meets the application needs, like you're
- 30:17getting the right tokens per second, the right latencies, it
- 30:20has the right models that fit your application and needs.
- 30:24It's, it's a great option, right, because it's super
- 30:26simple. But if you need to go, you know,
- 30:28kind of peel that layer back, go one layer down, you know, that's
- 30:32where, you know, utilising or hosting your models or starting
- 30:35even with Jumpstart, because the experience is very similar in
- 30:38terms of getting a started or with utilising the Hugging Face
- 30:42TGI containers. You could deploy any model
- 30:45pretty easily, but you have greater control, greater
- 30:48flexibility, you can kind of tune the variables that matter
- 30:50the most to your, the, to the user experience that you're
- 30:55trying to generate for, for your customers.
- 30:58So let's just, it's, we get that question quite a bit as well,
- 31:02right? Which is what's better, Bedrock
- 31:05or Sage Maker or EC2? And I, I don't think that one is
- 31:08necessarily better. It's just, you know, what are
- 31:11the use case what what are the things that are most important
- 31:14to you and your applications. Yeah.
- 31:16And I do like this idea too that OK, maybe it's you're going to
- 31:20have a different piece of your application using different
- 31:25parts or different services depending on what your needs
- 31:28are. But also I can imagine that you
- 31:31get different teams using different services too because
- 31:36of their needs. And so looking at it from the
- 31:39point of view of like, hey, if this super simple API gets you
- 31:44there, then no need to overcomplicate it with a bunch
- 31:47of services, just use the API. Yeah, if customers are unsure, I
- 31:52think always started the easiest to use service and then you know
- 31:56then early really go down once you start, you know, finding
- 32:00that based on your application or context that you need to, but
- 32:04you know, it's going to have a lot more costs and a lot more
- 32:06things to manage. Yeah, once you hit the limits,
- 32:09then go deeper. But until you hit those limits,
- 32:12don't feel like you need to start at level hard.
- 32:16Well, that's, that's the funny part is like when I would say
- 32:19that that kind of mindset that you just mentioned is like start
- 32:22at level hard, right? Because I, I feel like a year
- 32:25ago, two years ago, when we were working with customers and
- 32:28users, it was always like, I have to train my own
- 32:30foundational model, right? And I have to do it all from
- 32:33scratch and I have to set up my data and I have to curate my
- 32:35data set. And it was always starting it
- 32:38hard because, you know, there was an unwillingness to use open
- 32:42source to a certain degree, right?
- 32:43And they're in, in kind of enterprise environments, right?
- 32:47Or there was like, ohh, we have to own everything.
- 32:49And I think that mindset has really changed with users,
- 32:52especially in the enterprise space.
- 32:53So like, no, no, I can start with open source.
- 32:55I can start with the Llama model or a Mistral model or a Zephyr
- 32:59or something else or a stable diffusion model.
- 33:02And I can fine tune it with my own data set and do it much more
- 33:07cost effectively and, and easier and with less manpower on our
- 33:11side and, and make, you know, just get to market a lot
- 33:14quicker. And and the I think the idea is
- 33:17now is how quickly can we get it done rather than like, hey,
- 33:21let's own the entire thing. Well, no.
- 33:23Let's leverage as much as from the community as possible and
- 33:27contribute to the community along the way.
- 33:30OK. So you're talking a lot about
- 33:31what you've seen out there in the wild.
- 33:34I think this is a good point to transition into like actual ways
- 33:38you've been seeing people using Trainum and Influencia and what
- 33:43some examples are of that. One of the key partners that
- 33:47will customers that we're working with is Anthropic.
- 33:49So towards the end of 2023, about September 2023 we actually
- 33:55had a have an agreement with them.
- 33:57So they are initially deploying cloud models onto infringer and
- 34:02training and these are actually going to go in bedrock as Kevin
- 34:05was mentioning earlier. So we're in the process of
- 34:08moving those across and Cameron also mentioned earlier training
- 34:12too. So a train him two is gonna be
- 34:14launched very soon towards the middle of 2024 to its end 2024.
- 34:19So yeah, and propagate going to be training the next Gen models
- 34:23on on the training. So, so yeah, so there are really
- 34:26exciting customer to work with and yeah, to look forward to see
- 34:29us seeing those models on bedroom.
- 34:32And there's a, we've been working with kind of a range of
- 34:35different kind of startups and enterprise customers, kind of
- 34:38customers bringing AI into their traditional applications, right?
- 34:43And now leveraging the alms to kind of improve the experiences
- 34:46and make it more user friendly. And on the startup side
- 34:49specifically, we're starting to see a lot of kind of emergence
- 34:52of new complete products, right? I think one of those areas is,
- 34:56you know, which is very, I, I think gaining a lot of momentum
- 35:00in the market is the concept of like AI agents or autonomous
- 35:03agents, right? And make them very personalised
- 35:07to your workflows, to your company or to yourself
- 35:10specifically, right. So one of these companies we've
- 35:13been working with that just recently launched a new service
- 35:17called, I think it's called my Ninja, but their company name is
- 35:21called Ninja Tech. They're based here in the Bay
- 35:23Area and they've been leveraging training and in friendship to
- 35:27fine tune their models and to deploy them at scale on the kind
- 35:30of serve all of their model needs.
- 35:32And so one of the things that's interesting about them is when
- 35:35they were looking out and starting and they started with,
- 35:38you know, the integrations from all of the models, models as a
- 35:41service, of course, as we kind of talked about.
- 35:44But really quickly, they're like, you know what, we can
- 35:46create highly customised, very efficient models starting from
- 35:52utilising open source models, right?
- 35:54And we're going to fine tune those models specifically for
- 35:57our use cases, right, which include like code assistance
- 36:01researchers, you know, your basic kind of like information
- 36:04gathering and, and, and reporting and also scheduling
- 36:08tasks, right? And outperform some of the most
- 36:10expensively foundational models that are trained from scratch.
- 36:14And So what training and inference, they're basically
- 36:16able to kind of utilise Llama three models to serve their
- 36:21customers. They're using a range of them
- 36:23all the way from the small 8 billion parameter code Lama
- 36:27models kind of in the middle from like you know, 30 billion
- 36:30perimeter and all the way to the 70 billion parameter models and
- 36:33able to reduce their inference costs and their deployment costs
- 36:37by 80% by utilising should training to serve these models.
- 36:42And another kind of example of this is as more customers as
- 36:47well want to build more customised models as well,
- 36:51right? O, we've been working with other
- 36:53guys that are trying to kind of better create better tools in
- 36:57this space as well, right? So, you know, fine tuning models
- 37:02can be challenging at a certain point, right?
- 37:04Like there's a lot of different techniques from softs to TRL to
- 37:07like, how do you do implement path?
- 37:09What are the right techniques to not overfit your model to make
- 37:13sure it's as efficient as possible?
- 37:15So we've been working with another Arthur called RCI and
- 37:18they're trying to optimise this space where users have data that
- 37:23needs particular sensitivities to privacy and to security.
- 37:29And they can set up training environments inside of customers
- 37:32domains like, you know, like in their AWS private clusters and
- 37:38do end to end fine tuning of models and create really highly
- 37:41specialised models at a fraction of the cost, right?
- 37:43So they're utilising training them to accelerate this and
- 37:46seeing up to 90% cost reduction utilising both their domain
- 37:52experience, which is a combination of highly efficient
- 37:56LLM fine tuning, but also concept that they've kind of, I
- 38:00don't know about Pioneer, but really leaning into which is
- 38:03going to be small model training, right?
- 38:05So as everyone's trying to go to like larger models, 70 billion,
- 38:09you know, hundreds of billions of parameter models, which can
- 38:12increase the abilities of these models.
- 38:15They're also thinking, well, how do I take a bunch of small
- 38:17models, less than 25 billion parameter models through less
- 38:20than 3 billion parameter models and create a lot of specialised
- 38:25small models and merge them together into a final model,
- 38:28right? So they have this model merging
- 38:29technology as well. And they're utilising training
- 38:32to even lower the cost of building all of these models and
- 38:36deploying kind of for more wide range of use cases.
- 38:38So great solutions across the board.
- 38:41So like if you're looking at, you know, you can definitely
- 38:43check out ninjas solutions that are live now and then RC at RC
- 38:48dot AI as well. Yeah, huge shout out to RC.
- 38:52I'm actually friends with their one of their founders, Brian
- 38:55Benedict. Ohh, yeah, yeah.
- 38:56And Brian's great. I love, I love that guy.
- 38:58I love what they're doing. The model merging is
- 39:01fascinating. And there's another guy in the
- 39:03community, Maximilian, who is doing a lot on that front too.
- 39:08And it feels like the model merging is something that is
- 39:15getting very popular and it is getting to be Yeah.
- 39:20The small language models theme or narrative is also bubbling U
- 39:27quite a bit. I imagine you guys have been
- 39:31seeing it a tonne too. Because All in all, like if you
- 39:34can go smaller and you can still accomplish your goal, then it's
- 39:38gonna be much better to be smaller because it's faster,
- 39:41it's cheaper. Yeah, one more can you ask for?
- 39:43And I think, I think that's the hidden cost that people don't
- 39:46realise. They're like, well, OK, fine, I
- 39:47can train my model and it's a one time expenditure.
- 39:50So, you know, I'll bite that bullet.
- 39:52I'll train my 70 billion parameter or 100 billion
- 39:55parameter model or maybe more and it cost me X dollars.
- 40:00But now if you want to serve it and keep that real time low
- 40:04latency, high response engagement with your user to
- 40:08actually use that model, it can be very expensive to do so right
- 40:12now inferential and training and help reduce those costs, but it
- 40:14is still more expensive. So if you're going to accomplish
- 40:17those same, the quality of model at a fraction of the model size,
- 40:22you have your deployment options open up right now.
- 40:24You can use smaller instance sizes, less compute, you can
- 40:28scale further without, you know, kind of like investing more in
- 40:32compute cost and operating cost. So it's, I think there's a lot
- 40:36of potential here as, as I think we're optimising or the
- 40:40industry's optimising in two fronts, right?
- 40:42Like one is how do we make, you know, models more capable and
- 40:46expand their use cases? So that's going to, you know,
- 40:48build super large models. But at the other end of it, how
- 40:51do we make small models more efficient?
- 40:54And so I think we're kind of seeing both of those trends in
- 40:56RC is definitely on the, you know, their, their car across
- 40:59the board. But really, I think I'm excited
- 41:01to see what they're doing. Small models and model merging.
- 41:04Have you guys seen agents that have been working well in
- 41:09production? Yeah, absolutely.
- 41:11Actually Ninja is one of those companies.
- 41:13They're they're actually using a few different models that are
- 41:17all running on inferential and training them to serve their
- 41:20agents. It's it's great solution as
- 41:22well. But I think we're going to see a
- 41:24lot more agents in Amazon launched their queue products,
- 41:27which is also trying to help in this space, right.
- 41:30You know, personally, I think we're going to see agents kind
- 41:33of infiltrate all aspects of our lives as we move forward, right.
- 41:37Like I just saw that Google is replacing their Google Assistant
- 41:41on all of their Android phones and tablets with Gemini, right?
- 41:46So they made that announcement as well.
- 41:47So I think agents, agents are are in our future across the
- 41:51board, right? But I think the differentiator
- 41:53will be is good high quality agents, not just let me ask you
- 41:57the weather or you know, who won the basketball game last night,
- 42:00but you know, like very specific and personal.
- 42:03And you know, it's going to require being able to kind of
- 42:06deploy and fine tune these models in, in a more of a kind
- 42:09of like a reinforcement learning technique where they're
- 42:11constantly learning about you, your habits and then
- 42:15implementing that or updating the models as fast as possible.
- 42:19Excellent, fellas. Well, this has been awesome.
- 42:21I appreciate you all coming on here and talking to me about
- 42:25this because I know there's a lot of confusion and just people
- 42:29want to use it. Just now I was looking through
- 42:31the Mobs community Slack and somebody's asking about GPU
- 42:35resources in AWS and what's this and what's that?
- 42:40So I guess the last question I've got for you, I imagine
- 42:43there's some kind of a chart that you all have as far as
- 42:46well. If you're looking for this type
- 42:48of GPU, you'll probably be good with this instance of Influencia
- 42:53or Tranium. Does that exist?
- 42:56And if not, can we make it? I would say good starting point
- 42:59is our documentation. So we have the Neuron SDK
- 43:03documentation. I assume we can put a link in
- 43:06the show notes and there we have a lot of information.
- 43:09So for example, tutorials, getting started guides and even
- 43:13we even have a table, a performance table of all the
- 43:16most popular open source models, such as, you know, Lama 2, Lamma
- 43:203, Mystro stable fusion models. But in which instances it can be
- 43:25applied to and what come the kind of performance you can get.
- 43:28And we have different combinations, right?
- 43:29Depending if people are optimising, they really need say
- 43:32low latency, obviously probably won't need to use more
- 43:35accelerators or maybe optimise for costs and use fewer.
- 43:39So yeah, so we have many different options there.
- 43:42So encourage folk to, you know, check out our documentation and
- 43:45and give it a try. Awesome.
- 43:49I love it guys. Thanks for doing this and it
- 43:53feels like I've learned a tonne all about inference and tranium
- 43:58and especially I I like the fact that it's not joined at the hip.
- 44:02You get to choose like it's choose your own adventure when
- 44:06it comes to this. You're able to save this 46%
- 44:09cost is huge and being able to get that then also the idea of
- 44:16start simple ahead and go down the stack as need be.
- 44:21When it gets more complicated or you find you're hitting your
- 44:24limits, then you can go from that Bedrock to the Sage Maker
- 44:29to the EC2 or whatever it may be.
- 44:32But it's cool to know that all along the way, if you're using
- 44:38or utilising Tranium or Influencia on any of these
- 44:42services, you can keep utilising it.
- 44:45And it's not like, oh, this only works with Bedrock.
- 44:48So it's nice to see that that's like the Amazon way, I guess
- 44:52that you probably wouldn't be able to ship something if it
- 44:56could only work with one of these services.
- 44:58I think that's enough people have written about that, books
- 45:00have been written on that subject, but that's not for
- 45:02today. I'll let you guys go.
- 45:04This was awesome. Thanks.
- 45:07Thanks very much, it's fun.