Latest / Agentic Conversations (formally mlops.community) / Python Power: How Daft Embeds Models and Revolutionizes Data Processing // Sammy Sidhu // #165
Transcript
- 0:00Hi, I'm Sammy. I'm the CEO of Angel and I drink
- 0:04espresso at the splash of almond milk.
- 0:07Come back to another ML OPS community podcast.
- 0:10I'm your host Demetrios, and today I am flying solo for the
- 0:15Once in a Blue Moon Times that I do this.
- 0:18I got the pleasure of talking to Sammy Sidhu.
- 0:21This was an incredible podcast. We go through all of Samy's
- 0:26history. It was an incredible stint that
- 0:28he went through in the autonomous driving, autonomous
- 0:31vehicle. Era and he went through actually
- 0:352 acquisitions of these startups that got bought out by bigger
- 0:39companies. The first one got bought by
- 0:41Tesla and then the second one got bought by Toyota.
- 0:44And everything that you learned from that time doing this very
- 0:49low level stuff with tiny ML and optimising, distilling these
- 0:54models really making things work fast and work reliably he put
- 0:59into his new company eventual and eventual has a.
- 1:04Offering that is open source and I encourage anyone to check it
- 1:08out. It's called DAF.
- 1:10We'll leave the link to in the description to that for anyone
- 1:13who wants to look at it and. Let's just jump into this
- 1:17conversation with him because I think you all are going to love
- 1:22what he talks about when it comes to the future of MLM's and
- 1:27machine learning and just data and how we store the data, how
- 1:31we query the data. Especially his specialty has
- 1:36been the unstructured data world and the what he likes to refer
- 1:41to as the complex data world and how you can make that much
- 1:45easier than just having some metadata.
- 1:48That points to an S3 bucket, and that's really what they're
- 1:50trying to do at Daft. From my understanding of it,
- 1:53it's much faster and it's much easier and it's much more
- 1:56robust. O, let's jump into the
- 1:58conversation with Amy right now. By the way, if you enjoy this,
- 2:04it would mean the world to me if you send this episode to one
- 2:08friend so they can share in this joy with all of us.
- 2:12Let's get into it. Here's Sammy Sidhu. you here.
- 2:24Of course you didn't think you were going to come on here
- 2:27without me talking about California raisins, huh?
- 2:31No, that's true. Yeah.
- 2:35So I'm Sammy. I grew up on a Raisin farm and
- 2:39now I work in complex data. Not just any Raisin farm though.
- 2:43Let's talk about this because there's a lot of people who
- 2:45probably that are listening that don't understand the cultural
- 2:49significance of the Raisin farm that you grew up on, which is,
- 2:53I'm pretty sure a lot of millennials and people our age.
- 2:59Had your raisins in their lunch box at lunchtime and it was just
- 3:04a little box of raisins that probably came with like 20
- 3:07raisins and they called, they said on the box, I remember
- 3:11distinctly, right, it was this small box, I think it was red
- 3:14and it said California raisins on them.
- 3:17It is. So I grew up on a farm that was
- 3:19one of the producers first said made it.
- 3:21And the box I think is best for to most people where it's the
- 3:25lady putting the tray of raisins out into the sun that was and
- 3:29that's exactly what we did. We would grow grapes on a
- 3:31vineyard and cut them down and then make them into raisins.
- 3:34And the cool thing is that like no matter where I go in the
- 3:37world, I owe them connecting with people over submit reasons.
- 3:41I was in Korea for a conference and I mentioned it at a dinner
- 3:45and everyone's like, oh, I had that all the time.
- 3:47I was a little kid. Two.
- 3:48Ohh. So it's always something that
- 3:50connects with people. They monopolised the Raisin
- 3:53industry, huh? No, it's interesting because
- 3:55it's actually a cooperative. So there's actually a bunch of
- 3:58farms in California that get together at solar raisins
- 4:00together. Ohh So what is the process of
- 4:04creating raisins? I know it's dried grapes right?
- 4:07It's dried grapes, but the thing was sunrise insides made by the
- 4:11sun. So generally what you do is you
- 4:14have a table grapes that you grow on a vineyard and then
- 4:17would you end up doing is when they're ripe, when the sugar
- 4:19level. At a certain level you cut them
- 4:22down from the vine and you throw out a piece of paper on the
- 4:25ground. And then what you end up doing
- 4:27is you kind of just like rotate it every few days until it's
- 4:30into raisins and then you throw it into a big hopper.
- 4:33So you grew U doing that. You would know when the Raisin
- 4:36season was and when the harvest was and all that, and I imagine
- 4:40you were cutting stuff down. Yeah, my parents were at work,
- 4:44so my summers were cutting raisins and rebuilding tractors.
- 4:49So how did that take you into complex data?
- 4:53What the hell was that trajectory like?
- 4:56Yeah, it's a good one. Let's see.
- 4:59Gravida Farm. I obviously like getting my
- 5:01hands dirty, so I worked on a lot of tractors with my dad.
- 5:06Fixed everything around the farm and got into like electronics,
- 5:09computers. Very early cause of that.
- 5:12My parents noticed this and got me out of the farm because, you
- 5:15know, I was pretty much doing nothing at school at that point
- 5:18and the Central Valley. And so I moved to the Bay Area
- 5:21and over here I just got hooked on computers, ended up staying
- 5:25local, going to Berkeley, and ended up focusing a lot on.
- 5:31High performance computing, low level programming stuff and then
- 5:34get bit by the math bug. God's machine learning and my
- 5:38professor who I worked under in college started a company.
- 5:43And that company worked essentially on building
- 5:46autopilot for everyone else. And I ended up being the first
- 5:49hire there and eventually the CTO.
- 5:51And that's kind of how my journey got started working.
- 5:56Yeah, you said autopilot for everyone else.
- 5:59What does that mean? Yes.
- 6:01Well, at the time. While we were trying to build
- 6:06it. So if you think about a toddler
- 6:08strive, there's like multiple meanings. 1 is what we call like
- 6:11level 2 Level 3 driving which is stuff like hands off, hands off
- 6:16driving where like the car will drive itself on like a highway
- 6:19and then you have like things that are like level 4 level 5
- 6:22which will be called as eyes offer minds off, mind off which
- 6:25is essentially like you don't have to pay attention or even
- 6:27look at the road. So well we were building for
- 6:29autopilot was kind of the level 2 Level 3 which is I can go onto
- 6:33a highway it will drive itself and do its thing.
- 6:36And the way the market we were targeting is for everyone else.
- 6:40One thing we notice was that. Around 2018-2019 is a most
- 6:47manufacturers already bundling a camera in their vehicle.
- 6:52To do things like parking assessed or like automated
- 6:55cruise control already and I think that we could do is by
- 6:59making models that we are really good at making small putting
- 7:02them into in the in the car that and essentially running it on
- 7:06potato hardware. We could actually unlock all
- 7:09this functionality for self driving without actually adding
- 7:12any hardware for the customer. Or some challenges that you had
- 7:16to deal with? Ohh.
- 7:18You're essentially writing these really complex deep learning
- 7:21models on potatoes. It's really hard to do and think
- 7:25about. The computing power was
- 7:26essentially like, let's say a pen or half 1/10 or 1/4 of a
- 7:31Raspberry Pi, and what we had to do is get all the data that we
- 7:34would collect. We would have to then transform
- 7:37it into something that we can train models on and then we
- 7:40would train these like mega models and then shrink them down
- 7:43to run real time on tiny hardware.
- 7:47How would you shrink them down? What were some techniques and
- 7:50tricks that you learned from years of practise, I imagine?
- 7:54Yeah, it's interesting stuff. There's things like, you know.
- 8:001st is data quality. If you are creating the model on
- 8:05a lot unloaded data where some of them disagree or not are not
- 8:09consistent, the model has to be bigger to kind of like see
- 8:12through that. But well one thing we notice is
- 8:14that if I actually just get data and clean it very well, you
- 8:17actually need less model capacity to represent your data
- 8:20set really well. So just really clean data was
- 8:22one Ave the other ones were a little bit more exotic which one
- 8:27of the things we did is I have a paper on this.
- 8:30I was going to ask. Knew there was gonna be a taper
- 8:32somewhere in this story. Yeah, and it is it, it is.
- 8:37We did have to. A lot of the technology wasn't
- 8:39there yet, and so we had to develop a lot of it ourselves.
- 8:42But I had a paper called Squeezed Ass and the idea is
- 8:45that we use a network assisted search to essentially find the
- 8:50best network for the hardware. So what we did is we used the
- 8:54neural network to then find the optimal network for the maximum
- 8:58accuracy and the lowest latency for a given hardware set.
- 9:02And that helped a lot. I I wanna know a little bit
- 9:06before we move on about you became CTO of this company and
- 9:11you were doing the very much ML stuff.
- 9:13You also had that low level. Distributed computing aspect of
- 9:18it, I guess. And so when you were looking at
- 9:22the systems, what were some of the other pieces that you were
- 9:26factoring in when you were architecting these smaller
- 9:30models on very very dumb or tiny?
- 9:33I guess the proper word is tiny ML and the half Raspberry Pi or
- 9:38the 10th of a Raspberry Pi. What else were you thinking
- 9:43about as you were deploying these onto the cars for everyone
- 9:47else? Yeah.
- 9:50There's, there's a lot of different things I I would say
- 9:52like the important thing with the whole process, right, you
- 9:55have these models and the thing that we are optimising for was
- 9:58iteration speed. So what that means is producing
- 10:02new models quickly dependent on orders that happened.
- 10:06And so we think about that One of things we need to be able to
- 10:08do is produce these models quickly on these large training
- 10:13clusters. So we were one of the early
- 10:14people who did distributed training and the thing that was
- 10:18really interesting there is when you start making these models.
- 10:21Dollar. You end up.
- 10:24Stress the system in weird ways. So one thing that would happen
- 10:27is because we're training these small models, our GPU.
- 10:32We're running this pretty efficiently, but the amount of
- 10:34data you had to ingest for these models increase exponentially.
- 10:39Because think about if you have like a large model, the amount
- 10:42of GPU to CPU work is quite balanced, but once you start
- 10:46freaking that model, the CPU work doesn't go away.
- 10:49But the GPU work is now getting faster and faster and so we
- 10:52ended up getting bottleneck in all these weird places for
- 10:55training and we had to like kind of reinvent the wheel to to kind
- 10:58of make that work. And then they just kept on going
- 11:03like we got to just running into weird issues like when it came
- 11:06to model deployment. But we noticed that some of
- 11:08these platforms that we were targeting were invented like a
- 11:1210 years ago as an accelerator. And what we had to do is that if
- 11:17we ran it on just the CPU for this, you know these hardware
- 11:20that you put in the car and these hardwares or you could
- 11:24think of them as like these platforms that are made by like
- 11:27a company called Renaissance or NXP, these companies that you
- 11:30pretty much have never heard of, but they have.
- 11:33Monopoly in the car Computer chip space, yeah.
- 11:39But The thing is that sucked about them is that they're kind
- 11:41of designed by committee. And so they just have a bunch of
- 11:44random shit in there. Like they'll be like, oh, we
- 11:46have this one accelerator for these operations, and we have
- 11:50this other accelerator for these other operations.
- 11:53And so we ended up building a compiler to be like, OK, here's
- 11:56an input model and then kind of like divvy up your model onto
- 12:00these other chips. So we had to do design models
- 12:03that had layers that were easily mappable to multiple parts of
- 12:07the hardware. Him.
- 12:10So you had to do all kinds of janky shit?
- 12:13Yeah, it it was weird. It was weird.
- 12:15And then I think the worst thing we had to do is one of the
- 12:19letters we worked with had a chip that the compiler was only
- 12:24in Windows. And that was probably like the
- 12:26worst month of my life. And I'm guessing this is a lot
- 12:30of. Cutting through regulation too
- 12:33because or the chips were like this because they had to go
- 12:36through rigorous regulation red tape.
- 12:40It is true, yeah. And that is the case.
- 12:42So typically when we talk about self driving hardware, they have
- 12:46different levels of what we call ASAL.
- 12:48And the idea is like how safe is this chip?
- 12:52And so a lot of these chips have like failovers and redundancies
- 12:56such that like if something breaks then it can still
- 12:58operating as normal. Yeah, makes sense so.
- 13:02Inevitably you probably created a lot of stuff while you were
- 13:06there and is that what made you see the light and realise that
- 13:10hey, you know what, with this complex data stuff there's
- 13:13probably a few businesses that you could create around it.
- 13:15I know that you you did this and then you went and you had
- 13:19another stint in self driving cars, right?
- 13:21And then you started daft. Yeah, it's a it's an interesting
- 13:27history. So I I was at this company
- 13:29called Deep Scale and then we actually got acquired by Tesla.
- 13:33And so I worked through that whole acquisition process and
- 13:36after Tesla I then went to left to kind of lead a lot of their
- 13:41self driving efforts around perception.
- 13:43And then that team got a card by Toyota, so with the Toyota for a
- 13:47bit and then after that, you know after four companies of
- 13:50essentially building complex data systems and being the
- 13:54builder of these systems and user of them, I was like, OK.
- 13:58Other people need tools that I kind of had, I I hadn't were
- 14:02great, but once you leave you don't really have anything.
- 14:05And So what we wanted to do is kind of bring the functionality
- 14:09that you're familiar with like a database or data warehouse for
- 14:11Talbot data, but to the complex domain.
- 14:14So you inevitably thought deeply about if the world needs another
- 14:19database. What made you decide and explain
- 14:22more about what you're creating with DAF?
- 14:25Yeah, for sure. I I guess like.
- 14:29I'll talk a little bit about what we see as the the common
- 14:33issue right now. What what if you are dealing
- 14:35with complex setup. So if you're a company dealing
- 14:37with complex data, well I most often saw and the systems that I
- 14:41initially built were kind of bringing together the best of
- 14:46relational with these kind of batch processing engines.
- 14:48So imagine you are a self driving company or a biotech
- 14:52company. You have a bunch of things like
- 14:55images, videos, 3D scans. What?
- 14:59You would intuitively build to kind of build an engine end to
- 15:01end to process these images is getting a traditional database
- 15:05or data warehouse, putting all the metadata in there and when
- 15:09it came to the assets like the video or image, you would just
- 15:13have like a pointer to some remote storage like streaming.
- 15:16So you would put a bunch of images and three and have a
- 15:19database with all the metadata. And what would then happen is
- 15:23when I wanted to process this I would have to do three different
- 15:26steps. I would first have a data
- 15:28analyst SQL query to be like what data should I process them?
- 15:32Then you would run that query and you get a list of files and
- 15:36then you do something like spark to then process them and then
- 15:39give you the results where you then dump the three or dump the
- 15:41results back into a SQL table. Then you would finally get
- 15:44another data analyst to actually process the end results and give
- 15:49you the analytics that you cared about.
- 15:51And what we saw was like these really nasty systems that had
- 15:55talked to three different teams to actually do this end to end.
- 15:58And I was always like OK first, if we're running a query we
- 16:01can't optimise the end to end and #2.
- 16:04Dealing with Spark with images or videos or 3D scans was like a
- 16:09nightmare. Ohh what would happen is that
- 16:12Spark doesn't have the right abstractions here to represent
- 16:14the data natively and what would happen is that.
- 16:18You would have one. Machine get too much memory from
- 16:23having all these images and memory and it would boom or out
- 16:26of memory and then now would die and they would rebalance and
- 16:30they would just knock out the rest of your cluster.
- 16:32Like Domino's. Domino's.
- 16:34Yeah yeah. And I always just like killed me
- 16:38going through like 10,000 lion log files of like Java umm
- 16:42errors and like fighting what was the one line that caused my
- 16:45bug. So I think I could spend
- 16:47collectively weeks of my life on this.
- 16:49So painful. Yeah, it's so painful.
- 16:53And I always thought like, hey, you know what?
- 16:54Like we had a system that was like natively understood that
- 16:57this is a 2 gigabyte file and don't just load it like dumbly
- 17:01in memory. That would make my life so much
- 17:03easier. So after all my senses are
- 17:06driving, I kind of talked to a few company.
- 17:08It's about like, hey, if I work here, what do you want me to
- 17:11work on? And four of the companies that I
- 17:13talked to out of five said, hey, we would want you to handle this
- 17:17whole side of unstructured data processing.
- 17:20And I was like, oh, this sounds like a good startup idea.
- 17:23And then I I paired up with someone I worked with at that
- 17:26Level 5. I left Level 5 and he was also
- 17:29very passionate in space and we started the company and
- 17:31eventual. Isn't, and our first product
- 17:35that we worked on, our we're working on is called Daft, which
- 17:38is an open source query engine for all those types of data
- 17:41where it understands it very intimately.
- 17:44Hmm, and the idea is that you can load in all of this data and
- 17:48then you can query it easily and it's the metadata is with the
- 17:54unstructured images and. That is my understanding.
- 17:59Is that correct? Yeah, yeah.
- 18:01So it it's kind of like I would say.
- 18:04It's a distributed data frame that's all Pythonic.
- 18:07But the entire engines ran out in Rust.
- 18:09And what it looks like to the user is something like a pandas
- 18:12data frame where I can say I'm gonna read all these, read these
- 18:16millions of files in S3 as like read files.
- 18:19I want to then process them as an image.
- 18:21I want to crop them, resize them, and then I want to load
- 18:24them into a machine learning model for either inference or
- 18:28training. And what it looks like to you is
- 18:30you're just building this query. Using a lazy API and when it
- 18:33comes to execute it will actually run it on a cluster
- 18:37using this query plan that it develops, but then also
- 18:39intimately understands the data that's running on.
- 18:41So no more umm errors and very optimal queries for complex
- 18:45data. That's awesome.
- 18:48So then. This is daft.
- 18:51Eventual is what? So eventual, so we want to be a
- 18:57lot more than managed staffed. So what we're working on is we
- 19:02have plenty, we have users, so most of the users of data right
- 19:04now are actually in the enterprise space.
- 19:06So they're right now using open source staff to do a lot of
- 19:10query processing a bunch structured data.
- 19:13Part that the question we get after how do I how do I run
- 19:18these queries on complex data or a structured data is how should
- 19:21I store it for better retrieval. So the next product that we're
- 19:25working on is a so will be open source, but a managed enterprise
- 19:29managed version of this which is how do I store my data
- 19:33efficiently for complex data. So think of it as a complex
- 19:36catalogue for everything unstructured.
- 19:39And it differs from just that three bucket in what ways?
- 19:45So if you're familiar with like a data warehouse or a database,
- 19:48you get all these amazing features like governance, like
- 19:52schema evolution, like time travel.
- 19:55But there is none of that for, for example, a bucket of images
- 19:59in S3. And So what we're trying to do
- 20:01is give you the things that you're familiar with Bigquery,
- 20:04Ohh or or dinner or large data warehouses, but for unstructured
- 20:08data. So think of it as I want these
- 20:10teams to have these permissions and I wanna add this new column
- 20:13or I want to delete this column or I want to have a retainment
- 20:16policy. These are things that we're
- 20:18adding on top of. Just plain old S3.
- 20:22Also much faster loading. Rather than just a bunch of
- 20:24single images, we can actually compact it into something that's
- 20:27really easy to load in. Ohh yeah how's that?
- 20:31So there's some interesting formats you can do.
- 20:33So what we see right now is people stuffing a bunch of
- 20:38images and Parquet which isn't really the best, it's great for
- 20:41tabular but isn't necessarily the best format for images.
- 20:44So for a lot of us, we're all we're developing our own
- 20:47container formats to to be able to load data really efficiently
- 20:51for images or you know seek to certain parts of the image from
- 20:54cloud storage directly. Ohh nice.
- 20:56So inevitably man, I'm sure everyone is asking you about.
- 21:02How you fit in in this large language model world and
- 21:07unstructured data is so hot right now.
- 21:11What is your thesis or how do you look at it when it comes to
- 21:16whether it's whatever text to image or?
- 21:21Text to animation, text to video?
- 21:24Any of that, or just straight generative AI with a open AI
- 21:30call? How are you seeing?
- 21:34What you're doing at eventual laying into this like new
- 21:38paradigm of machine learning and if at all, because maybe you're
- 21:42like, yeah, right now we're focusing on this slice and it's
- 21:46not actually that important to us to get distracted with the
- 21:49shiny new toys. Yeah.
- 21:53I mean that that's a good question.
- 21:54I would say a lot of what we're building is compatible with the
- 21:58future of LMS. So some of the things, some of the risks we're
- 22:02working on with some of our early users are around LLM's and
- 22:08generative AI. So a big one is actually
- 22:12retrieval. And so are you familiar with
- 22:15chain of thought for alms? Yeah, dude.
- 22:18So we talked about the exhibit example earlier.
- 22:22There's this. Great.
- 22:24Paper from Alex Radner and a lot of other people that I can't
- 22:29remember who, but he was talking about, distilled step by step,
- 22:33and it's basically distilling them all.
- 22:35Have you seen that paper? Yeah, yeah.
- 22:38OK, you know about it, but I'll explain it for the listeners in
- 22:41case they missed it. It's distilled step-by-step.
- 22:44Basically, is asking, it's distilling the models, but when
- 22:48they distil it through the large language model, they're asking
- 22:51for this chain of thought reasoning.
- 22:53And so it makes it much easier for you to get that distilled
- 22:58model and train it with less data, because the metadata is so
- 23:02rich from the chain of thought, reasoning prompting, or chain of
- 23:07thought prompting that you get. From the large language model
- 23:09when you're creating that training data for the distilled
- 23:14model. Yeah, it's it's super cool
- 23:17stuff. It's it's crazy to me how
- 23:19different distillation is now compared to distillation when we
- 23:22used to do it. Back in your day.
- 23:25Back in my day, distillation was like kind of was kind of dumb
- 23:28like what you would do is you would trade a big model and then
- 23:32you would just train the essentially like you would use
- 23:36that output as the ground truth for a smaller model.
- 23:39And that was it. And then, yeah, I don't know, it
- 23:44was just like, Ohh, maybe the big model understands the labels
- 23:47better than the the ground truth.
- 23:48And then I don't know. But anyway.
- 23:51Come a long way from there. Anyway, I distracted you.
- 23:55Tell me about why you were talking about distillation in
- 23:57the first place. Yeah, so the way I think about
- 24:01train of thought reasoning is it's quite compatible with this.
- 24:03So one of the use cases we're doing now is.
- 24:07Being able to process data like the rebajas data set, being able
- 24:11to load it in philtre it and then do things like
- 24:13tokenization, do things like run and open source model on it and
- 24:17then doing things like I have a set of embeddings and I wanna do
- 24:20this hybrid search over a large data set of find me.
- 24:26You know, sources of text that were published in this date have
- 24:30this type of style and then have similarity closer to this.
- 24:33That's kind of like the first level use case.
- 24:35The next level use case is actually plugging DAF straight
- 24:38into the Elms and having if I asked the LLM hey, give me some
- 24:42documents that show me. I don't know that are written in
- 24:49the style of I don't know what's what's your favourite author,
- 24:51Hunter Thompson. OK Hunter Thompson And so The
- 24:56thing is for a lot of these models, we don't really quite
- 24:59have things precomputed and we don't necessarily know what the
- 25:01other model query looks like. And so we can actually do is
- 25:05actually plug and DAP as one of the query sources for LLM.
- 25:09So think of it like, you know we've seen all these demos of
- 25:12LLM's writing SQL to then send it off to a database and
- 25:16retrieve it and then parse the results.
- 25:18We can do the exact same thing for complex data, which is right
- 25:20have LMS right. These queries search over these
- 25:23large corpuses. On S3 or these dead legs, bring
- 25:27back the results and then have the alums interpret it.
- 25:29Interesting. Wait, say that again.
- 25:31I'm not sure if I fully grasp what you were saying there.
- 25:34Ohh what I'm trying to say is like just how we can provide a
- 25:39SQL engine for Elms today to understand some of your tabular
- 25:43data. We could do the exact same thing
- 25:44for complex data, which is I can have my data like full of
- 25:47multimodal complex data and have the LLM writing daft queries to
- 25:52then try to understand them better.
- 25:55Ohh. Dude, that is awesome.
- 25:59OK, I see what you're saying. So then these are some of the
- 26:03large language model use cases I imagine.
- 26:07Four out of those five dentists that you talked to earlier or
- 26:11whatever they were when you went out to get a new job before
- 26:15starting eventual and they said hey, we we want you to work on
- 26:19this use case and this problem area.
- 26:22They weren't necessarily doing things with LMS back in those
- 26:26days when you started eventual and so there's a tonne of other
- 26:30use cases. Is it very much like where you
- 26:32see it soar, where you're seeing daft really take off is?
- 26:37In your. Past life kind of world where
- 26:42it's the self driving car world and I know you mentioned also
- 26:46drug discovery, is that another use case area that you see it
- 26:50taken off? Yeah.
- 26:52So the the area that we see it taking off and the areas we're
- 26:55focusing in are essentially the domains that don't get much
- 26:59love. And so kind of, you know, trying
- 27:02to, yeah. And so right now if you're
- 27:03trying to process images, there's a bunch of different
- 27:05tools that sort of work. And so for that it's kind of
- 27:10crowded. But what we actually have talked
- 27:12a lot of our users, if I'm trying to build a way to build a
- 27:17queries on audio data and read all these different audio
- 27:19sources, transcribe them and then do all these different
- 27:23various analytics and filtering, there's not really a good tool
- 27:26for that. And So what we really lean into
- 27:28is making sure we work really well for these domains.
- 27:31Don't get quite much love and so that seems like audio 3D assets
- 27:36like game assets. Microscopy images from biotech,
- 27:40which is like these. These large lossless images that
- 27:44are hard for Python libraries typically interpret.
- 27:47Yeah, and also just weird wacky things.
- 27:50Like A big use case of ours is someone sets up a Kafka stream
- 27:55and they dump a bunch of these proto buffs.
- 27:57It has three. And then now they're like, hey,
- 28:00how do I just philtre over a billion roto buffs for things
- 28:05that have this in their field and defrost great for that.
- 28:09Ohh, nice. OK so.
- 28:12You could potentially work incredible for playing around
- 28:16and querying a lot of MLB's community podcasts.
- 28:21That's a great use case. Like if there's like a a bunch
- 28:24of sources or URL's for the podcast and we can pull them in,
- 28:28transcribe them, chunk up the text and then.
- 28:32You know, and then find out, interestingly, you said and then
- 28:34maybe train a model to fine tune it on your voice and replace
- 28:37you. Test.
- 28:38Then I don't even have to be here.
- 28:40I can just have you interview the fake me.
- 28:43Maybe I'm not even real right now, man.
- 28:45Who knows? Yeah, so that's, yeah, we'll
- 28:48have to do some kind of hackathon on that later because
- 28:51I think that would be super fun to pull all that data.
- 28:54And also it sounds like you're making it really easy compared
- 28:58to what I had thought it would we would have to do.
- 29:04Yeah, it's really easy. I mean you could spin it up in
- 29:06colop and then get the query working and then it's a one line
- 29:10switch to switch it from running locally to running on a
- 29:13distributed cluster. Nice.
- 29:15Ohh, that's awesome. So now what are some things that
- 29:18you took from your self driving days and all this tiny ML stuff
- 29:23that you were doing and you're now bringing into daft or
- 29:27eventual? Yeah, I think there's a couple
- 29:31of concepts that I think are really important.
- 29:33I think one thing that I took away early was.
- 29:37If you focus on traditional data systems and taller space, the
- 29:41individual rows don't really matter.
- 29:43It's about the analytics result right?
- 29:46But in complex data and self driving, the individual rows
- 29:50matter. Hey, Laszlo here.
- 29:53If you're serious about Emma Loops, you hit subscribe right
- 29:56now. So it's like if I'm trying to
- 30:03search for failure cases, the individual results matter, not
- 30:06the analytic part of it. And so it's almost like usable
- 30:10system, that's like hybrid transactional analytics, but
- 30:14you're not really doing transactions.
- 30:15So one thing we both adopt early is how do we make sure like
- 30:19needle in the haystack queries are really performant and easy
- 30:22to do. Yeah, that makes hundred sense
- 30:27so. It feels like, and this again
- 30:31going back to that whole idea of the self driving cars, it feels
- 30:34like. I know we mentioned it
- 30:36beforehand. It's one of those high risk or?
- 30:43Very high. What?
- 30:45There's a special word for it that the EU uses to classify the
- 30:49MLS use case? I can't remember.
- 30:50It's something high. Damn, I can't remember but.
- 30:56It basically it's dangerous because there's lives that are
- 31:00potentially affected in very. Bad ways if shit goes off the
- 31:06rails and so making these needle and haystack use cases or.
- 31:13Cases. Able to you're able to find them
- 31:17really quickly in Dave seems like yeah it's a no brainer.
- 31:20You came from that world and now you're seeing, hey, how can I
- 31:24make that very useful? Even if it isn't with this high
- 31:30danger situation. Yeah, yeah, the needle in the
- 31:34haystack type queries. We see him a lot now and and
- 31:36indeed generate AI space as well, which is find me this
- 31:39document that exhibits XYZ and you end up searching.
- 31:43Like you're not saying how many documents are there that
- 31:46exhibits would say, you're saying give me the documents
- 31:49that exhibit this. So we we see this pattern quite
- 31:53often now where you want kind of the best about the world and So
- 31:56what we're doing that and for the whole safety thing, it's
- 31:59quite interesting because I'm seeing a lot of similarities
- 32:01between. The self-driving domain and
- 32:04thinking about safety and the whole stuff that's happening
- 32:09now, like I would say for any AI you develop, it's important to
- 32:13essentially have a safety net so we can't do harm.
- 32:15And the way you think about how rigorous action has to be is
- 32:20what can it do. So when you think about self
- 32:22driving, what we would do is, you know, you need a way for
- 32:26something to take over. And so we would have the self
- 32:29driving stock. You would have a safety layer
- 32:31and software to prevent things like.
- 32:34You know hitting the curb or hitting a person that was
- 32:37outside of the traditional like system that would be running
- 32:40for, you know the the end to end automation.
- 32:42But then you also have a. Safety driver who would take
- 32:46over a minute, start a second service so that they would be,
- 32:49you know, hand hovering the wheel and grab the car and
- 32:52disengage whenever something, what happens?
- 32:54Yeah. And the the way that any of
- 32:58these aids are developed, including, you know, the ones
- 33:00that we see now is you have feedback loops, you you
- 33:02essentially put something out there, you observe how it does,
- 33:06you see the failures and then you improve it.
- 33:08Where As for self driving that they'd let the business very
- 33:11expensive because you need a human to literally constantly
- 33:14monitor it so all the feedback, all the validation you're
- 33:17getting is supervised by a human.
- 33:20But for the whole Geni geni AI space, it's quite interesting
- 33:24because I put them in two domains.
- 33:26One domain is. Where it's OK to fail.
- 33:30And I see that in a lot of creative applications where if
- 33:34I'm doing copywriting or image generation, yeah, exactly.
- 33:39Any of those, there's not really a right answer and there's no
- 33:43right answer to fail. And so it's OK, right?
- 33:46There's as a use case where you can put out there and your
- 33:50feedback we're getting from users is what images are
- 33:52actually clicking and actually downloading based on what they
- 33:56generate. But then other domains, like
- 33:58let's say. The AI is you still have that
- 34:01feedback loop, but then they have to be reviewed by lawyers.
- 34:04But each in each time that they're being run it's gonna
- 34:07improve over time. So I kind of view it analogous
- 34:09but a little bit different. I remember the word, the high,
- 34:14high stakes. That's high stakes.
- 34:16Yeah, dude, I can't believe I was totally blinking on that
- 34:19one. So going back to what you're
- 34:21saying though, 100%, I fully agree with you on that.
- 34:24Where there are these? Expensive feedback loops, but
- 34:29you also want to make sure that there is some kind of safety net
- 34:32just in case and it feels like. There's these use cases with
- 34:38generative AI where you don't. Need safety Nets per se, because
- 34:45the worst that can happen is you get a deformed face on an image
- 34:48that you generate, or you get a copyrighted image that you
- 34:52generate and you got to figure that out and make sure that.
- 34:56You just generate something better and you become the
- 34:59curator and whatnot. Or when it's.
- 35:03Generating text, then you can add your flavour to it and
- 35:08there's not really any high stakes there.
- 35:10But when it comes to more of this.
- 35:15Legal documentation or if we're talking about I, I mean there's
- 35:19there's a few different high stakes potential here that you
- 35:24do need a bit of a safety net. Yeah, I agree.
- 35:28Like. That's the thing I feel like it
- 35:31needs to be understood better. I feel like a lot I I see a lot
- 35:35of companies or individuals starting these projects that
- 35:37they are great. But you know, for example, legal
- 35:39AI is like, I think I see a future where it works with the
- 35:42lawyers are using it, but at the same time I pay my lawyers a lot
- 35:45of money. Because they don't make
- 35:47mistakes. Sure.
- 35:49Otherwise I wouldn't do myself. You know what I mean?
- 35:51Yeah. Yeah, exactly.
- 35:53I I know how to prompt this. Yeah, whatever.
- 35:56Harvey came out of that. So I can figure that out on my
- 36:00own. I yeah, I understand what you're
- 36:02saying on that. And and then coming back to what
- 36:06you're doing with Daft and how you're thinking about that.
- 36:09How does that tie in? Yeah, so a lot of these use
- 36:13cases like for example Harvey might do, is they have these
- 36:17corpuses of legal documents and they want to be able to get
- 36:21these documents, use image processing on them, extract out
- 36:25image, extract out text, and then run them through LMS. Those
- 36:30are things that that would be a really, really good tool.
- 36:32What we see right now in in the the general AI space is that a
- 36:36lot of people are just writing Python scripts that go over each
- 36:40file, extract the text manually and then hit the Open AI API and
- 36:46they kind of dumped that either in a file or like one of these
- 36:48vector databases. And then kind of the process
- 36:51completely restart once they switch the model or switch the
- 36:54kind of thing that they're doing.
- 36:55And so we want to make that really easy to do, which is I
- 36:58can build my entire pipeline just using a data frame like I
- 37:01would do. Pandas and when you're ready to
- 37:02commercialise it or make it production ready, you just
- 37:05switch a couple of flags and then you can run this on a
- 37:07cluster so. It's it makes their life a lot
- 37:11easier. That's what I would say.
- 37:12Yeah ohh dude. I see the vision, then I see and
- 37:16I understand that. So one thing that I also wanted
- 37:20to mention and bring U is. And you kind of hinted at this
- 37:24before? Is around.
- 37:30How you think about the needs and?
- 37:35Tradeoffs when it comes to tabular data versus this
- 37:40unstructured or complex data and certain things that you need in
- 37:44tabular data and other things that you need in complex data
- 37:49and how you look at the two architectures.
- 37:52And if you're setting up a system right now and you only
- 37:55need to go down 1 route, maybe it's the tabular data route,
- 37:58then what are you going to be building for and optimising for?
- 38:01And then if you have complex data, what are some things that
- 38:04you're keeping in mind and optimising for?
- 38:07Yeah, that's a that's a good question.
- 38:11I guess like talking about. The.
- 38:15Like the the axioms of both, I think is really important.
- 38:18So right when we talk about tabular data, you typically
- 38:21think like. Integers, floats, you know
- 38:25things like strings. And most of the time when you
- 38:28have this data, the queries you're running are usually
- 38:32aggregations. So what that means is that I
- 38:34have like these files of text, they could be large files of
- 38:37text and what I'm essentially doing is going through each row
- 38:42and then doing things like min, Max, sum.
- 38:44These very cheap operations to compute.
- 38:46So if you think about it as what is the volume of data I have and
- 38:50the volume of compute, it's actually much more data heavy.
- 38:54So it's like I might have gigabytes of data, but I only
- 38:56have billions of operations, so they're quite balanced.
- 39:00Well I've got an image, images and things like text for LM is
- 39:04completely different. Whereas if I have like a one KB
- 39:08or sorry like 100 KB image. I am processing potentially
- 39:12trolling the operations on it. Right.
- 39:16Or if I have like let's say a work of Shakespeare which is
- 39:19only like a MB, I will be processing, you know, queen
- 39:22trillions of operations using MLM, you shouldn't.
- 39:26And so the ratios that we think about of compute over the data
- 39:30is completely different. So when you're buying callback
- 39:32systems, you have to think about it as I will be compute bound
- 39:35almost every single time. Where I was like, if you think
- 39:40about traditional query engines, you're like OK, all they're
- 39:42doing is optimising or you know, reading from S3 and they don't
- 39:47really bother about the compute. Which is fair because they'll be
- 39:51like that. Ohh.
- 39:58So then what are some? OK, I and I love you break it
- 40:01down by the axioms and you think about, hey, let's look at the
- 40:06fundamentals of one versus the fundamentals of another and what
- 40:10the bottlenecks are going to be and what you're going to
- 40:12encounter. And so then as you're building
- 40:14systems around this, what are some things that you would?
- 40:17Say I definitely want to have in my toolkit if I'm dealing with
- 40:21one versus the other. Yeah.
- 40:26I would say if I was building an allergist engine, I would go for
- 40:28something simple and something that failures are handled in,
- 40:33you know, in a way where we can recover easily.
- 40:35So for example if you're running things on like a spark cluster
- 40:40and you, it's fine because the amount of work you have to
- 40:43reproduce is not bad, OK. But if you talk about that in
- 40:46terms of like complex data cluster, that does not work very
- 40:49well. And So what we're building
- 40:51around that is. First making sure DAPT
- 40:54understands the data types natively so they understand what
- 40:57an image is and how how expensive it is it to bring into
- 41:00memory, How expensive is it to centred around and also for
- 41:04these various other formats as well.
- 41:06Also understanding that placement and scheduling is.
- 41:10Very important and we require really high utilisation, so an
- 41:14example is if you get a lot of these complex data workflows.
- 41:19And map it to something like a Spark cluster.
- 41:21You only use about 20% of the hardware.
- 41:25Tim. And so if you're using GPUs or,
- 41:27you know, running LMS or a computer vision model on this
- 41:30data, you're pretty much burning five times more money than you
- 41:34have to. And so some of things that we're
- 41:38doing here is saying, OK, you know what, Our users are
- 41:40typically enterprise companies who want to save money and by
- 41:44putting things into DAF, they can run things that's Pythonic
- 41:48using data frames, but then still get really good
- 41:50utilisation and cheap throughput essentially for their whole
- 41:54system. And so yeah, the things we're
- 41:56designing around there once again are.
- 41:59Really understanding the data we're working with having query
- 42:03plans that are necessarily not optimised for.
- 42:06Table analytics, but for comic data processing and actually
- 42:10being really tied into the hardware running on.
- 42:13So really understanding the AWS machines we run on and how to
- 42:17get the most out of them built into the framework.
- 42:19I wanted to go down 1 route but then when you said that last
- 42:24part it's it's like ohh I I thought about something else,
- 42:28something else got triggered and you have this background in tiny
- 42:31ML and how does that play into things and that like with Daft,
- 42:37what is it optimising for or how are you thinking about?
- 42:42Those kind of. Use cases.
- 42:46It's pretty interesting. So.
- 42:53So I I guess one thing I'll go into first is what what's the
- 42:56eventual goal of Daft, Right. No pun intended there, so.
- 43:02The the way that we're building out data is right now, although
- 43:07we were. So our user interface right now
- 43:09is in Python And all of the engine and stuff is a hybrid
- 43:13between Python And REST. As we're building more and more,
- 43:16we're getting to a mode where we can run completely serverless,
- 43:19where you can run things in Python on your laptop, but then
- 43:23when it executes, it can completely route out state in a
- 43:26cloud cluster and then spin down as soon as it's done.
- 43:30And. One of the difficult things with
- 43:32that with you know models is that most of the models right
- 43:36now require Python. So you typically use Pytorch or
- 43:39Tensorflow, and you embed that into Daft or typical typical
- 43:44workloads using Python And do a bunch of this glue code.
- 43:48But one observation that we've noticed is that.
- 43:51You know, although the beginning we wanted to make things really
- 43:53easy for Python to build models and and run them in the app, we
- 43:58noticed that a lot of people just run the same models.
- 44:01And Daft, like they run the same, you know, Alan model,
- 44:04they're in the same computer vision models and they might
- 44:07change things like weights, but the models are generally there.
- 44:09So one of the things that we're going to in the future, which is
- 44:12where my background comes in a tiny ML, is how do we actually
- 44:15embed models in DAF where we can run them, compile them down to
- 44:20hardware, run them on CPU or GPU natively without any Python or
- 44:24any framework. And then execute that very
- 44:28efficiently on the cluster. And so that's one of the things
- 44:31that we're working on, which is if I have something like a LAMA
- 44:33model, we can actually just package that as part of Daft
- 44:37running in the cluster and there's no work on your part you
- 44:39really have to do. And then you can bring it down
- 44:45to the running it on a potato as you said, and having this
- 44:49capability. Just the out-of-the-box that
- 44:52works. It works and like I think that's
- 44:56it's it's getting really interesting because.
- 44:59If we think about like the inference per dollar for a lot
- 45:02of these models. GPU's are usually the most
- 45:05efficient, right? Like in terms of a cost per
- 45:07dollar? Embers per dollar.
- 45:09But the problem is no one can get GPU's now.
- 45:12There's a massive shortage, which is stuff that I dealt with
- 45:14that when I was working at Lift. We would use all the GP's in a
- 45:17single data centre and we had to learn a lot about how do we do
- 45:20things. Differently, so we can actually
- 45:23do our work. And so we're seeing that now
- 45:25with this whole genre. Airwave is that.
- 45:28I I, I'm, I'm in this slacker for a WS support and everyday
- 45:31people were like can I get more GPU and the guys are like no.
- 45:36Right. Is that we have to think about
- 45:38alternatives. And So what do you do if you
- 45:40need to get those? If you get your shit done and
- 45:42you can't get GPU's, you need to adapt.
- 45:46Yeah, yeah, yeah. You have to figure out what's
- 45:48the, what's the. Way around this?
- 45:51And how can we make it work without the GPUs that we have
- 45:55been relying on this whole time? O what's the workaround?
- 46:01Yeah, so I think a big one is, I mean have you seen all those
- 46:04really cool work on like Llama CPP?
- 46:09No, wait, is this the one where it's just super small Llama
- 46:13models? Super small.
- 46:15So does guy essentially got Facebooks Lama model and then?
- 46:19He wrote, he did Whisper and then he did.
- 46:22Yeah, yeah, you can run it on your computer, right?
- 46:24Like you can run it on a CPU on your whatever laptop.
- 46:27Yeah, exactly. And So what he did is made the
- 46:29model smaller so if it's better in memory and then wrote a hyper
- 46:33optimised version and purely and simply pause using vectorized
- 46:36operations and whatnot for this one model and so.
- 46:41When you compile with model, you essentially have a single binary
- 46:44that does inference the model, and I kind of see that as you
- 46:48know the future of these albums, which is.
- 46:52You can package these standardised alarms that are
- 46:55optimised for your hardware as part of your query and use it to
- 46:59extract or do generation or whatever task you want.
- 47:03Ohh, incredible. I mean, this is making the
- 47:05assumption that I keep telling people.
- 47:09That open source models are going to be good enough.
- 47:14And right now they're not there. But the big assumption that
- 47:17everybody is saying is like open source will be there in six
- 47:19months. Don't worry about it.
- 47:20It's going no matter what. Yeah.
- 47:24I'm a big I'm I'm big on open source like I you know our whole
- 47:27a whole company is an open source I I think open source
- 47:30will take. I mean I I see I see an all a
- 47:32lot of analogues that computer vision loss so.
- 47:36In the I started doing computer vision on like 2012 and and
- 47:41during that time the big bad computer vision algorithms were
- 47:44all in companies. You had companies like Clarify,
- 47:47you had Google, you had like Apple, they were doing all this
- 47:49crazy computer vision. But then you would have these
- 47:53open source research papers come out and then they would be a
- 47:55little bit better and then the companies would surpass them.
- 47:57And then we got to a point where.
- 47:59People just kind of stopped caring because the open source
- 48:02was just so good and now what people do is they just use them
- 48:05as a black box for their tasks, and that's kind of what we see
- 48:08now for computer vision. Yeah, yeah, yeah.
- 48:12I mean, I hope it is like that. Don't get me wrong, I am a huge
- 48:17proponent of the open source world doing its thing and
- 48:21optimising it and making it free and open, of course.
- 48:26I just, we haven't seen it yet. And a few of these attempts, I
- 48:31try and play around with them and I'm like, dude, this isn't
- 48:33six months behind. This is like 2 years behind.
- 48:38I I would agree with that, like it's probably gonna be more like
- 48:41years, like 2-1 to 2-3 years rather than months.
- 48:47Because I'm in the Moat here once again is like a big cluster
- 48:50training models on like it. You have a huge cluster where
- 48:53you can train these models on, then I think you can do it, but
- 48:56they're too good to the base level.
- 48:58I think the next part is then making these fine-tuned datasets
- 49:01of like Q&A like Open AI is done.
- 49:05Yeah, 100%. I'm excited for it though.
- 49:10I I'm a big, I'm a big permanent of open source and I I think it
- 49:14will take off. Awesome, Sammy, This has been
- 49:19fascinating, man. I love talking to you about all
- 49:21of this, the history of where you came from, where you're
- 49:25going, what you're doing. Last question I have for you is.
- 49:30Over the years, you have inevitably succeeded on a few
- 49:35things. You've failed on a few things.
- 49:38Where do you feel like you succeeded, where others
- 49:42typically have failed, and why do you think you succeeded?
- 49:48Hmm, that's a good question. I feel like it's because I care
- 49:56about things that people told me not to care about.
- 49:59Ohh and I think the biggest one is when I started my career.
- 50:04Is that? The advice I got from a lot of
- 50:08software engineers was. Ohh, don't worry about making
- 50:12those run fast or don't worry about going low level.
- 50:15It's not worth it and the advice I got for them came from an era
- 50:20when. You know computers got things
- 50:24getting faster when you do know work.
- 50:25So you can write shitty software and computers are just get
- 50:28faster and then your code will be no no longer an issue.
- 50:31Or the other thing I would say is that Oh yeah, computers are
- 50:34much cheaper than software engineers.
- 50:37Right, but then I would always feel my optimizer hat on and go
- 50:41into the assembly, or go into the level and actually just
- 50:43really understand why things were running the way they did.
- 50:46And so our deep skill like that ended up paying off and at lift
- 50:50and and Toyota ended up paying off.
- 50:51And now I feel like that experience is really getting in
- 50:54there, which is understanding why things are slow or why
- 50:58things are fast because I did not listen to the advice people
- 51:01gave me in the beginning of my career.
- 51:04Incredible, man. This has been so cool.
- 51:07Thank you so much for coming on here.
- 51:08I think we'll end it there. Yeah.
- 51:11Thanks for having