Latest / Agentic Conversations (formally mlops.community) / Adventures in Building CLIP & Other (Largeish) LMs // Sachin Abeywardana // #180
Transcript
- 0:00Hello everyone my name is Sachin Abeywardana.
- 0:03I am a senior machine learning engineer at Canva.
- 0:07Fun fact about me, I don't drink coffee, but I do lots and lots
- 0:11of saucer. And I don't mean the dip, I mean
- 0:13the dancing saucer. Thank you.
- 0:18Welcome back to the mill OBS Community Podcast.
- 0:20I am your host Dimitrios and today I'm flying solo.
- 0:23But I was just talking to Sachin.
- 0:26Wow, I have so many notes from this conversation.
- 0:29There was so many different threads that we pulled on and we
- 0:33talked about his journey, but we also talked about the trade-offs
- 0:37that you get as a machine learning engineer and having to
- 0:40think about the broader product and.
- 0:44The fun stuff that these machine learning engineers like Sachin
- 0:48enjoy doing, which is that? Deep down, hard math problem.
- 0:54So we get into that first thing. I knew it was gonna be a great
- 0:58conversation because he started it with yeah, I did my PhD and
- 1:02it was a complete waste of time. Bam.
- 1:05That's how we set the tone for this one.
- 1:07I loved that, but he was very open and I loved.
- 1:12Another thing in this conversation, which was how
- 1:15forthright he was with the downfalls of not understanding
- 1:21the broader product and bringing machine learning capabilities or
- 1:26AI capabilities into the product.
- 1:30So we went down a bit of a rabbit hole on how he has been
- 1:34remediating that and why he feels like it is important, and
- 1:40we finished it off. One thing that he mentioned?
- 1:42A little bit of a spoiler alert. But one of the last things he
- 1:45said was. It is so important for machine
- 1:49learning engineers to not only understand the metrics of their
- 1:53machine learning projects, but also to understand the metrics
- 1:57that the product team is looking at because that will help guide
- 2:01you as you are creating your different AI ML initiatives
- 2:06within the company. All right.
- 2:09I hope you enjoy this conversation with Sachin.
- 2:12And even if you don't, you know what would mean the world to me
- 2:15is if you share it with one friend and like or review or
- 2:20give us some stars wherever you are listening to this episode.
- 2:30sometimes that's because I have too much shit open.
- 2:32So I'm going to close like every other app.
- 2:36Yeah, I'm going to like, I don't need Spotify open right now as
- 2:40much as I love it. Or signal or.
- 2:44Like 20, Mozilla, Brave and Safari.
- 2:48I just need Chrome right now. Have you got chachi PT
- 2:52installed? I don't.
- 2:55Do you not I mean I just paid for the premium one today so
- 3:00little church today. So that's that's that's been
- 3:03amazing. Yeah.
- 3:05Yeah it's yeah. But I mean like if if you're if
- 3:07you're a programmer, you you must have it so that the
- 3:10copilot. Yeah, yeah, yeah, totally.
- 3:13It has become something where at least like to stay up.
- 3:19To date and to be in with the times, you have to be using it.
- 3:23It's one of those like. Early adopter things, I think,
- 3:27yeah. Yeah.
- 3:29I mean like it's a I'll probably describe myself as a power chat
- 3:33GTA user because I'm really bad at writing shell scripts, right?
- 3:38So I've just gotten decent at writing Python.
- 3:41Michelle scripts is it's a completely new world.
- 3:43So what I do is go check do D and say write me a code to
- 3:48download MP3 files. It will do that for me.
- 3:50So yeah, so the small things like that, it's really good at
- 3:56and I'm sure it'll be, it'll be much better things as we go
- 3:59along too. Have you?
- 4:03Have you messed around with some of the?
- 4:06Tools that help you validate the output and make sure that it's
- 4:11real scripts? Or are you just plugging them in
- 4:14and then once they work, you're good?
- 4:16Or I am hoping for the best. And look, I do test it, I do
- 4:20test it myself, right? But in production, these are
- 4:23production code that I'm writing.
- 4:24I mean, because I'm all engineer.
- 4:26That is the quality of the code. I am very bad at being test so
- 4:32I'll admit. But saying that, you can get
- 4:35Chachi 50 to write the test as well, so.
- 4:38Yeah, it's yeah. So you can get around that.
- 4:42That's a easy thing to get around.
- 4:44Actually, one of the hackathons that we had recently was in
- 4:48Berlin and one of the submissions.
- 4:52I voted for it to be like one of the winners, but the actual demo
- 4:57broke. So the other judges, it wasn't
- 5:00me, it was the other judges. I'm gonna just throw them under
- 5:02the bus right now. They were like ohh it was good,
- 5:05but the demo didn't work and the submission was that you have
- 5:11code generated and then if there's errors in the code you
- 5:16have agents that go through and they grab the errors and then
- 5:19they paste it back into ChatGPT. Again, they figure out what the
- 5:24error is and then the agents go and they update the code.
- 5:27So yes, it's the full cycle where you can be a little bit
- 5:33more. I don't know if confidence the
- 5:35right word, but just lazy. Yes.
- 5:38Yeah. I mean, I mean that is valuable
- 5:40because right now what I do is if there is an error, I manually
- 5:44go back and paste it and then it goes, oh sorry, you're right.
- 5:48And I'll go and correct it and then place it back and then just
- 5:51keep going back up. So if that process is automated,
- 5:54yeah, sure, I can see that. I can see the value in there on
- 5:56that on its own. Yeah, I think the hard part
- 5:59right now is just dealing with agents that are reliable.
- 6:03That's where I think in all of the hackathons that.
- 6:07I've seen they kind of fall over at a certain point and so I know
- 6:11there's a lot of hard work being done by a lot of people out
- 6:14there to make agents more reliable and that's active.
- 6:19Cutting edge piece of this machine learning and AI
- 6:22industry, but yeah, so I mean I only have a very basic
- 6:27understanding of agents. So what I understand of agents
- 6:30is that they it's prompts if I understand correctly, but very
- 6:36detailed, very specific points so that you basically define the
- 6:40boundaries of what open the eye or whatever it is can do.
- 6:45And I'm not sure that kind of agent is going to last for too
- 6:51long because the my hypothesis, again, my hypothesis it's an
- 6:59uninformed hypothesis is disclaimer.
- 7:03Yes, that's right. Yeah.
- 7:06Is that it's already good at understanding language.
- 7:09I mean compared to five months ago, it's really good.
- 7:13So I mean, when I tell I'm an agent, I know exactly what I
- 7:19want. I'm assuming that exactly what I
- 7:22want is only going to get better, more training, more
- 7:27data. So like even right now ChatGPT
- 7:31has this thumbs up and thumbs down thing.
- 7:33So I'm assuming that they if if I give a thumbs up it will, it
- 7:37will keep that as a training data, go back and feed it feed
- 7:40it back in, especially if it gets it wrong, right?
- 7:42So then especially if it gets the wrong ones are the most
- 7:45important bits right? So that's what you need to
- 7:48feedback and improve it. So yeah, if it's a prompt
- 7:53engineered agent, I can see it's getting better.
- 7:57But if it's an agent that actually I don't know if this is
- 7:59a web or access a pipe and terminal, those things, yeah,
- 8:02those things are, those things are amazing.
- 8:05Yeah. So because that just extends,
- 8:07extends the capabilities, right. So.
- 8:10Yeah, exactly. So alright dude, let's talk a
- 8:14little bit about what you're doing and what you're up to.
- 8:16I've got your whole history here and I mean you're you're so
- 8:22humble. You were like, I don't know,
- 8:24because all the other people that you've had on the podcast
- 8:28are big names and big hitters. But you're in your own right.
- 8:34Like you're also quite a big hitter.
- 8:37What's your story? Give us the breakdown.
- 8:39I know you got a PhD. You went to what that was?
- 8:43Yeah. Let me, let me start with the
- 8:44heart. So I I I did my pH.
- 8:47D in Bayesian machine learning. And if, if I'm being honest,
- 8:51that's the biggest waste of my time that I've ever had.
- 8:56So. No way.
- 8:57Why do you say that? What's So I spent I spent 4 1/2
- 9:00years doing a PhD right in November.
- 9:02It was one of the earliest times look like, so I do not recommend
- 9:07doing that. Unless, unless of course you're
- 9:08rich and you don't have anything better to do anyway.
- 9:12So the reason that I personally regret is like when I was doing
- 9:16my one, mine was very theoretical.
- 9:19I was doing in an area called Gaussian processes and at the
- 9:24time, the best that we could fit was like 1000 thousand data
- 9:28points, right? And that was the best that we
- 9:30could do. This was like 2010 between 2010
- 9:35and 2015. So when neural networks are just
- 9:37starting to take off, right? So I I kind of missed that
- 9:40neural network bus as opposed during my PhD at least.
- 9:45Um, and yeah, I think, I think we got to a point where it was a
- 9:49million points, which is amazing for for a Bayesian for a
- 9:52Bayesian thing. So anyway, once I finish with
- 9:56PhD, I did this this course on basically it was just an MNIST
- 10:01data set height. So it's 60,000 data points.
- 10:04I have system amazingly fast. Just yeah, so we just did a few
- 10:08layers and like we've got this new 100% accuracy and that was
- 10:13like whoa, OK, I'm not going back to Bayesian Hurricane.
- 10:16So but look it's it's not, it's Bayesian sites have come back
- 10:23like all the stable diffusion models that you see have some
- 10:26Bayesian foundation in them, right.
- 10:27So it is grounded in the Bayesian side.
- 10:30But the point is, in terms of speed, in terms of what you can
- 10:34do with the model, the the neural networks capability is
- 10:38just so much bigger than what you would do as a from just
- 10:43using Bayesian tools O after that.
- 10:46So after that I got, I got lucky enough to start at a small
- 10:50startup that had just been bought out.
- 10:53I started there as a data scientist, mostly just analysing
- 10:55data. I didn't actually know any
- 10:57Python at that point at all. So I think I got lucky lucky
- 11:02getting hired to mostly software company.
- 11:05So so yeah, so that's where I started doing like Python
- 11:10learned about Docker, about learning, about deep learning.
- 11:13So that the next six months, it's it's in that six months, I
- 11:18feel like I learned way more than what I did in those four.
- 11:20Years. So that's again a reason to say
- 11:24Ohh man, PhD really wasn't for. Me.
- 11:26So when you say you learned a bunch more in those six months,
- 11:30it's you learned useful information for the industry as
- 11:35opposed to this deep dive on the research side of things, To be
- 11:41honest, actually both, right? So the thing with doing a PhD is
- 11:45that you go deep into the rabbit hole that might not matter to
- 11:48the rest of the community in a few years, right?
- 11:50So that that there's always that risk.
- 11:53But the good like, so I'm still obsessed about the math side of
- 11:58things. So I still try to keep that side
- 12:01as well as the technical side. U and the good thing that I saw
- 12:06was that that deep learning like did all these weird tricks to
- 12:11apply their problems to very different domains.
- 12:15I think like one of the early examples I can think of is like
- 12:18Gantz, like generating images. Just the way that they did that
- 12:22was very, it's very different to how like statistical machine
- 12:26learning had done things because they were just going he's a
- 12:29classification problem, he is a regression problem.
- 12:33You know, the standard stuff and let's try and fit it.
- 12:36Whereas this thing came along and said, hey, let's try and
- 12:38generate images, right. So it's still using very similar
- 12:41tricks, very similar loss functions, but used it in a very
- 12:44different. Way and so then you realise
- 12:47though maybe I need docker, maybe I need Python skills and
- 12:52you you kept up with the math and from there.
- 12:55So like. You've done some awesome stuff
- 12:58and especially what I love about your story is that you've stayed
- 13:03on this deep learning path and you've really gone down.
- 13:08I don't know if it's down the rabbit hole, but you've you've
- 13:10stayed true to deep learning. When?
- 13:14Deep learning. A lot of times the criticism
- 13:19that we have from other. Engineers that come on here is
- 13:24like. For 90% of the problems, deep
- 13:27learning is overkill. Why not just use the?
- 13:33The stuff that's passed and lightweight, that's so OK, let
- 13:37me let me talk about the lightweight thing.
- 13:39Right. So it's 2023 now, right?
- 13:41So to say that you can't deploy a deep learning model in
- 13:45production because it's too heavy, it's just simply wrong,
- 13:48right. So that's that's throw that side
- 13:50out because like these days there's Docker, now there's you
- 13:54don't need a GPU as well like there's plenty of things that
- 13:57you're going to apply to without without just using this normal
- 14:00CPUs. That and it will be fast enough.
- 14:04O yes, like extra boost is still better for tabular data with the
- 14:10with the tabular data, obviously that's that's the one thing that
- 14:13non deep learning models have a big edge on South.
- 14:17They've tried to beat it like I think Tab Net was one of the
- 14:19first papers that tried to beat it and it's still not there yet.
- 14:23But again, I do think it's getting closer and closer.
- 14:27The gap is skin is smaller, right?
- 14:28So I do think it will overtake at some point, but that's,
- 14:34that's tabular data, right? So I feel like again, we're not,
- 14:39we're not thinking far enough. So again disclaimer, my my
- 14:43opinion O. For example, a lot of tabular
- 14:48data have text rows in them, right?
- 14:52So most of the time when you're doing analysis, you just go.
- 14:55Well, we'll just extract a few keywords from this.
- 14:58Or yeah, so do some simple NLP type things and then let's do
- 15:05the treatise as a normal tabular problem where you have one
- 15:09column to predict. But the better way I think is to
- 15:16take those text data, use your favourite I know your NLP
- 15:21transformer, and then use those extra features and then do your
- 15:25predictions. Yeah, so you can go beyond what
- 15:28you used to do if you can combine deep learning into this
- 15:34whole problem space. So it's basically a step in the
- 15:39pipeline and allowing for being open minded about using deep
- 15:44learning as one of these steps in your.
- 15:48In your orchestration, Yeah, that part.
- 15:51I think it depends on the problem.
- 15:53So again if if it's a, if it's a something traditional like I
- 15:57don't know classified the risk of this customer then or the
- 16:02churn models that kind of thing. Yeah, sure.
- 16:04Like we we, we know that we have a known process to do this but I
- 16:11think what I would like to see happening in industry is go
- 16:14beyond the just the journal models just to your.
- 16:17What you consider like recommendation or lead scoring?
- 16:21Let's talk about search actually rather than recommendation
- 16:23because I'm not I'm not as familiar with that.
- 16:26So with search, the traditional way of doing it is to extract
- 16:30keywords or stem stem words and then search a library and then
- 16:36recommend them. But you would obviously rerank
- 16:38the results based on frequency of how many people picked on
- 16:42them. So I'm trying to get our company
- 16:46to look at clip for image search, just simply because when
- 16:51you type in a longer query, it makes far more sense.
- 16:55The context might matter, right? So so if I say but sitting on a
- 17:01tree like the the sitting part is not.
- 17:05I mean it's, it's it's, yeah, it compared to both sitting on a
- 17:09bench or put under a bench. So that context really matters,
- 17:13right, Or the order of the words matter.
- 17:14So that gets thrown away as soon as you stem the words and you
- 17:17just take a frequency approach to finding it.
- 17:20So that's a very good way of getting vector databases in and
- 17:25trying to do vector search, especially now that there's so
- 17:29many patients in that space. So I know elastic search is
- 17:33suffering that now. Everybody I I was at the.
- 17:39Databricks and AI Summit and. Every database out there has
- 17:45some kind of story around how they are supporting vector
- 17:49databases. They're now like a vector
- 17:50database. I was at the Mongo DB booth and
- 17:53they were like, ohh, yeah, we do vector database too, yeah, yeah,
- 17:57it's like, of course you do. Why wouldn't you, wouldn't you.
- 17:59Yeah. And it's.
- 18:00I think it's important right. So I think in the next few years
- 18:04that they will. I'm not sure about overtaking
- 18:06like there's certainly there's certainly a reason to use the
- 18:10classical things as well. So the reason the recent this
- 18:14clip that I did, I I searched for the results are looking
- 18:18good, right? I searched for Jesus.
- 18:20Hey, now obviously if you get this wrong, like religious
- 18:23things, it can be very offensive, right?
- 18:25So and like there was one image of Jesus, but the rest of it was
- 18:31like, ohh, it's a bit questionable right.
- 18:32So. So if you.
- 18:35Yeah, so there are cases when you do get it wrong, you get it
- 18:38wrong. Spectacularly badly right.
- 18:39So, so this is the perfect case of using deep learning as a step
- 18:45in your process, right? So use your keyword stems to
- 18:50gather a large larger than usual set of images and then you can
- 18:54use the deep learning to rerank it.
- 18:55So use both the combination, so just just to get much better
- 18:59results. Break down this whole clip.
- 19:04Yep, blog post that you wrote and what you're doing.
- 19:07I mean, we should probably take a step back, say what the use
- 19:11case is, say what you're working on at CAMBA, because I think
- 19:13that's probably important to give a bit of context around
- 19:17what the goal was, what you're trying to do there.
- 19:21Yes, so when it comes to multilingual search, we we some
- 19:28poorly resourced languages. For example, we don't know how
- 19:32to stem a word right? Or we might not have as a bit of
- 19:35a library of knowing hey this word map.
- 19:37So this when it comes to stemming, so the results when
- 19:40it's non-english especially it can be, it's definitely worse
- 19:44off than the English search results, right?
- 19:46So one way to get around this is to use deep learning to try and
- 19:53match U. Here's my query.
- 19:55Here's my here's the best image that's possible.
- 19:58So how do we do that? What we do is we take the query
- 20:02and we encode it into embedding. So embeddings is just a set of
- 20:06numbers. And we would also do that on the
- 20:10images as well. So what we're going to do is
- 20:13instead of matching words now we're going to try and match U.
- 20:17Here are the closest numbers that you can get with the text
- 20:20encoding. What you can do is there's
- 20:23actually a lot of multilingual models right now.
- 20:25So if you go to hugging phase social modelling, well there's
- 20:28so many out there and the good thing that they can do is they
- 20:31can map. So if I if I say cat sitting on
- 20:35a bench and it all mapped to the same or same or very similar
- 20:40version of that in French as well, so the numbers will match
- 20:43up very similarly. And the image embedding it's
- 20:48exactly the same, that doesn't matter because it's just an
- 20:50image, there's nothing multilingual about the image.
- 20:53So what you need to do is I need to search in whatever language
- 20:56that you want to. You'll map to the same number
- 20:58set. You use a vector database to go
- 21:00and search for that in there in your library and Bola, you've
- 21:04got your image. And then So what you were doing
- 21:08at Canva is you were saying, hey, how can we bring clip into
- 21:11this, right? Yeah, so, so the clip, OK, so
- 21:14the clip model is is really clip is 2 models, right?
- 21:18So clip is how can I use the text model to project it into a
- 21:23certain set of numbers and how can I take image model And again
- 21:28project didn't set of numbers right?
- 21:30So clip is all about trying to line up those numbers so that
- 21:34they match. So if you think about one
- 21:37dimension like if you can understand the two is close to
- 21:40one right? So now The thing is these are
- 21:43multidimensional numbers so imagine that we are on this huge
- 21:47planet but the distances centre is 1 kilometre right?
- 21:53So and as people randomly spread out across the across the planet
- 21:59and what we're going to do is we have a second planet and that's
- 22:05representing images, right. So now what's really important
- 22:07is that this is the direction from from the centre to this
- 22:12person on the text Annette, and the same direction from the
- 22:16centre to in the image planet. So we have this little magnet
- 22:20that comes and says oh OK, this a cat image is pointing towards,
- 22:26I don't know, Australia. OK, so and then you go and look
- 22:30on the on the text anet, hey, which one?
- 22:34Which one of you is a cat? And I'm going to try and drag
- 22:37you to towards Australia and but at the same time it even while
- 22:45that magnet is doing that, it kind of has this pushing away
- 22:48effect of everything else right? So it's not as strong with the
- 22:52non cat people, but it does have a small.
- 22:57In fact I'm pushing away. So the point I'm trying to make
- 23:00is it's trying to line U the direction of the cat image and
- 23:06the cat text has to roughly point in the same direction and
- 23:12I hope that explain explained that decently well enough
- 23:14because now take that 3D planet and burst that into like 100
- 23:20dimensions or plus, right. So that's that's effectively
- 23:23what, yeah, clip is. I just want to know more about
- 23:27these cat people. Tell me about them.
- 23:30Yeah, well, that's that's a lot of cat images, right?
- 23:32So that's that's that's that's somewhat somewhat of a problem
- 23:37because obviously we will do really well with we're trying to
- 23:41cap images but when we're trying to find non cat images that that
- 23:45so I don't know what's what's a random word a a fabled danceable
- 23:52right the Barnstable. So those are very rare search
- 23:57terms are very rare. Yeah it's it's barely it's never
- 24:01hardly a caption right. Not a possible maybe a tablet
- 24:04because it hasn't appeared in a long time.
- 24:06Yeah. So yeah, there's very few of
- 24:08those training examples, so we don't get to see them.
- 24:10Now what I try to do in my blog is to go.
- 24:14That's true that we haven't seen a fabric in a long time, but
- 24:18what if we take a pre trained image, a pre trained text
- 24:22encoder, right? So if I take that, freeze that
- 24:27model and if I just say OK, I'll take the last output of that
- 24:34model and I project it. So projection is just means
- 24:37putting a linear layer on top or a few linear layers on top?
- 24:42What if I can take a frozen text embedding a project it to
- 24:46certain certain dimensions and and I do the same on the on the
- 24:52image side right? So it again freeze the freeze
- 24:56the original image model. And the reason that I tried to
- 24:59do that is to say let the projection try to move those
- 25:04people around to the right place, because the text model
- 25:08already understands language, right?
- 25:11Yeah. So that way it won't be a
- 25:13problem that it hasn't. I specifically haven't seen
- 25:16phablet because that projection should just guide it along.
- 25:21O let me see if I if I understand that correctly.
- 25:24Because of the understanding and text, it's like it it leans on
- 25:29that. It's almost like a support
- 25:31mechanism and so it can give the direction what it gives us
- 25:36starting. OK, so it gives, it gives us a
- 25:39starting point, right. So think of that this projection
- 25:43layer that I keep thinking of, think I'll pick up that as a
- 25:45map, right. So, but this map is more of a.
- 25:48It tells you. It tells you the directions,
- 25:51right? So it tells you the directions,
- 25:53but it does not. It does not care about your
- 25:56starting point, right? It doesn't care where you start
- 25:58off from. It don't always say left, right,
- 26:00left, right until you get to that point right?
- 26:03So yeah, so that's really the main advantage of.
- 26:09Getting done. So I guess what?
- 26:11What's the obvious? Conclusion for me what I have
- 26:16been beaten senseless over the last three years when it comes
- 26:20to using machine learning from the community is.
- 26:25What were the results of this? How did you make a business
- 26:28case? Like how did you show that this
- 26:30was actually worth doing and worth pursuing.
- 26:34So the business case in this case is more for non-english
- 26:38search terms, right? So I want to try and see if we
- 26:41can improve the non-english and so I should, I should say that
- 26:46we haven't tested this in production so we don't know the
- 26:48results yet right? So it's more of a question of
- 26:51can we can we do that for non-english one so that someone
- 26:55searching in say Sri Lanka where which is where I'm from will
- 26:58have the same experience as someone searching in Australia
- 27:01in an English speaking country. So that's the, yeah, that's the
- 27:06business case. We didn't use the original Clip
- 27:11image which is also a cannot occupy surfaces everything
- 27:14right? So you can download whatever you
- 27:16want to from hunger pace. So the reason we didn't use it
- 27:20was because it's relatively bulky.
- 27:22So my personal goal was to try and see if I can build a smaller
- 27:27version of Clip, smaller and multilingual version of Clip.
- 27:33Canva is. A.
- 27:37Very visual company, right? And so I think about all of the
- 27:42different use cases that you are facing at Canva.
- 27:46And when you think about what you can spend your time on and
- 27:51how you can tackle these different problems, how do you
- 27:54look at what different things you can bring machine learning
- 27:59to? So that's actually changed a lot
- 28:04in the past six months, right? So with this, right, just
- 28:08because of the explosion of of AI models, like we really change
- 28:11focus and try to yeah, we're trying to use as many models as
- 28:17we can as as everywhere that we can.
- 28:21Obviously that's not, that doesn't always work.
- 28:23Well, you should like there's certain things where you
- 28:25shouldn't shove machine learning into.
- 28:28I mean, what you've got is. What you've got is perfectly
- 28:31fine. I can think of one example where
- 28:35I think I got it wrong. Right, so, so we have a creators
- 28:41programme and we pay. We pay according to uh, I think
- 28:47how much they, how much time they spent on a certain template
- 28:53or the the market that they're in like depending on the demand
- 28:56and so on based on clicks basically.
- 28:59But we do have another like to make things a bit fairer if if
- 29:03you think, hey the presentation even though the number of clicks
- 29:05below they would have spent three hours on that.
- 29:07So let's pay them a little bit more compared to Instagram post
- 29:10which is just one one page. So now the the point where I got
- 29:17it wrong was to I suggested as if we treat this as a money
- 29:23making problem, we got the data on the clicks we got data on
- 29:29whether that led to people paying for camera pro or not.
- 29:35So we can use that data and machine learning to say, let's
- 29:40divide the money up according to what the benefit was to Canva
- 29:44compared to fairness, so to speak, right?
- 29:47Or what drives up more, what drives are more revenue?
- 29:51So you can treat that as as a machine learning problem, but
- 29:55that's also it's also unethical in some ways, right?
- 29:58So you're you're you're forcing, you're forced.
- 30:02Well, it's unethical and it will drive.
- 30:05It will make cannabis off. I should, I should.
- 30:07That's probably a better point. It'll make can worse off because
- 30:09that means people can gamify it and they can focus on Instagram
- 30:14posts, which are one page gets in more money.
- 30:17South Yeah. So that would have been a bad
- 30:20use case of machine learning. Yeah, basically because.
- 30:26It incentivizes the wrong activities, correct.
- 30:30Yeah, that's right. So it it incentivizes, yeah, so
- 30:36like you could probably get a VPN and go to the to the the
- 30:39bigger markets and so on. So yeah, it it gives you a way
- 30:43of producing low quality templates as well more
- 30:47frequently because again, I'm assuming frequency will matter.
- 30:51So I think I feel like YouTube is probably one of the places
- 30:54where they kind of got that balance right, right.
- 30:56So in terms of with the creators, they like when I look
- 30:59at my recommendations, it's always very relevant, high
- 31:02quality. So, yeah, so they got their
- 31:07payment system right in, in my opinion, yeah.
- 31:09So I'm not sure if they use machine learning in their entire
- 31:13pipeline or if it's just certain bits of that.
- 31:16So basically from the last. Six months.
- 31:21Till now you've been. Trying to add AI and machine
- 31:26learning into everything that you can not not OK.
- 31:30It's added cameras a huge like there's a huge machine learning
- 31:33team right. So I I'm probably, yeah, I'm
- 31:38certainly not one of the most yeah, there's plenty of more way
- 31:40more successful engineers at Canva.
- 31:43So I think that's one thing. One thing I struggled in the
- 31:47past is probably not understanding enough or product
- 31:52right? So I've I've always gone behind
- 31:55these mathematical problems like Clip.
- 31:56Like I just mentioned, I've been obsessed with what was the
- 32:01reinforcement learning problem where you have bandits, right?
- 32:05So did the payment system. I was trying to think of your
- 32:07bandits at that point. So yeah, I spent way too much
- 32:11time thinking about maths and not enough about product, so
- 32:15that's that's a weakness of mine.
- 32:18All right, real quick one. The folks over at Prem AI have
- 32:21been kind enough to sponsor this episode, and they wanted to let
- 32:24you know that they just got done compiling the most comprehensive
- 32:29ebook on the Internet about the state of open source AI.
- 32:34If you were wondering what the hell is going on in this space,
- 32:38you've got it covered with this ebook.
- 32:41It goes over everything from evaluation datasets and
- 32:44leaderboards, fine tuning, vector databases, developer
- 32:47tooling, platforms, hardware, and of course a deep dive into
- 32:51the models, all of which are open source.
- 32:55And so how did they do this? Well, the Prem AI team has been
- 32:59working exclusively with the open source stack and open
- 33:03source models for the past year and they compiled all their
- 33:06learnings and what trade-offs you need to be thinking about.
- 33:09If you are adding some of this open source material into your
- 33:12stack and that can be found at book dot Prem AI dot I/O, you
- 33:19can go ahead read it for free. It's out there and it's also a
- 33:22living document. So if you feel like something is
- 33:25missing, you can submit a PR and get it added to the ebook by
- 33:29going to book dot Prem AI dot IO and we're back to the pot.
- 33:37Yeah. So I think I'm trying to get my
- 33:39head around where where should I put machine learning, like you
- 33:44said. And that's I don't have a good
- 33:46answer to that yet, right. So maybe ask me in one year's
- 33:49time, I'll probably have a better answer.
- 33:52Nice. Well, but dude, that's something
- 33:55that. Has become so apparent to me
- 33:58over the last six months because of this.
- 34:02Now, ability to jam AI into so many things that were much
- 34:07harder to incorporate AI into before.
- 34:13Now you have a lot of people that are able to just get U and
- 34:18running and these people are coming at it from different
- 34:20backgrounds and I see it. Some incredible product talent
- 34:25that. Basically unlocked a new level
- 34:29to their ability of designing product and.
- 34:34So the flip side of that is now thinking as a machine learning
- 34:38engineer or someone who is very deep in the AI and set into AI
- 34:43and it's it's inner workings. How do I also make sure that I
- 34:49level up and understand the product as opposed to staying
- 34:54very, very deep on the mats or the the other pieces of of
- 34:58whether it's just orchestrating the data or etcetera, etcetera
- 35:02and not thinking about that product.
- 35:03So are you doing anything? Specific to try and get you
- 35:06there, unfortunately not enough but I think what I what I'm
- 35:12trying to do is really talk to more more on the product side
- 35:16now the engage a bit more on the with the product managers.
- 35:18I think that's really mean. That's really key.
- 35:23I am noticing a pattern. Ohh, the product goes still
- 35:29remaining the same and you're trying to shop in AI into that
- 35:34product which is which I think is is a bad way of going about
- 35:38it, but I would. Hope.
- 35:40And what do you mean? What do you mean by the product
- 35:42growth staying the same? So chum model it's it's, it's
- 35:46done and tested like we we know how to do it.
- 35:48But the good thing and the bad thing that Open AI has done is
- 35:54that it's really, it's really let people imagine, right?
- 35:59So there's a lot more that we I should I'll have I'll have a
- 36:04little take on that as well but it's it's made non machine
- 36:10learning people think hey maybe we can do this and just shove
- 36:14machine. So if if there was a sudden
- 36:16black box that we couldn't do in the past, Oh yeah, let's just
- 36:20use AI to solve this problem. I fully understand what you're
- 36:23saying there when it comes to. Hard problems that.
- 36:28Aren't easily solved and thinking that AI is your escape
- 36:33hatch to be able to just OK? Well, we haven't been able to
- 36:38solve this with other methods, so we might as well try AI and
- 36:43throwing that in and seeing if that works.
- 36:46But. A lot of times I I fully agree
- 36:49with you is. Is it needed?
- 36:52Is it useful? I think one thing that AI is
- 36:55going to help you do is to really sidestep all these
- 37:00intermediate goals and then treat whatever the customer
- 37:05needs straight away, right. So I think that's that's really
- 37:07the capability that we're going to be having.
- 37:10So for example, like, OK, let's talk about, let's talk about
- 37:14search, right. Let's.
- 37:16When people come to Canada, yes, you search for images.
- 37:20Yes, you will search for certain fonts.
- 37:23But another day, that's not really the goal.
- 37:26That's that's like a minor step to get to that goal, right?
- 37:29So what AI is going to given us is the capability to go, OK,
- 37:34what they come in to do is a birthday card for grandma.
- 37:38Just give them that right straight away.
- 37:40And yeah, so all these intermediate steps become
- 37:46unnecessary. I mean, look like I am these
- 37:51these are extreme goals. These like you still you still
- 37:55you still need to safeguard your main product, right.
- 37:58So I'm not encouraging anyone to just just go and do this
- 38:01straight away right. Just be mindful of what can go
- 38:04wrong because things again can go wrong really bad.
- 38:08But the point is, like you, you can jump.
- 38:10There's a lot of cases where you can't jump straight to the final
- 38:13product, final need, rather than hey let's tiny steps, baby steps
- 38:18and all all the way. Yes.
- 38:22I understand what you're saying. There is that.
- 38:26We. Again, it goes back to
- 38:28rethinking the product. If you know that these.
- 38:34Capabilities are possible. How can we eliminate unnecessary
- 38:39steps? Yeah.
- 38:40Yeah, that's right. Yeah.
- 38:42Or or or just, it could be a completely new product
- 38:46altogether, right. So, but yes, yes.
- 38:48So if you can go, here's what we have here is what my customer is
- 38:51asking for. How do we get from A to B rather
- 38:54than to ZED rather than green BCD, right.
- 38:57So. So, so then talk to me how
- 39:00you're interacting with your product team now that you have
- 39:05this? A desire to level up on the
- 39:09product side of things and be understanding.
- 39:14Of the new capabilities, my personal goal has been to do to
- 39:19have more meetings with product managers, right.
- 39:22So for me, Michael was just just be to talk to my immediate group
- 39:27to talk a bit more about what what our goals.
- 39:32I'm still, yeah, I'm still not there in the sense that I'm
- 39:35still not. I'm still not a good enough
- 39:39product engineer, so to speak, right.
- 39:41So I've been, I think, and I'm trying to change that.
- 39:43I'm trying to stop reading papers and try to focus on this
- 39:47but. But you love that match.
- 39:50Yeah, it's like a drug. It is a passion.
- 39:52But let's let's go back to actually let's go back to
- 39:55something that you mentioned before about things have changed
- 39:59within the past few months I. My personal feeling is that when
- 40:05it comes to machine learning, like it really hasn't, nothing
- 40:08has fundamentally changed, right?
- 40:10So what's changed is that Open AI came with this amazing
- 40:14product and it needed a lot of people's imagination, which is a
- 40:18good thing. But, and I think a good way of
- 40:24putting this is say if you can pose your problem as a text
- 40:28problem then you are going to get far right.
- 40:32But if you can't pose the problem as it takes problem.
- 40:34So for example, risk modelling, that's still going to do your
- 40:39traditional models, that's that you can't, you can't use it in
- 40:42our model to do the same, the same problem.
- 40:46So that's when the maths becomes important, right?
- 40:48So when you try to do those other problems, which is not
- 40:53next word prediction, so yeah, so it did that.
- 40:58There will always be a place for the maths right?
- 41:00It's it's just a render of convincing product to go and
- 41:05explore those other things like I don't expect that to happen in
- 41:08the next six months. This is just such a huge
- 41:11opportunity to waste. Like I think we will be in this
- 41:14NLP hub for the next five years. But yeah, there's other problems
- 41:22will continue to exist in in different different formats.
- 41:24So I think the two cans right now in the machine and space is
- 41:28like tree based models and deep building models right?
- 41:33The thing is to again coming back to the mats, the loss
- 41:36function is still the same right?
- 41:37The console the same metric that they're trying to optimise over.
- 41:41So when it comes to marrying up maths and programming, deep
- 41:46learning as actually I personally think is doing a much
- 41:48better job because you can do a lot of wonderful things with
- 41:53these loss functions and and come to a conclusion whereas
- 41:59extra boost I just found it a bit more awkward to define this
- 42:02loss functions. So will they come together OK?
- 42:07I I hope so. I hope so.
- 42:09But I don't. I don't have any formed opinion
- 42:12about whether they can, but I do.
- 42:16I do think that the planning will overtake it at some point.
- 42:19Our board, Bryan who has something to say about that as
- 42:23as he always does. But yeah, so I do think there
- 42:29will be an Inflexion point where the tool generally it will take.
- 42:32And I do think that will happen in the next, if I had to, if I
- 42:35had to bet, I would bet in the next two years.
- 42:37Yeah, and boy, on for people who are listening and not super
- 42:41familiar with it is a loud Twitter voice.
- 42:43Yeah. But but like is, is, is is a
- 42:46genius, right. Like I yeah.
- 42:47I very much yeah. He's he's a Kaggle grandmaster
- 42:50as far as I know. So it's.
- 42:51Yeah, he, if anything has, yeah, he's, he's got things to back
- 42:57him up, right, like. Yeah, 100%.
- 43:01So then the the other question that I was thinking about just
- 43:07you having your head in papers and thinking about where things
- 43:12are going. I've heard a lot of criticism,
- 43:16and you've kind of hinted at this earlier on the current
- 43:20architecture and it having its limitations.
- 43:24Sure. Do you feel like we're going to
- 43:26go past Transformers? Have you seen anything that's
- 43:28interesting? Is that even a thought?
- 43:31Is that on your radar? Beyond Transformers, it's it's
- 43:37doing OK, right? So like I've seen.
- 43:41So the problem with Transformers for people who don't know is the
- 43:45length of the text, right. So the computational complexity
- 43:50is Owen squared, meaning that magnified the complexity of
- 43:55almost sentence. That's 4 words.
- 43:57Is is like OK, it's 4 ^2 compared to a single word which
- 44:04is just one squared. Anyway, point is just squared
- 44:07right complexity. Yeah.
- 44:08You don't have to do public math where you let listeners figure
- 44:12that one out on their own. Grab your calculators.
- 44:14Yeah, we're like Chad GBT in that regard.
- 44:17We don't like to do public man. We don't do public not.
- 44:20Yeah, so, so that's that's the biggest limitation of Transform
- 44:24is. But they they do have
- 44:26workarounds. Some papers are coming I think
- 44:30flash attention. It's probably the latest thing
- 44:32to try and deal with it. But the point is like I've seen
- 44:36a paper with a million tokens that it could deal with.
- 44:39So yeah, there's people arch that tackling the problem,
- 44:42right, so. It's it's a version of
- 44:45Transformers underneath all of that, so will that go away?
- 44:50I can't see anything major coming U anytime soon, but
- 44:56again, that might just be me with my limited depth.
- 45:01Yeah. Vision, I guess.
- 45:02So. Point is, it's it's doing it's
- 45:05doing quite well on its own, right?
- 45:06So do we need a new architecture?
- 45:08I don't. I don't think so.
- 45:09Not yet at least. What does excite me though is
- 45:14it's this graph ML site. So that is far more exciting
- 45:18because the thing with text or tabular is that you can only
- 45:24look at data that's linked to it, right?
- 45:28So within a row it's always the same row, within text it's just
- 45:31it's similar, it's a line of text, right?
- 45:34But Graphml, it can pull in images, it can blend text, it
- 45:38can pull in tablet data. So that is I think going to my
- 45:43personal got feeling is that that will prove far more
- 45:46interesting than just Transformers on its own.
- 45:51But it can do just marrying up all this data.
- 45:53We're still not using all possible data.
- 45:57So if I'm understanding that correctly, the idea is.
- 46:01Transformers we haven't sufficiently explored, and we
- 46:05haven't pushed the limit to where we feel like.
- 46:08We're bored of them yet, so we've got a lot of surface area
- 46:11to cover, but at the same time we can incorporate things like
- 46:15Graphml into what we're doing right now with Transformers.
- 46:20Would echo that far like I I'd like to see that happen that the
- 46:23the problem with FML is other libraries, right?
- 46:27They're not mature enough yet, uh?
- 46:32The the guy who was at Pinterest for a while, I forget his name.
- 46:36I think he had one of the the leading libraries.
- 46:39But the point is like not many people are working on it.
- 46:41So everyone's excited about Transformers.
- 46:44So there's a lot of brain power going into that area right now,
- 46:48not so much this other area. And that's fair enough.
- 46:50It's it's It's not a lot of value on its own right, but.
- 46:55I do think, yeah, when it comes to and let's you even think
- 46:59about SQL databases, right? So you can link up a whole bunch
- 47:02of data types and even missing data types which.
- 47:07Which current mill struggles with?
- 47:11Yeah. So if we if we can figure out a
- 47:13way to link data together, I think that will, that is where
- 47:17graphic novel can come in and play together.
- 47:19I think Transformers will still be a part of that, right.
- 47:22So there's nothing special about Transformers.
- 47:25It's just this attention mechanism that it has.
- 47:28So if I'm looking at a word cat, like how do I know which word
- 47:33it's paying attention to? That's that's really what's
- 47:35special about transform is this. Everything else is just just
- 47:39linear layers. Can you explain to me exactly?
- 47:42What graph is? Because I only know it through,
- 47:46I'm pretty sure I've just seen it.
- 47:48In reference to databases, maybe and then also.
- 47:54Like different teams on different database companies
- 47:56that I know are working on Graphml.
- 47:59OI think we need to make the distinction between Graph Mill
- 48:02and Graphql, right? So I think a lot of people when
- 48:05they say we're doing data science with graphs, they
- 48:07usually mean this graph QL thing which is somewhat mature
- 48:11product. But Graphml is doing inference
- 48:15on graphs. So for example, I think Twitter
- 48:18did this. So one way of saying whether an
- 48:22article is fake data is literally train a classifier on
- 48:26natural language, right? No, you can get plenty of data
- 48:31on that On national language have people labelled things as
- 48:35going fake or not fake. But what they did differently,
- 48:38which is which I thought was really unique, was instead of
- 48:41looking at the individual tweet, what they looked at was the the
- 48:45network of how these things spread, right so.
- 48:50Fake fake news. What happens?
- 48:53The tendency was that these bots would come and retweet them,
- 48:57right? And it would grow at a faster
- 48:59speed pace compared to normal news O that looking at the
- 49:05network, looking at how it's spread that and doing that
- 49:09classification on the network actually led to far more
- 49:12reliable results of saying what was fake was not.
- 49:16Rather than saying, let's look at the content of the off the
- 49:20tweet. Because again, like what's fake?
- 49:21News to one person might not be fake news.
- 49:24See others. Or it may be fake in. 20. 20 And
- 49:27then in 2023 it's not fake and so you learn new information or
- 49:32whatnot. So it's really about and and
- 49:35graph is just figuring out how how like how does graph play
- 49:40into that. So what was graph about that?
- 49:44So the graph about that was. So if you think of the the the
- 49:49original Twitter as a note, you would think of the edges as who
- 49:55would read it or who would who would read it.
- 49:58And the the other side of the note is who would retweet it,
- 50:01right? So in that case, they were
- 50:05looking at this like look at that you piece of information,
- 50:09which is a pace of transmission on that thing.
- 50:13But yeah, so that's. Where you get the edges and the
- 50:16nodes and yeah how do I marry U these all this data so you
- 50:24mentioned. Graph QL.
- 50:25But then there's also Graph Mill.
- 50:29Is Graphml, does it have anything to do with databases or
- 50:32was that whenever I heard graph look?
- 50:35It can as long as you define what the nodes are, right?
- 50:38So if you, if you think of a database as a node, right, a
- 50:43table now no, no no. I'm not doing justice for does
- 50:47the graph and health community. But this is again in my very
- 50:50limited knowledge they're going to riot.
- 50:52You're gonna see the. Castle quick, So yeah.
- 50:56So when I add SQL queries I'm really joining up to libraries,
- 51:01right? To points of data.
- 51:03So sometimes that data might be missing, right?
- 51:08So you might get the first few columns populated and the next
- 51:11few columns missing. O.
- 51:13The good thing about Graphml is that it can have a varying
- 51:17number of nodes around it, right?
- 51:19So when we're doing this machine learning on all graphs, if
- 51:23there's missing data, it's equivalent to not having a node
- 51:26at all that is joining to, right?
- 51:28So we can have variable amounts of data points, so this
- 51:32information that comes into that node when you're doing the
- 51:34machine learning over this graph, this entire graph depends
- 51:38on what it's connected to and what's already populated, so we
- 51:41don't. We might not have this missing
- 51:44data problem at all when it comes to Graphml, so I know
- 51:48Xgboost and stuff is always quite good at dealing with
- 51:51missing data. But I'm very much talking about
- 51:54OK, what? What if I treat this as a bunch
- 51:56of nodes coming in together? Awesome.
- 52:00Graham is the. Future You heard it here first.
- 52:03It's, it's. It's untapped.
- 52:05It's untapped pressure. That's that's my that's what I'm
- 52:07saying. Ohh, I like it.
- 52:09Yeah, yeah. We can make sure it's an I'll
- 52:12send one over to you and that is well I'll say ohh because I'll
- 52:17send you the link of the person I've talked to like he's he's
- 52:19he's I think he did a Stanford series on graph melas quite yeah
- 52:23quite fond of the way how he did it so nice.
- 52:27Yeah, we can add that. To the show notes, so anybody
- 52:29listening can also. Have a gander at it and now.
- 52:35There. Is one thing I want to talk to
- 52:36you. About also, which I find
- 52:39fascinating when it comes to. How long you've been playing
- 52:44around? With GPT, Yep, because you
- 52:48mentioned that you fine-tuned GPT 2.
- 52:53So a what was that experience? How did you go about that and
- 52:57like, tell me more? I think there's probably a
- 53:01handful of people that were playing around with GPT before.
- 53:05There's a boom, yeah. So I think what a lot of people
- 53:08don't realise is that GPT is quite old, right?
- 53:11It's about like the original GT is about four or five years old
- 53:14and people have been playing around that for a long time.
- 53:16So the two years ago I wanted to do so I was working this user
- 53:20voice team. We basically we get all these
- 53:23problems from users saying hey, can you help me with the
- 53:25payment? Can you help me with my design?
- 53:29Can we have automatic agent having automatic replies or at
- 53:33least at least do a portion of our users so and what I was
- 53:38going to do was train. Here's the input of here are the
- 53:42tickets that came in. Here's the output of how our
- 53:45agents are like human agents responded to to those tickets.
- 53:51So you have your input, output and yeah, what?
- 53:55And I want to train a GPT model now it didn't at the point like.
- 54:00My knowledge in training those models wasn't too great, so I
- 54:02didn't really get too far, but. So these days it's a lot easier.
- 54:07There's a lot of tools that you can, you can quantize it, you
- 54:10can reduce the like. Right now 30 point is 4 bytes.
- 54:16They receive 4/4 bits recently as well.
- 54:20So the point is there's a lot more, there's a lot more tools.
- 54:23I didn't actually use the compass tools, I just did the
- 54:26normal fine tuning in my little blog post where I did some
- 54:28grammar correction thing but the.
- 54:32Point is that you can you can. You can do that already using
- 54:36only face, just using manual without having to resort to
- 54:39using Open AI. Yeah, so Open AI is easy, quick
- 54:46way of doing things now. Like it's such a it's such a
- 54:48knowledgeable model that like I don't, I don't need to train a
- 54:52very specific model for grammar correction, It can correct the
- 54:55grammar for you, right? Because it knows about the
- 54:57entire world, so to speak. So you can get around that
- 55:02without any training with Open AI, but if you want to save a
- 55:05bit of money, if you want to do things in the house, I think, I
- 55:07think it's still valuable to have those skills within your
- 55:10company. That's the huge trade off that
- 55:13I'm seeing. Because people are able to get a
- 55:17quick. Feature out there and it goes
- 55:20back to that product discussion that we were talking about
- 55:22before and see if there's any value and then if there is value
- 55:25they can bring it in house and they can figure out phase two of
- 55:29it. I think that's that's a that's
- 55:32an amazing strategy, right? So test, test it out with the
- 55:35Open AI. Because another day, yes.
- 55:38It is like if you if you already set up the tools, yeah it is
- 55:42cheaper to. Train it in house.
- 55:44But you know, factoring in your engineering time, right?
- 55:47So you know, factoring maintenance costs and all that,
- 55:50so. Yeah, by all means test out.
- 55:54Just start to put off using to open AI API and then come back
- 56:00to train training model. Yeah, I mean it.
- 56:06If you can, right? Because I know there's a lot of
- 56:08use cases out there that. Are not allowed to send data or
- 56:13do anything outside of their little walled garden.
- 56:15So in those cases it makes a lot of sense.
- 56:18How have you found? I guess you probably are.
- 56:23Very opinionated about. The control that you have.
- 56:27With models that you are working on in house as opposed to
- 56:31sending out to some third party API's, have you looked at those
- 56:35trade-offs? I am guessing just from talking
- 56:38to you for the last hour that your opinions are that it's it's
- 56:42better to be in house always, although you're not.
- 56:46No, no, I'm not. I'm not that that strictly
- 56:49around that because end of the day there's only that camera we
- 56:54have. I think now we have about 50 or
- 56:5760 analyse, but we have a lot more teams, right?
- 57:00So. So.
- 57:03If you don't have an in house mill Imagineer, obviously you
- 57:07can't. Like you can't borrow other
- 57:09teams engineers. So yeah, by all means go ahead
- 57:13and do this because yeah, so a lot of problems that ML
- 57:19engineers can do have been, especially if you're an LLP
- 57:22side, which is what our words can be done by Open AI, right.
- 57:26So it's a back end problem now. So it's no longer a no problem,
- 57:30say. It so it's a very much a
- 57:33resource problem, right. So do you.
- 57:35Yeah. Do you want, do you have miles
- 57:38to do the miles have different problem to work on which is far
- 57:40more important, right. So and the third one I guess
- 57:43like the very important thing that you mentioned is speed like
- 57:45speed to market, right. So which which is really going
- 57:48to be crucial for a lot of companies in the next few
- 57:51months. There's a piece.
- 57:53That I wanted to go. Down the rabbit hole, a little
- 57:55bit of leading other ML engineers and leading teams and
- 58:02how you look at that and how, what have you found?
- 58:06To be successful and where do you feel like?
- 58:09Maybe others. Can.
- 58:13Make missteps. I think I've made a lot of
- 58:15mistakes, right. So I think the biggest mistake
- 58:18that we've done in the past is really not aligning or
- 58:21understanding product, right. So I would too often be
- 58:25interested in a mathematical problem, whereas the problem
- 58:27really that brings in the money is way very different to to
- 58:32that. So that's that's been a huge
- 58:35weakness of mine and I think and I think maybe I'm brushing
- 58:40everyone with a with a broad stroke, but I think that that is
- 58:43going to be a problem of MLAs especially if you come from
- 58:46academic background, right, trying to make that transition
- 58:48from academia into industry where the motivations are very
- 58:51different, so. Yeah, I think.
- 58:56I think people, if I was to advise my younger self, what I
- 58:59would tell is engage this product a little bit more often.
- 59:04And faster, simpler models and that would maybe.
- 59:10Not simple models, so I still think.
- 59:12I still do think that all these cool new toys do make a
- 59:16difference, right? So let's just tougher with the
- 59:19simple morons for a second. But fast.
- 59:21The speed? Speed is crucial, right?
- 59:23Speed of how you how fast you finish your model and move on to
- 59:28the next is very important. Umm.
- 59:32Yeah, just so you can show off a few more toys, right.
- 59:34I think that's that's the best way of putting it, yes.
- 59:38And talking about that, the 1% of these complicated models and
- 59:44this these hard math problems. How do you go?
- 59:48About. Looking at the trade-offs of
- 59:52that because it it seems to be a theme of hey, there are very
- 59:57valuable problems that you can hit.
- 59:59You just have to choose your battles.
- 1:00:01Yes, you have to choose the battles.
- 1:00:03Yeah, I think that's a very nice way of putting it.
- 1:00:06If I was to put a concrete number, I would say try and get
- 1:00:09a turn around time of Immortals of three months, I think that
- 1:00:12should be that should be the absolute Max.
- 1:00:15If you if whatever you're doing is taking is or, you can see
- 1:00:19that it's heading down that direction.
- 1:00:20Maybe it's time to look at a different solution.
- 1:00:25Work on. Something else?
- 1:00:28Because end of the day what you're what the business really
- 1:00:31needs is you to deliver, right. So coming back to Harding phase,
- 1:00:35the good thing about phase is that and all these other faster
- 1:00:38libraries is that they've given you a lot of tools to do that,
- 1:00:41right. So you don't need to compromise
- 1:00:45on the fancy stuff if you can use these tools O that's that
- 1:00:50has changed, right? So yeah, by all.
- 1:00:53Means go for bigger, more complicated models, but use the
- 1:00:57tools that are available rather than trying to do everything
- 1:01:00from scratch. So again, this is me to switch
- 1:01:02to myself, but I think, I think that a lot of people will
- 1:01:06resonate with that. I also think so and.
- 1:01:10It is one of those reoccurring themes that comes up time and
- 1:01:13time again on this podcast. And I don't think we can say it
- 1:01:17enough. What are some?
- 1:01:19Signs in your eyes that things. Aren't going as they should and
- 1:01:24maybe you need to scrap it and how do you have that kind of
- 1:01:28self talk of hold on just a little bit longer or let's scrap
- 1:01:33it up but it's it's a like a phone.
- 1:01:36Like one thing I found surprising about myself is like
- 1:01:38I'd get too attached to projects right that go.
- 1:01:40I'm surprised that I do that because like, I know that I want
- 1:01:44to be wanted different things, but.
- 1:01:47Yeah, I don't. I don't really have an answer
- 1:01:50for that, but let me let me talk about something that's
- 1:01:52tangentially related. So one thing I didn't understand
- 1:01:56was about metrics, right. So when I'm talking about
- 1:01:59metrics, I'm not talking about your precision recall scores.
- 1:02:03I'm not talking much accuracy. What I mean is like product
- 1:02:05metrics right? Which can be very different to.
- 1:02:10To what? Machine learning engineers think
- 1:02:13O. My keyword keyword model for
- 1:02:16example. So in that case one thing that
- 1:02:20we yeah the accuracy that we the metric that product key was
- 1:02:25about the pick rate like out of the out of the keywords and
- 1:02:29suggests how many of them actually picked.
- 1:02:31So I think that's recall in all terms now, like in wait time
- 1:02:36biases. I did my position recall, it's
- 1:02:39very different to what the X file recall was, right.
- 1:02:42So it's in English, it's. Course in non-english it wasn't
- 1:02:46close right So. Yeah, so I think I should have
- 1:02:51paid a lot more attention to testing my model as fast as I
- 1:02:56could and then coming back and iterating, right?
- 1:02:58So now I've moved on different projects, so I can't quite
- 1:03:01improve their model at this moment, which is a shame.
- 1:03:05But the point is I should have been.
- 1:03:08I should have been faster. I should have been using the
- 1:03:12hugging face libraries rather than do do my own thing.
- 1:03:16So yeah, that's focus on metrics from across the product metrics.
- 1:03:21I think that's a good way of figuring out is your model going
- 1:03:25the right way? It should be.
- 1:03:27That's so good that is. It it just hits home that idea
- 1:03:30of product and how important it is to have that product
- 1:03:34mentality and recognising what's important in it.
- 1:03:38It's a bit. Of a It's like human.
- 1:03:40Nature aid having a hard time letting go of your creations and
- 1:03:45then be. What it's like?
- 1:03:50At least inside myself. I also find myself not wanting
- 1:03:56to reach for off the shelf, off the shelf solutions and trying
- 1:04:01to think, oh, I could do this better and so almost reinventing
- 1:04:05the wheel. There is value in being able to
- 1:04:08tinker through things, changing things and I do generally think
- 1:04:13that we will make you a better engineer in the long term, but
- 1:04:16the business also needs you to be a different person in the
- 1:04:18short term, right. So it's a question of balancing
- 1:04:21that and that's balancing things is probably the biggest thing
- 1:04:24that I struggle with, with with today like yes, you've got your
- 1:04:28product versus reading papers problem as well, but I'm like
- 1:04:33I'm a parent now so I've got, I've got two kids like I can't
- 1:04:36like I cannot keep up with the explosion of papers that are
- 1:04:40coming up so. Yeah.
- 1:04:44So that's that's a bit of a that's a that's a real struggle
- 1:04:46that I don't have an answer for. I feel you, man.
- 1:04:50I also have. Two now and just trying to keep
- 1:04:54up with everything is a job in itself.
- 1:04:58Yeah, like. And my children are very
- 1:04:59demanding of my time. They're they're getting older.
- 1:05:01They're the more time that they demand of me.
- 1:05:04So yeah, it's just it's a bit hard to do right by everyone so.
- 1:05:12But again, I think, I think if you can get your product
- 1:05:14thinking right, you can, you can kind of get away from not
- 1:05:18needing to keep up to date with absolutely everything.
- 1:05:22Standing What's important? I don't.
- 1:05:26I I. Don't again I don't know what's
- 1:05:27important because these days that the only one thing that
- 1:05:30seems to be important is just the open AI API and everything
- 1:05:33else is just blah whatever if there.
- 1:05:36Yeah. I would love to see how other
- 1:05:38parents MO engineering parents deal with machine learning
- 1:05:41thesis that that's something perspective that I'd love to
- 1:05:44hear about because this is a very very demanding job being a
- 1:05:48MI engineer. So excellent.
- 1:05:51Well Sachin, this. Has been a brilliant
- 1:05:53conversation, man. I appreciate you doing this.
- 1:05:55I know it's late. Where you are in the world, I'm
- 1:05:57going to let you go. We'll just, we'll end it here.
- 1:06:01Thank you so much for having me. Really appreciate it.
- 1:06:08I'm Emmanuel Mason, Machine Learning Engineer at Stripe and
- 1:06:12author of Building Machine Learning Powered Applications.
- 1:06:15And if you don't want your machine learning models to
- 1:06:17explode, well, you should subscribe to this podcast.