Truly Serverless Infra for AI Engineers - with Erik Bernhardsson of Modal artwork

Truly Serverless Infra for AI Engineers - with Erik Bernhardsson of Modal

Latent Space: The AI Engineer Podcast

February 16, 2024

We’re writing this one day after the monster release of OpenAI’s Sora and Gemini 1.5. We covered this on Alex Volkov ‘s ThursdAI space, so head over there for our takes.
Speakers: Alessio, Swyx, Erik Bernhardsson
**Alessio** (0:05)
Hey, everyone, welcome to the Latent Space Podcast. This is Alessio, partner in C2 and resident and decibel partners, and I'm joined by my co-host, Swix, founder of Small AI.

**Swyx** (0:14)
Hey, and today we have in the studio, Erik Bernhardsson from Modal, welcome.

**Erik Bernhardsson** (0:18)
Hi, it's awesome being here.

**Swyx** (0:20)
Yeah, awesome seeing you in person. I've seen you online for a number of years as you're building on Modal, and I think you're just making a San Francisco trip just to see people here, right? I've been to two Modal events in San Francisco here.

**Erik Bernhardsson** (0:33)
Yeah, that's right, we're based in New York, so I figured sometimes I have to come out to capital of AI and make a presence.

**Swyx** (0:40)
What do you think is the pros and cons of building in New York?

**Erik Bernhardsson** (0:43)
I mean, I never built anything elsewhere. I lived in New York the last 12 years. I love the city. Obviously, there's a lot more stuff going on here, and there's a lot more customers, and that's why I'm out here.
I do feel like for me, where I am in life, I'm a very boring person. I kind of work hard, and then I go home and hang out with my kids.
I don't have time to go to events and meetups and stuff anyway. So in that sense, New York is kind of nice. I walk to work every morning five minutes away from my apartment. It's very time-efficient in that sense.

**Swyx** (1:09)
Yeah, yeah.
So it's a good life. So we'll do a brief bio, and then we'll talk about anything else that people should know about you. Actually, I was surprised to find out, you're from Sweden, you went to college in KTH.

**Erik Bernhardsson** (1:21)
Yep, yep.

**Swyx** (1:22)
And your master's was in implementing a scalable music recommender system.

**Erik Bernhardsson** (1:26)
Yeah.

**Swyx** (1:26)
I had no idea.

**Erik Bernhardsson** (1:27)
Yeah, yeah, yeah, yeah. So I actually studied physics, but I grew up coding, and I did a lot of programming competition. And then as I was thinking about graduating, I got in touch with an obscure music streaming startup called Spotify, which was then like 30 people. And for some reason, I convinced them, why don't I just come and write a master's thesis with you, and I'll do some cool collaborative filtering. Despite not knowing anything about collaborative filtering really, but no one knew anything back then. So I spent six months at Spotify basically building a prototype of a music recommendation system, and then turned that into a master's thesis.

**Swyx** (1:56)
Yeah.

**Erik Bernhardsson** (1:57)
And then later when I graduated, I joined Spotify full time.

**Swyx** (2:00)
Yeah, yeah. Yeah. So that was the start of your data career. You also wrote a couple of popular open-source tooling while you were there.
And then you joined, is that correct or?

**Erik Bernhardsson** (2:09)
No, that's right. I mean, I was at Spotify for seven years. It was a long stint. And Spotify was a wild place early on. And I mean, the data space is also a wild place. I mean, it was like Hadoop cluster in the foosball room on the floor. There's a lot of crude, very basic infrastructure, and I didn't know anything about it. And I was hired to kind of figure out data stuff. And I started hacking on a recommendation system, and then got sidetracked in a bunch of other stuff. I fixed a bunch of reporting things and set up A-B testing, and started doing business analytics, and later got back to music recommendation system. And a lot of the infrastructure didn't really exist. There was like Hadoop back then, which is kind of bad, and I don't miss it, but spent a lot of time with that.
As a part of that, I ended up building a workflow engine called Luigi, which is briefly somewhat widely ended up being used by a bunch of companies. Sort of like Airflow, but before Airflow, I think it did some things better, some things worse.
I also built a vector database called Innoi, which for a while was actually quite widely used in 2012 So it was way before all this vector database stuff ended up happening. And funny enough, I was actually obsessed with vectors back then. I was like, this is gonna be huge. Just give it a few years. I didn't know it was gonna take nine years, and then it was gonna suddenly be 20 startups doing vector databases in one year. So it did happen in that sense I was right. I'm glad I didn't start a startup in the vector database space.

68 more minutes of transcript below

Feed this to your agent

Try it now — copy, paste, done:

curl -H "x-api-key: pt_demo" \
  https://spoken.md/transcripts/1000651996090

Works with Claude, ChatGPT, Cursor, and any agent that makes HTTP calls.

From $0.10 per transcript. No subscription. Credits never expire.

Using your own key:

curl -H "x-api-key: YOUR_KEY" \
  https://spoken.md/transcripts/1000645612784