Latest / Agentic Conversations (formally mlops.community) / From Arduinos to LLMs: Exploring the Spectrum of ML // Soham Chatterjee // #162
Transcript
- 0:00So my name is so awesome. I'm currently leading the
- 0:03machine learning team at when Tech startup in Singapore,
- 0:06counting the Sleek. I try to make coffee with like,
- 0:12you know, with high Precision grinder with a, with a
- 0:15temperature-controlled cattle and with, you know, with a very
- 0:19sensitive scale. I use distilled water.
- 0:23That has been specifically, you know where they've added some
- 0:26minerals in some specific formulas that In percentage.
- 0:30Is that supposed to make your coffee tastes better?
- 0:33I have I I don't buy beans that I like older than that.
- 0:38Haven't been roasted like more than a week ago.
- 0:41Yeah. I mean, I do all of these things
- 0:43and you know, my coffee. Still tastes the same actually
- 0:49it doesn't it taste good but but you know it doesn't taste like
- 0:53like very expected to it is based on the amount of effort I
- 0:57put in but you know the good thing.
- 0:59It smells. Lee great.
- 1:00When you grind the coffee, it's really, it's very calming like
- 1:03grinding the coffee, and just going through those motion of
- 1:06making it. And I think that's the best
- 1:08part. It doesn't matter how it tastes.
- 1:11It gives it gives you a sense of calm.
- 1:15What's up, everybody? This is Demetrios and you are
- 1:17listening to another edition of the MLA Ops Community podcast.
- 1:21Today, I am graced with the presence of a b.
- 1:24What is going on? Abby?
- 1:25How you doing another? Very fell down with fever.
- 1:29I just took Look meds. Oh, no.
- 1:32Oh, I didn't realize that, we just recorded the whole episode
- 1:35and you seemed absolutely all together.
- 1:40Everything was fine. So I didn't even think to ask if
- 1:43you weren't doing that well, but I guess you hold your composure,
- 1:46well, under stress and Under Pressure now, but it was an
- 1:50excellent conversation. I was actually excited for this
- 1:53conversation, maybe that's difference close as opposed to
- 1:57other ones where you're bored out of your mind.
- 1:59And You are in pain even though you're not sick.
- 2:04I ate don't think I've been bored out of my mind in any
- 2:07conversation but this is also like one of the areas that I'm
- 2:10working in right now. So there's a little bit more
- 2:14excitement. If something is a little bit
- 2:17more recent you know, there are there things that you can learn
- 2:20for the sake of learning and then there are things that
- 2:23you're like, I'm doing this right now.
- 2:25I'm looking for a new perspective on those things, and
- 2:29I think, He had a very interesting idea of, or at least
- 2:34I could see his thought process on a lot of things did.
- 2:39But line very well with what I've been studying and
- 2:42observing. Oh my God.
- 2:43So we should probably just mention soham.
- 2:45Came on here, he just talked to us about two main themes, one
- 2:49being tiny ML, and the other being actually using large
- 2:53language models in production. I loved it, because it was a
- 2:56refreshingly real take on the Pains of use Large language
- 3:00models right now in their current state.
- 3:03And he has been trying to use them.
- 3:05I mean, he started using them when there was GPT to that was
- 3:10out and he's continued to use them.
- 3:11And I mean, for me, the biggest highlight was how he talked
- 3:16about, you know, things, it's very easy to stand something up
- 3:20and get that toy demo. Working really well, but when
- 3:23you want to actually go to scale, that is where it gets
- 3:27really hard and you can't just Rely on open a eyes API because
- 3:32who knows what they're s. LA's are they haven't actually
- 3:34released any SLS. And you also start paying a lot
- 3:39of money like really fast. So as a side for those who do
- 3:44not know who soham is, he leads the room machine learning team
- 3:47at sleek and he builds tools for automated accounting and back
- 3:52office management. He started out as an electrical
- 3:56engineer which we get into and he has This passion for tiny ML,
- 4:02and he loves talking about it. So we started out with that, and
- 4:05we went down that road for a bit, and the end Reno's Ardrey
- 4:09knows, I think is whether called, and how he loves
- 4:12deploying machine learning on them.
- 4:15And then we went to the opposite side of the spectrum and we
- 4:17talked about the large language model.
- 4:18So, basically how small can you make the machine learning and
- 4:21how big can you make the machine learning?
- 4:23Was there any key takeaways that you had before we jump into the
- 4:25actual conversation? Episode 1, which is the kind of
- 4:31glass that he looked at coming from Tiny ml.
- 4:34He said, you know, the scale is quite similar, at least the
- 4:37skill difference ratio, which is earlier.
- 4:40We were trying to deploy these models from very tiny devices.
- 4:44And we had the same challenges. These challenges were, how much
- 4:47power is the consuming. How much latency does it have?
- 4:50How private they are sharing is happening?
- 4:53How much excess in control? Do you have over these models?
- 4:56How are you compressing your models?
- 4:58And most of these things. Now translate into the realm of
- 5:02elements as well. So I love that one.
- 5:05So good. So he's also got a sub stack.
- 5:08I think I found him through sub stack or she came into the
- 5:10community and he's one of those people that it was obvious when
- 5:14he came into the community that he knows what's up.
- 5:16He's been doing this for long enough and he's been thinking
- 5:19about it deeply and so, I encourage everyone.
- 5:21If you want more of so, hums work, go and read his sub stack
- 5:26will leave a link to that in the description for now.
- 5:28Let's jump into this conversation and oh wait, no
- 5:34before we go anywhere, do you? It would mean the world to us.
- 5:37If you could share this episode with one friend that would just
- 5:41be incredible if you know someone that is in this field
- 5:46and would appreciate this type of podcast, please share it
- 5:50because that's how we can grow and get out to more and more
- 5:54people and hopefully spread the good word and let's go.
- 5:58Let's do it. A b.
- 5:59Uh, you ready? Here we go, right?
- 6:08So him just have to make sure it's am I pronouncing it
- 6:11correctly. So is so.
- 6:13Um, so it's more hum like, like, you, like humming music?
- 6:19Yeah. In yoga classes.
- 6:22So hum is kind of a popular word that they use, huh, do you know
- 6:27that? Yeah, I've heard, yeah, I know
- 6:30that but like, none of the yoga classes?
- 6:32I've been to have used that word so Other people say that.
- 6:39Yeah, the name mean, by the way. Yeah, so from what I understand
- 6:44it means I am. Like what I am.
- 6:48So I guess that can be interpreted in a lot of ways.
- 6:51Yeah, I am. I am.
- 6:52What I am, you know, this accept it.
- 6:56Yeah. Enjoy it.
- 6:57That's all. Yeah, exactly.
- 7:00Exactly, dude. Awesome.
- 7:02Well, I'm super excited to talk to you because we are going to
- 7:06go down almost like like two paths.
- 7:08Were you do a lot of fun stuff with large language models?
- 7:11But you also have this Alter Ego that is doing stuff with tiny
- 7:15ML. And you mentioned to me before
- 7:18we hit record, that one of your passions is to look at how
- 7:21people are using and try and figure out yourself how to use
- 7:26machine learning at the edge. So let's get into all of that.
- 7:31But before we do, I think it's worth just having a bit of a
- 7:35brief explanation on How you came to find yourself where
- 7:38you're at right now? Yeah, sure.
- 7:41So, so, my background is not in computer science, like, at all,
- 7:46I have a bachelor's and a master's in electrical
- 7:50engineering, but I mean, I can do anything that is electrical
- 7:55related apart from, like change the occasional like, light bulb,
- 7:59right? So when I was in, when I was
- 8:01doing my undergrad, right eye, this was back in late, 2014 or
- 8:0615. And iot was, like, really
- 8:08popular at that time. And and what happens in in any
- 8:13iot devices, it generates a lot of data.
- 8:16And at that time, there weren't really a lot of people trying to
- 8:19use that data and do something smart with it, right?
- 8:23Or do something intelligent with it machine learning and deep
- 8:25learning. Was, it was this gaining
- 8:28popularity at that time? Lord of people didn't know how
- 8:30to deploy these modules really well?
- 8:33Or even like how you could use the data and build something
- 8:36smart. Third at that time really good.
- 8:38So so yeah, it was kind of at that time when I started
- 8:42exploring like, how we can take this, all the data that these
- 8:46iot devices are doing and build something smart with it.
- 8:49So that's and that's that path. Kind of led me down to studying
- 8:54machine learning and then deep learning.
- 8:56And, and then combining iot with deep learning cute at your
- 9:00Bachelor's in electrical engineering and then you will
- 9:04turn to work with a company called Summer.
- 9:07Knowledge is as deep learning researcher.
- 9:10Yeah, how did that happen? Yeah.
- 9:13So so spite of this student run a lab in our University.
- 9:18Where, you know we was just like learning stuff experimenting
- 9:21with all this stuff. You all the cool things that
- 9:24were happening at the time. I would T deep learning virtual
- 9:27reality stuff like that. And so the person who eventually
- 9:32went on to be the head of the deep learning Lab at some Give
- 9:37give a talk at that lab and that's how we got connected.
- 9:41And when I was graduating he one day he just randomly message me
- 9:47on messenger. At the time I was in the middle
- 9:49of class any message me and he was like hey can you come down
- 9:53to the to our office which is like a four hour plane ride?
- 9:57I think it was. Wow and you know just this this
- 10:01like see if the Vibes if you like The Vibes and if you want
- 10:05to join me, we do an internship or Thing.
- 10:07Yeah it was like a brook student at the time and he essentially
- 10:12line and you know like here is yeah exactly.
- 10:15So I'm really happy that I got got that opportunity.
- 10:19I think it's really hard to get to get a job in machine learning
- 10:22especially at that time if you didn't have like a PhD or like
- 10:25or like prior experience and I'm glad that his name is maile by
- 10:30the way he still at Summa Sean and yeah shout out to my life
- 10:35for giving me the opportunity. The interesting me.
- 10:39So you ended up with a background, which was between
- 10:43deep learning Edge, Computing, and Quantum.
- 10:46Computing. That's a very interesting
- 10:49combination. Yeah, I did that bill a bit in
- 10:52Quantum Computing. I won't say, I know like the a
- 10:56lot about it. So the research lab at summer
- 10:59was like we were allowed to experiment a lot and work on
- 11:03things that we thought would benefit the company.
- 11:07You at that time sasame is like a farmer IT company so we build
- 11:12tools and products for pharmaceutical companies.
- 11:15At the time, a lot of people were using Quantum Computing to
- 11:18do, I think protein synthesis and like, yeah.
- 11:21So so yeah, we just tried experimenting and seeing if
- 11:25something worked, that's how I dabbled a bit in Quantum
- 11:28Computing. But yeah, not, I wouldn't say
- 11:31I'm like, I'm qualified to talk much about it because you've
- 11:35worked in tiny. Like this, you've explored it.
- 11:39What are some of the challenges that you've seen?
- 11:41But deploying machine learning models on Tiny ml, or kind of
- 11:46inch devices as far as Tiny ml goes.
- 11:49What do you consider? Tiny ml?
- 11:51Yeah, good question. So for me, tiny animal.
- 11:55Like the really, really tiny animal.
- 11:57It's probably like devices, like an Arduino Nano, which has only
- 12:02a few kilobytes of ram. So, and that Ram has to hold,
- 12:08not only your model but also your code for running the
- 12:12executing, the model, reading data from sensors, you know,
- 12:16processing that data, all of that stuff that that's that's I
- 12:20think like the really really tiny stuff.
- 12:23And then what makes it more challenging is if you deploy
- 12:26that device to like a remote area, where maybe you don't have
- 12:30have access to utility power rate.
- 12:33So you have to run it off of a battery.
- 12:36So how do you Baker code, like really optimized so that the
- 12:40device can autonomously for, like, a year at least.
- 12:44Yeah. So so that would be like the
- 12:46really, really tiny like at the really Edge, right?
- 12:50But then, I think, you know, phones right now really
- 12:53powerful. But that's also I guess in some
- 12:56ways I wouldn't call it tiny ml but it's an embedded device, at
- 13:00least. And and then another popular
- 13:03embedded device would be a Raspberry Pi.
- 13:06Yeah. So, So I guess like there's this
- 13:09levels of tiny ml. You have like the really really
- 13:12constrained devices with no power no connectivity.
- 13:16So you can't even make like a query to a server somewhere and
- 13:20then, you know, those constraints slowly get less and
- 13:22less. As you move further up the chain
- 13:24to like a Raspberry Pi and then a mobile phone and and so on.
- 13:29Yep and you're playing around with what when you mess around
- 13:32with tiny ml. What is your favorite area to
- 13:35play in on that chain? Yeah, I think I so I really like
- 13:40working with Arduino 90's because that's that's where the
- 13:44that's where it's most challenging.
- 13:46Yeah. How do you how do you even see
- 13:49something work on a device like that?
- 13:51It's probably going to be like an LED that blinks right and and
- 13:55the joy that a blinking LED you can give you.
- 13:58It's the I can't describe the feeling a little.
- 14:03So what? Yeah, plication stock you were
- 14:05exploring on on these These devices.
- 14:08Yeah sure so. So one of the first applications
- 14:12that I worked on was that summer, we were working with the
- 14:15medicine manufacturer and Manufacturing medicines.
- 14:19It's it's highly confidential. You need to have a lot of safety
- 14:23and there's a lot of protocols around it.
- 14:25So this particular manufacturer, they wanted to make sure that
- 14:30any box of medicine that was going off of the factory.
- 14:34You know, production line had like not only Medicine.
- 14:37But also medicines usually have like some piece of paper with
- 14:41like some information and some warnings on it stuff like that.
- 14:44They wanted to make sure that all the boxes that they were
- 14:47shipping out, had all of those things.
- 14:49And and the reason we need a tiny ml was because because they
- 14:54couldn't make a query to a model out in some server somewhere
- 14:57because that would be sending like confidential information
- 15:00outside and then Factory floor. Space is also very expensive so
- 15:05they didn't want something. Really large rate.
- 15:08They wanted something small that they could fit maybe next to a
- 15:11camera somewhere. So, so that was one of the first
- 15:14applications that I worked on with tiny ml.
- 15:17What we ended up building for that was at the time, there was
- 15:20this device called a neutral compute stick and the neural
- 15:24compute stick. It's like a USB.
- 15:26It's like a thumb drive that you can stick on into a Raspberry Pi
- 15:31and and and and it's called an accelerator.
- 15:34So what it does is you can offload The difficult and
- 15:38compute intensive ml workload on that accelerator and that
- 15:42accelerator can only execute ml modules.
- 15:46It can do anything else and because it can only do that,
- 15:49it's really efficient at that so it can do it really quickly as
- 15:52well. So three are so that was one of
- 15:55the first applications more recently, I was working with
- 15:59neuromorphic Hardware. This is so when you have to
- 16:01deploy an application to a place where there is no utility power
- 16:06and you have to use Use a battery.
- 16:07You want to make sure that the devices you're using consume as
- 16:12less power as possible, right? And sensors are one of the most
- 16:16power hungry devices that you can have in a tiny immune
- 16:19system. So, so one of the solutions is
- 16:21to use new term of fake Hardware, which are highly
- 16:24efficient. So so yeah.
- 16:26So we built and, and another thing in this field is do more
- 16:30custom. You make your Hardware.
- 16:31The more you can save on energy. So what we did was we built a
- 16:36chip Good interface with this neuromorphic camera and and it
- 16:41would consume a few Milli watts of power and and it could
- 16:45monitor like for instance, you could deploy it in the jungle
- 16:49and you could monitor for movement of like of cars or you
- 16:53know, any illegal activity stuff like that.
- 16:55IL love the fact that you mentioned latency you mentioned
- 16:59size and you mentioned popper energy swap because there's
- 17:04something you said earlier when we started this conversation.
- 17:06That this skill difference is very similar to how many things
- 17:11are, how many operational challenges have you seen
- 17:14transform, or like, come from one domain to like this?
- 17:19New to me? Yeah, sure.
- 17:21So latency is the biggest challenge?
- 17:24I would say because you want your, you want your
- 17:28architecture? And you you want the results
- 17:31from your module to come really quickly, right?
- 17:34So, so you want to optimize for latency?
- 17:37That that's been a really big challenge.
- 17:40One Challenge died. Well, it's dead in tiny ml, but
- 17:42not a lot is the cost. So at work, when I deploy these
- 17:47large language models, we have to really think about whether it
- 17:51makes business sense to provision and instance, with
- 17:54like one or two gpus, just to deploy a model because a lot of
- 17:58times just the cost of that doesn't doesn't make business
- 18:02sense at the time. So to kind of solve these
- 18:05problems, what people are doing there.
- 18:06Trying to find ways to fine-tune the models and compress the
- 18:10models, right? And there's a lot of techniques
- 18:12to do that. For instance, you know, the
- 18:15what's a module called alpaca model which which was which was
- 18:19compressed down from like you're from a llama model similar to
- 18:23how in time in 10 mL, we do knowledge, distillation.
- 18:26I feel like they've. They've kind of.
- 18:28They've done it. Similarly and, and you have
- 18:30other projects that are doing quantization, what these
- 18:34compression algorithms do is they actually have Been shown to
- 18:37increase bias in your models which has been a huge engines in
- 18:41tiny ML. And I'm sure that will also come
- 18:44up right now in lme's as well. Fascinating dude.
- 18:48So I love the fact that you are talking about all these
- 18:53constraints and really looking at when you're using tiny ml.
- 18:57It's because you have certain constraints that you have to fit
- 19:00in like there's not enough space on the factory floor or we can't
- 19:05actually send the data anywhere. Because that would be illegal.
- 19:08And so it forces you to come up with certain ways of doing
- 19:12machine learning that you wouldn't necessarily think about
- 19:17when you're just out of computer and you're creating some kind of
- 19:20SAS software, right? Like I also know that you have a
- 19:26sub stack and that might be what got me hooked on what you've
- 19:29been doing? You talked about building a
- 19:32Chrome app on this sub stack, I think and the different phases.
- 19:37Of building with large language models at your job, you're using
- 19:42large language models, right? And you're always thinking
- 19:44about. And from what I understand from
- 19:46talking to you is that it still isn't really clear if you should
- 19:49be using them or not and so maybe we could go down that road
- 19:53a little bit. But I also want to hear about
- 19:55your your basically your journey.
- 19:58When you talk about in in your articles on sub stack building,
- 20:02with large language models, and how you think about those
- 20:05things. And so So I'll leave it very
- 20:08open for you to go down whatever path you want.
- 20:10And then I'll follow up with what whatever you miss that, I
- 20:13still am curious about Yeah sure.
- 20:18So the reason we started this Chrome extension.
- 20:22It's because well, me and archana who I'm building this
- 20:26with feet. Like like anyone else in the
- 20:28field. Got really interested with and
- 20:29the limbs and how they work. But you know we weren't seeing a
- 20:33lot of people who are just building apps and and Sally and
- 20:36you know like hooking it up to and just you know trying to
- 20:40build a startup around a trait and and in the process we we
- 20:44weren't liking how closed-source everything was becoming.
- 20:47I wanted to go back to like, a few, like, the times, like, we
- 20:52had like a few years ago where people who would build
- 20:55something, and they would share how they built it and so that
- 20:58others could learn from it. And, yeah, I felt like that
- 21:01wasn't happening, and I was in learning a lot about how these
- 21:05models about the challenges of deploying these modules.
- 21:08And, and what are the constraints, when, when you go,
- 21:11when you try to build the product around the.
- 21:14So that's why we start we thought.
- 21:15Okay, fine, you know? Let's just build like a toy
- 21:18example and and you know like see what kind of challenges we
- 21:22face and and you know try to solve them and tell people about
- 21:26it right. What we've learned is.
- 21:29So from so what your would you mention right?
- 21:31From this up stack and like these stages of building, like
- 21:34stages of building a product that uses mlms, we've learned
- 21:38that if you are like a start-up and you want to build an LP
- 21:43application, it's very easy right now to build that it's A
- 21:47cheap to just call Panera's API and and, you know, have a few
- 21:52prompts and, and just build a wraparound prompts.
- 21:55And I think that's the first level of products that we're
- 21:58seeing out there right now, which are.
- 22:00And this is a, this is an oversimplification, but it's
- 22:03basically a rapid over crumbs, right?
- 22:06And, and, and, and what we realized is building a product
- 22:10like that is, is not feasible because as your product gets
- 22:15more complex, And as you start adding more features and as you
- 22:19try to kind of Meet the output from your model moves from the
- 22:23EPA blakemore's reliable, what you end up doing, is you have to
- 22:26create these long prompts you have to do stuff like, like,
- 22:30just few short, prompting is, usually not enough.
- 22:33You have to do like Chain of Thought, prompting, and an even
- 22:36more complex from straight. And, and your outputs also
- 22:40become longer when you go to Chain of Thought, prompting and
- 22:43stuff like that. Yeah.
- 22:45And your courses starts to scale up.
- 22:48It's also not that reliable, especially if you try to build
- 22:51chains and agents and where, you know, the output of one LM EPA
- 22:56call feeds into another. The reliability becomes even
- 23:00worse. Yeah, with every whatever we
- 23:02think will happen, it goes down and down and down.
- 23:05Yeah, yeah yeah. And and and I've seen people to
- 23:11fix that what they have done is they have like Watcher models
- 23:14that watches the output checks for You know, checks to see if
- 23:18there's errors happening. There's and, you know, people
- 23:21have built these systems where they also have models that
- 23:25watches for prompt injection attacks and trust issues.
- 23:29And you know, watching for incorrect output stuff like
- 23:32that. It it doesn't make sense to me.
- 23:35It. I don't think that that's
- 23:36something that's scalable and and I don't think that that is
- 23:41something that makes a lot of sense from the cost perspective
- 23:44as well. So what I think will happen is
- 23:47People will have to start fine tuning, the models and start to
- 23:50own the modules, so that they have more control over it, so
- 23:53that they can deploy it on their own, their own servers so that
- 23:57should reduce costs, right? Because if right now what we
- 24:01pay, when we make an API, call this on the tokens, which
- 24:05doesn't really make that much sense.
- 24:07And and yeah and and eventually I think as things get more
- 24:11complex, you have to start building custom modules.
- 24:14So I've seen a lot of people like Become scared and I was one
- 24:18of them as well. And I was, I thought that.
- 24:21Okay, you know, these modules with all the emergent properties
- 24:25I going to make data scientists obsolete.
- 24:28Well, I don't think that's that's the case because while it
- 24:32make, while it makes it easy to build applications, it pretty
- 24:36soon. You'll have to move pretty soon.
- 24:37We'll have to build custom modules, but what I really like
- 24:41about the about the apis is how easy it is for Forest.
- 24:47Up to build a product and get it out there really quickly.
- 24:50And and when you do nowadays, you don't have to be a company
- 24:54with a lot of funding, or any incumbent with a lot of data to
- 24:58build these products. You can be.
- 25:00So, for instance, our Chrome extension, right?
- 25:01It does, you know, like some changes like the tone of the
- 25:05text makes the text more formal summarizes.
- 25:07It stuff like that building a product like that.
- 25:10With no data would take us months, right?
- 25:13I don't think, I don't think any company in the right mind would
- 25:17but try to even attempt to do that because this is not enough
- 25:20training data out there to do it.
- 25:33But now you can do it and you can create something very nice
- 25:37really quickly, get a lot of customers.
- 25:39And that's, I think the really powerful thing about LL arms
- 25:43especially like in machine learning there was that one
- 25:46phase where everybody was picking up the most optimal
- 25:50model, you know, like everybody was doing hyper parameter
- 25:53tuning, and then eventually people were like, we don't
- 25:56really need to hyper parameter to now much.
- 25:59We really need to build models that are very specific.
- 26:03Affective domain and is that something that you're seeing
- 26:07with this as well which is if we want to run these massive
- 26:11particles in to be able to make a business case for them and to
- 26:15be able to scale them, be need to have smaller domain specific
- 26:19models as compared to larger models because of the
- 26:23reliability. And you know the other issues
- 26:26which come at scaling Yeah exactly.
- 26:30Yeah. You just yeah that's what I've
- 26:32been trying to say. One thing that I definitely
- 26:34wanted to know but it's totally changing gears.
- 26:38So maybe we can keep going down this lme's path a little bit
- 26:44because I do like the idea and I think it's been, it's become
- 26:48very obvious that you can validate ideas very quickly with
- 26:53an opening. I API call and Once you start to
- 26:59hit scale, it very quickly becomes unreasonable.
- 27:04And so it's almost like your success with a app that you
- 27:11built on open. AI is also your downfall and
- 27:14especially I really liked what you said is when you want to
- 27:18start going and making a few calls or you're chaining things
- 27:22together or you're making it more complex, that's where Start
- 27:28to see really difficult problems coming in that.
- 27:31It doesn't feel like it's fully solved and so maybe you have
- 27:34Watcher models. And I've, I've heard some really
- 27:37cool stuff that people are working on to try and figure out
- 27:42how to do this, but it is very much like, I mean, I guess the
- 27:46big companies have been doing it for a while.
- 27:48Like, if you talk to people at Facebook, they're not just using
- 27:51one large language model, they're using a bunch of them
- 27:54together and each one has its specific tasks and it's doing
- 27:57Certain things. But then you have like so much
- 28:01complexity of trying to get all these models to work together
- 28:04and how are you calling them? Is it just like 50 API calls
- 28:08that doesn't really work because there's not like 50 different
- 28:11models that you can call out to. So it's a little bit of a
- 28:15conundrum right now where we sit maybe by the time this podcast
- 28:19comes out, it won't be as bad because there's some new open a,
- 28:22I update that changes everything, but I do think that
- 28:26you are hitting Something very, very important that gets swept
- 28:32under the rug a little bit in the conversation.
- 28:35What everyone loves to talk about is how much these large
- 28:40language models have, democratized the ability to use
- 28:43machine learning and how you can do so much with them.
- 28:46But then the actual production use cases are a whole different
- 28:51story because like you said, you still need to have these chops
- 28:55to actually bring the model in house and Then really see,
- 28:58actually what part of this gigantic model is what we need.
- 29:03And can we fine-tuned for that? And actually, can we prune it
- 29:05down? Can we see, can we get the same
- 29:08kind of benchmarks if we're using a much smaller model, we
- 29:11don't need to use this gigantic model so I love everything about
- 29:15what you're talking about it is ringing true on so many
- 29:18different levels and I love the part you mentioned on prompt
- 29:22engineering especially because this is another conversation
- 29:25I've been having but many people say Are open and saying, let's
- 29:29pumped into new and get as much Optimal Performance out cover
- 29:34models as possible in. There's another set of people
- 29:37who are saying, you know, there's human feedback which is
- 29:40going into these models which is updating and making these models
- 29:44more powerful as they come. And there's a very good chance
- 29:46that by the time. Gbt 5 comes out, we may not need
- 29:50to use these process much. So I wanted to get your opinion
- 29:55on prompt engineering like as a Like discipline as well.
- 29:58And how do you feel like how much prompt engineering but
- 30:02people do in terms of like just a research project or like a toy
- 30:06project voices, a production in the nation?
- 30:10Yeah, absolutely. And yeah, so it's really hard to
- 30:14talk about these things because like you said, you know, like G
- 30:18PT 5 could come out. Like, I don't know, in a few
- 30:20days and, and just make everything I said Obsolete and
- 30:25and I will be like the weird guy.
- 30:27Give it a podcast on YouTube. He's is you know said random car
- 30:31going to date it today is April 25th.
- 30:35So in case by some like Stroke Of God, G PT, 5 comes out
- 30:41tomorrow or between now. And when we release this,
- 30:45everyone knows that. Today, when we were talking
- 30:47about this, it is the world is like, we are saying it is if
- 30:51it's but continued. Sorry, I didn't mean to derail
- 30:53this conversation. Yeah.
- 30:56No, that's all right. So about prompt engineering,
- 30:58right? When we started building this
- 31:00extension GPT for hadn't come out yet, and the API that was
- 31:06available was the, the wind she 002 API and we, you know, we had
- 31:12built like a pretty good. We've done some prompt tuning,
- 31:16some prompt engineering and and had a set of prompt and they
- 31:19were working really well, you are getting really good results,
- 31:22but as soon as you pity for came out, a lot of those problems, It
- 31:25stopped working, or maybe they work, but they weren't as good.
- 31:29So so, you know, we had to so we had a choice at that time,
- 31:33either continue with the Vinci 002 or, you know, move to the
- 31:39the Vinci 003 and point. And, and we didn't really show a
- 31:42lot of people say that it's really easy to move but but in
- 31:46reality it's not a lot of the work you've put into prom is
- 31:49very easy to change the change where you're making the API call
- 31:52but but all the prompt engineering and stuff you've
- 31:54done May May be Obsolete and may not work.
- 31:58So we decided to, you know, stick with the 002 Epi.
- 32:02But I think open a.i., they decrease, the amount of load
- 32:06that the TT I could handle. And at times we it would take
- 32:10like a minute. Maybe even more to get a
- 32:12response especially like I think around February or something it
- 32:16makes it got really slow. So so you know we had to move to
- 32:20the 003 API. So so yeah so that that that's
- 32:24also a Another challenge with from Tim's in earring, because a
- 32:27new model could come out. Your old, crumbs could become
- 32:30obsolete. It will level the playing field
- 32:32for sure, but at the same time, it reduces the reliability in
- 32:36your product. It reduces, you know, if you
- 32:39have delays or kpis about how fast or you know, you want the
- 32:42results to be out there, how trustworthy ends and how good if
- 32:47you want to Benchmark of your results, you know, you may not
- 32:50be able to maintain that anymore especially because open a
- 32:53actually doesn't have any essays or kpis.
- 32:55For the endpoints. Yeah, they haven't come out and
- 32:59said anything official about that.
- 33:02So yeah. So there's that that's also
- 33:03another reason why I think it's crucial that that you move away
- 33:08from from apis and try to. I don't think it's worth
- 33:12training. These models would at least
- 33:14fine-tune these modules for your application.
- 33:17That's so funny. You say that there is something
- 33:19that you mention there, which I think is worth noting one is
- 33:25That there is no SLA that open AI has set out with and we
- 33:31probably all have at some point or another gone to chat gbt and
- 33:35it's like, we're experiencing too much of a load.
- 33:38So let me write you a poem about how we don't have anything
- 33:42working right now. So like, I don't want to fucking
- 33:44pull men. Yeah.
- 33:46How can I be able to get this? Whatever, my task is done.
- 33:50And so, if you're building a product that is fully reliant on
- 33:53that API, it's It's very scary in my eyes and I'm sure there's
- 33:59Sr. He's out there that are
- 34:00listening in there. Just like that's a no-go you
- 34:02cannot do that and that I think is another reason why you see a
- 34:05lot of it feels to me like there's a lot of great projects
- 34:09that are out there but they're toys projects and they're doing
- 34:12it there in that first phase of hey can we validate quickly
- 34:16with? Open AI but then we have to
- 34:19figure out something else because we don't know if it's
- 34:22going to be up or not. And then the other thing that I
- 34:24wanted to mention from what you said, Ted and I was just talking
- 34:26to somebody about this yesterday, is, if you have let's
- 34:29say and this may have been your scenario.
- 34:31I don't know. But you have 300 prompts that
- 34:35you were using with GPT to and now G, PT 3 comes out.
- 34:40How are you going to migrate everything?
- 34:42All the infrastructure you've created around those prompts and
- 34:44everything over to GPT 3. And then you realize like oh
- 34:48half of these prompts don't actually work like they did in
- 34:50gbt to, you know. So it's just an absolute
- 34:54headache and especially every You bring in a new model, it is
- 34:57a little bit weird and then so top that off like let's think
- 35:02about 00 if you're using GPT for for some some prompts but then
- 35:08you want to go to an open source model and it totally reacts
- 35:11completely different. It's like night and day.
- 35:14You can't even use the same prompts at all and so you have
- 35:18to restart from scratch again. And that's that's just a bit of
- 35:22a mess and I appreciate that you're pointing these things
- 35:25out. Because Cuz again, like a lot of
- 35:28this gets swept under the rug when an especially if you hear
- 35:31VC's talking about how this is the future and there's the llm
- 35:35Ops hype that I've hopped on the wave and I love it.
- 35:39But I also am very, very realistic about it and so, yeah.
- 35:45And so I, I didn't mean to interrupt you, but I'll be also
- 35:48mentioned, how these models are also getting better in some ways
- 35:52because they're incorporating feedback.
- 35:55So what you have to do is you have to maintain like, maintain
- 36:00these prompts, and you also have to maintain like some outputs
- 36:04and you have to constantly Benchmark.
- 36:06The the outputs that you are getting today with your ideal
- 36:10outputs and if you move to a new module, you have to do that
- 36:13benchmarking as well. And it's not easy to it's
- 36:18possible to do that, but but it's not that simple and
- 36:22especially if you have a lot of Trumps, right?
- 36:24And if your, if your In is really complex, so, so, yeah,
- 36:28definitely. I don't see a lot of people
- 36:29saying this, but right now, your crowns are your gold, right?
- 36:34That that's what differentiates you from other companies.
- 36:37So you should keep your prompts, you know, lockdown as if they
- 36:40were your API Keys. That's one thing you should do.
- 36:44And at the same time, you should hear because that's, you know,
- 36:47if you come up with a, a prompt right now is the equivalent of a
- 36:51custom Tree in deep learning Model A few years ago, right?
- 36:56Yeah, if you want very special song.
- 36:59Yeah. Yeah, exactly, exactly.
- 37:02You need to keep it locked down. You need to have, you need to
- 37:05test your outputs with your benchmark outputs.
- 37:08And yeah, you need to set up tests for that guy.
- 37:11See, a new shirt coming. Keep your promise to yourself
- 37:17that. That's a good one.
- 37:17Yeah. Yeah, dude, I want to know so I
- 37:22got I got one for you. You've been you've been like
- 37:28really sinking your teeth into all of this.
- 37:30Where do you think you have succeeded?
- 37:33Where others have failed when it comes to any of this?
- 37:36Whether it's tiny ml or it's working with large language
- 37:38models. That's it that's a good
- 37:40question. So with tiny a middle.
- 37:42I think something that I'm really proud of is the standards
- 37:48and blessed. Best practices that I've come to
- 37:52learn about tiny and middle. I've been going to put that out
- 37:55there and help other people in the field.
- 37:58So I'm really proud of that I guess and with a little m's I
- 38:01think I'm I'm just happy I'm not that caught up in the hype.
- 38:06A lot of people I like so caught up in the hype.
- 38:10They, they don't realize that these applications don't really
- 38:14work like they do work level. But then not, you know, it's not
- 38:18really great for production and yeah I think.
- 38:22Yeah. Okay that's where we'll be
- 38:24succeed. I think you definitely hit the
- 38:27hammer and the nail. I don't know what they he did
- 38:30Ms. But despite the fact that these models are openly
- 38:34accessible via API, did not open sourced and they are not as
- 38:39accessible as most people would like to believe that they are.
- 38:44Yeah, yeah. Absolutely.
- 38:48It says there's very few scenarios where we think it
- 38:52makes sense to declare an llm, well, heartache, and I might get
- 38:57hit messages after this whole podcasters, but 2008 rushing
- 39:02lie. Yeah, it's refreshingly real
- 39:05takes and I appreciate it because, man, there's just
- 39:10something that since like GPT chat gbt came out.
- 39:14And then if you scroll Twitter, At all, and your Twitter feed is
- 39:18probably just blowing up with this change in the world.
- 39:22Nobody knows how to use chat gbg.
- 39:24Like I do. Here's the best prompts or here
- 39:26is like how this is going to change life forever.
- 39:29And there's so much hype in it and it's nice to actually talk
- 39:34to somebody. Who's like, yeah, I've been
- 39:35doing this for a while and here's where there's some real
- 39:39Hang-Ups that if you are going to use chat, gbt you have to
- 39:45think about these things and think.
- 39:46Through these things. Yep.
- 39:48Yep. You think another thing though.
- 39:50Me a note. So no doing really well with
- 39:52this product. Is we taking it we're not trying
- 39:55to get caught up in the hype. You're trying to analyze things
- 39:58objectively and trying to trying to grow the product, how we
- 40:03think it would, or trying to build this application in grew
- 40:06at how we think any other application would would grow,
- 40:09you know, like add features slowly, verify them, make things
- 40:13more complex, slowly. So for instance, right now we
- 40:15haven't the Thing we want to do is actually find doing a model
- 40:19and maybe compress the module and then try that out and see if
- 40:23that helps we haven't even like tried on tried out Vector
- 40:26databases or any of the it it's great.
- 40:30We have those tools but we haven't really had the need for
- 40:33them. You know, we could integrate
- 40:34though. But but here doesn't make sense.
- 40:37Yeah, you don't see it yet. So with the compression here
- 40:40angle, I find it fascinating that you mentioned it adds to
- 40:44the bias and also I imagine you've been trying to figure out
- 40:48yeah. Like pruning down these models
- 40:50and also the thing that we didn't say yet that probably
- 40:56needs to be said when it comes to open source models, there's a
- 41:00lot that's left to be desired out there on the open source
- 41:03market and yeah there's been some releases or leaks, you
- 41:10know, like Mama you can't actually use llama, you can play
- 41:13around with it but if you want to create an app with it, you
- 41:16can aunt. And yeah.
- 41:18Like that's that's a whole nother topic for another day,
- 41:22but talk to me about this bias and how did you recognize that
- 41:25you? There is more biases when you
- 41:27try and compress it, sorry not make it more so maybe I'll take
- 41:31an analogy from tiny little. So one of the people who found
- 41:36out about this bias was this researcher called saddle hooker.
- 41:40She has a paper on it. I can't recall the name right
- 41:43now, but it's a really nice paper.
- 41:45I think it goes. The problem really quick.
- 41:47Really, he's like you know, in a way that's easy to understand.
- 41:51So so what happened? So how the bias comes out is,
- 41:55let's say you're trying to, let's say you're building a
- 41:57camera trap, right? So with that will, so it's like
- 42:01it's checking to see if some animal crosses and, you know,
- 42:05identify the species, right? You know, you could build a
- 42:10module that identifies like common animals.
- 42:13Like, I don't know, like elephants zebras.
- 42:16I don't like animals that are big.
- 42:18We have a lot of pictures of them.
- 42:20It's easy to and also integrate like other animals that are less
- 42:24common because that's what you want to capture it in a camera
- 42:27tripod like animals. Like I don't know, like a snow
- 42:30leopard, something like that. You won't find them in the same
- 42:34habitat but like, let's see. You have the same model for
- 42:36that. Now the snow leopard you'll it
- 42:39will be in your module, it will be a part of like the long tail
- 42:42at the end where you have few images and the model.
- 42:46Your large model might be able to recognize it really well.
- 42:49But what happens when you compress your model is your
- 42:52model when try to optimize for those examples in the data set
- 42:57that it seemed a lot and forget these at the cost of these
- 43:01examples that it hasn't seen a lot, right?
- 43:04So you'll have a bias towards things that occur more often
- 43:07when you when you compress down your modules and that's
- 43:10something I think we will see happen with with large language
- 43:13models as well. When we compress them, you might
- 43:16lose. Lose vocabulary.
- 43:18You might lose a lot of a lot of the richness I guess of the
- 43:22larger models, when you move, when you try to compress your
- 43:25models. So good man.
- 43:28Well this has been awesome and and I really appreciate you
- 43:31coming on here and given this real take I wonder if how things
- 43:36are going to play out and if it is going to be something that we
- 43:40see people going back to this in a few years and saying like, oh
- 43:46yeah, that Is a little bit of a bubble and that was a bit of a
- 43:49crazed. Like the crypto craze that
- 43:51happened, or if it's just going to continue advancing in all of
- 43:55this stuff that we're talking about, all these pains that were
- 43:57mentioning right now, we're going to overcome them in the
- 44:01next couple of years. And we're going to figure out
- 44:02ways to work past them. I'm actually absolutely
- 44:06fascinated by that. And yeah, I think that's it and
- 44:11we'll leave it there. Thank you for calling.
- 44:14Thank you so much for having me. Hey, I'm Vishnu.
- 44:20I'm a data scientist at first hand, and I definitely think
- 44:24that you should subscribe to the ml Ops coffee sessions podcast.
- 44:28It's the best podcast out there to stay on top of what ml Ops
- 44:31actually is to talk to the true thought leaders in the space.
- 44:34And oh, by the way, dimitrios is absolutely hilarious.
- 44:38What a weird guy, you should definitely subscribe to the
- 44:40podcast.