There hasn't been a boom like the AI boom since the dot-com days, and it may look like a space
destined to be controlled by a couple of tech giants. But Ines Montani thinks open source will
play an important role in the future of AI. I hope you join us for this excellent conversation
about the future of AI and open source. This is Talk Python to Me, episode 465, recorded May 8th,
2024.
Are you ready for your host?
You're listening to Michael Kennedy on Talk Python to Me. Live from Portland, Oregon,
and this segment was made with Python.
Welcome to Talk Python to Me, a weekly podcast on Python. This is your host, Michael Kennedy.
Follow me on Mastodon, where I'm @mkennedy, and follow the podcast using @talkpython,
both on fosstodon.org. Keep up with the show and listen to over seven years of past episodes
at talkpython.fm. We've started streaming most of our episodes live on YouTube. Subscribe to our
YouTube channel over at talkpython.fm/youtube to get notified about upcoming shows and be part of
that episode. This episode is brought to you by Sentry. Don't let those errors go unnoticed. Use
Sentry like we do here at Talk Python. Sign up at talkpython.fm/sentry. And it's brought to you by
Pork Bun. Launching a successful project involves many decisions, not the least of which is choosing a
domain name. Get a .app, .dev, or .food domain name at Pork Bun for just $1 for the first year at
Talk Python.fm slash Pork Bun. Before we jump into the show, a quick announcement. Over at Talk Python, we just
launched a new course, and it's super relevant to today's topic. The course is called Getting Started with
NLP and Spacey. It was created by Vincent Warmerdom, who has spent time working directly on Spacey at
Explosion AI. The course is a really fun exploration of what you can do with Spacey for processing and
understanding text data. And Vincent uses the past nine years of Talk Python transcripts as the core data for the
course. If you have text data you need to understand, check out the course today at talkpython.fm/Spacey.
The link is in your podcast player show notes. Now on to more AI and Spacey with Ines.
Ines, welcome back to Talk Python.
Thanks for having me. Yeah, thanks for having me back again.
You're one of my favorite guests. It's always awesome to have you.
Oh, thanks. You're my favorite podcast.
Thank you. We have some really cool things to talk about. Spacey, some of course, but also more broadly,
we're going to talk about just LLMs and AIs and open source and business models and even monopolies.
I'm going to cover a lot of things. You've been kind of making a bit of a roadshow, a tour around
much of Europe talking about some of these ideas, right?
Yeah, I've gotten invited to quite a few conferences. And I feel like this is like after COVID, the first
like proper, proper year again that I'm like traveling for conferences. And I was like, why not?
And I think especially now that so much is happening in the AI space, I think it's actually really nice
to go to these conferences and connect with actual developers. Because, you know, if you're just
sitting on the internet and you're scrolling, I don't know, LinkedIn, and sometimes it can be really
hard to tell like what people are really thinking and what's, do people really believe some of these
hot, weird takes that people are putting out there. So yeah, it was very, very nice to talk about
some of these ideas, get them checked against what developers think. So yeah, it's been really cool.
And there's more to come. Yeah, I know. I'll be traveling again later this month to Italy for
PyCon for my first time, then PyData London, and who knows what else.
If you must go to Italy and London, what terrible places to spend time in, huh?
I'm definitely very open for tips, especially for Italy, for Florence. I've never, I've never been,
I've never been to Italy ever. So.
Oh, awesome. I've been to Rome, but that's it. And so I don't have any tips, but London is,
London is also fantastic. Yeah.
Cool. So people can check you out, but maybe, I think, do you have a list of that publicly where
people can see some of your talks? We can put that in the show notes. Yeah.
Yeah. It's on my website. And then also on the explosion side of our company, we've actually
added an events page because it came up a lot that like either me, Matt, people from our team
giving talks. And so we thought like, Hey, let's, and podcasts as well. So let me be collecting
everything on one page, all the stuff we're doing, which is kind of fun.
Which is quite a bit actually, for sure. Yeah. Yeah. Well, I know many people know you,
but let's just talk a little bit about Spacey, Explosion, Prodigy, the stuff that you guys are
doing to give people a sense of where you're coming from.
Yeah. So we're basically, we're an open source company and we build developer tools for AI,
natural language processing specifically. So, you know, you're working with lots of text,
you want to analyze it beyond just looking for keywords. That's kind of where we started and
what we've always been focusing on. So Spacey is probably what we're mostly known for, which is a
popular open source library for really what we call industrial strength NLP. So built for production,
it's fast, it's efficient. We've put a lot of work into, you know, having good usable, user-friendly,
developer-friendly APIs. Actually. Yeah. I always set an example. I always like to show in my talks,
a nice side effect that we never anticipated like that is that ChatGPT and similar models are
actually pretty good at writing Spacey code because we put a lot of work into all of this stuff like
backwards compatibility, not breaking people's code all the time, stuff like that. But that happens to
really help at least for now with these models. It's really nice. It's a good thing you've done to
make it a really stable API that people can trust. But is it weird to see LLMs talking about stuff
we all created? It's kind of, it's funny in some way. I mean, it's also, there is this whole other
site to, you know, doing user support for detecting clearly auto-generated code because
for Spacey, these models are pretty good for Prodigy, which is our annotation tool, which is also scriptable
in Python. It's a bit less precise and it hallucinates a lot because there's just less code online and on
GitHub. So we sometimes get like support requests where like users post their code and we're like,
this is so strange. How did you find these APIs? They don't exist. And then we're like, ah, this was
auto-generated. Oh, okay. So that was a very new experience. And also it's, you know, I think everyone
who publishes online deals with that, but like, it's very frustrating to see all these like auto-generated
posts that like look like tech posts, but are completely bullshit and completely wrong. Like I saw
with something on Spacey LLM, which is our extension for integrating large language models into Spacey.
And they're like some blog posts that look like they're tech blog posts, but they're like completely
hallucinated. And it's very, very strange to see that about like your own software. And also it
frustrates me because that stuff is going to feed into the next generation of these models. Right. And
then they will stop being so good at this because they're full of stuff that they've generated
themselves on like APIs and things that don't even exist. Yeah. It's just going to cycle around and
around and around until it just gets worse every time. And then that's interesting. Like it's very
interesting to see what's going on and where, where these things lead. It is, you know, I, I just had a
thought I was, you know, open AI and some of these different companies are, are doing work to try to
detect AI generated images. And I imagine AI generated content. Yeah. When I heard that,
my thought was like, well, that's just because they kind of want to be good citizens. And I want to put
little labels and say this, what if it's just so they don't ingest it twice? I think that's definitely,
and I mean, in a way it's also good because, you know, we will, it would make these models worse.
And so from like, you know, from a product perspective for a company like open AI, that's
definitely very useful. And, I think also, you know, commercially, I think there's definitely,
you know, a big market in that also for like social networks and stuff to, to detect are these real
images, are these deep fakes, any money in that too. So it's not, I don't think it's just, yeah,
being good citizens, but like this, there's a clear product motivated thing, which is fine,
you know, for a company. Yeah. It is fine. I just, I never really thought about it. Of course.
Of course. Yeah. Do you think we'll get to some point where in food or art, you hear about artisanal
handcrafted pizza or, you know, whatever, will there'll be artisanal human created tech that has
got a special, special flavor to it? Like this was created with no AI. Look at how cool this site is
or whatever. I think it's already something that like, you see, like, I don't know which product this
was, but I saw there was some ad campaign. I think it might've been a language learning app
or something else where they really like put that into one of their like marketing claims. Like, Hey,
it's not AI generated. We don't use AI. It's actually real in humans because it seems to be,
you know, what people want. They want, you know, they want to have at least that feeling. So
I definitely think there's an appeal of that also going forward.
The whole LLM and AI stuff. It's just, it's permeated culture so much. I was at the motorcycle
shop yesterday talking to a guy who was a motorcycle salesman. And he was like, do you think that AI
is going to change how software developers work? Do you think they're still going to be relevant? I'm
like, you're a sale, you're a motorcycle sales guy. It's amazing. how that you're like,
really this tuned into it. Right. And that you're like, but you know, you think it's maybe just a
little echo chamber of us talking about, but it seems to be like these kinds of conversations are
more broad than maybe you would have guessed.
Chatty PT definitely, you know, brought the conversation into the mainstream, but on the
other hand, on the plus side, it also means it makes it a lot easier for us kind of to explain
our work because people have at least heard of this. And I think it's also for developers working in
teams. Like on the one hand, it can maybe be frustrating to do this expectation management
because, you know, you have management who just came back from some fancy conference and
got sold on like, Ooh, we need like some chatbot or LLM. It's kind of the chatbot hype all over again
that we already had in 2015 or so. That can be frustrating.
I forgot all about that. Those were going to be so important. And now what are they doing?
Nothing. Yeah. But yeah, but it's, it's like, yeah, I see a lot of parallels. It's like,
if you look at kind of the hype cycle and people's expectations and expectation
management, it's kind of the same thing in a lot of ways, only that like it actually,
a lot of parts actually kind of work now, which we didn't really have before.
Yeah. But yeah, it also means for teams and developers that they at least have some more
funding available and resources that they can work with. Because I feel like before that happened,
it looked like that, you know, companies are really cutting their budgets, all these exploratory AI
projects. They all got cut. It was quite frustrating for a lot of developers. And now at least,
you know, it means they can actually work again, even though they also have to kind of
manage the expectations and like work around some of the very wild ideas that companies might have at
the moment.
Absolutely. Now, one of the things that's really important, and we're going to get to here,
give you a chance to give a shout out to the other thing that you all have is,
is how do you teach these things? Information and how do you get them to know things and,
and so on. And, you know, for the spacey world, you have Prodigy and maybe give a shout out to
Prodigy Teams. That's something you just are just announcing, right?
Yeah. So that's currently in beta. It's something we've been working on. So the idea of Prodigy has
always been, hey, you know, support a spacey, also other libraries. And how can we, yeah,
how can we make the training and data collection process more efficient or so efficient that companies
can in-house that process? Like whether it's creating training data, creating evaluation data,
like even if what you're doing is completely generative and you have a model that does it well,
you need some examples and some data where you know the answer. And often that's a structured
data format. So you need to create that. We've, you know, really seen that like outsourcing that
doesn't work very well. And also now with the newer technologies, you, with transfer learning,
you don't need millions of examples anymore. This whole, like this big, big data idea for
task-specific stuff is really dead, dead in a lot of ways. So Prodigy is a developer tool that you can
script in Python and that makes it easy to really collect this kind of structured data on text images
and so on. And then Prodigy Teams, that has been a very ambitious project. We've really been,
we've wanted to ship this a long time ago already, but it's been very challenging because
we basically want to bring also a lot of these ideas that probably we're going to talk about today a
bit into the cloud while retaining the data privacy. And so you'll be able to run your own cluster on
your own infrastructure that has the data that's scriptable in Python. So you can kind of script
the SaaS app in Python, which is very cool, which you normally can't do. Your data never leaves our
service. And you can basically also use these workflows like distillation, where you start out with a super easy
prototype that might use LAMA or some other models to add GPT, GPT-4. Then you benchmark that, see how it does.
And then you collect some data until you can beat that inaccuracy and have a task-specific model that really
only does the one extraction you're interested in. And that model can be tiny. Like we've had users
build models that are under 10 megabytes. Like that's, that is pretty crazy to think about these days.
And that, that run like 20 times faster. They're entirely private. You can, you know, you don't need
like tons of compute to run them. And that's kind of really one of the workflows of the future that we
see as very promising. And it's also, people are often surprised how little task-specific data you
actually need to say, beat GPT-4 inaccuracy. It's not as much as people think. And it's totally,
you know, in a single workday, you could often do it. The main idea we've been thinking about a lot is
basically how can we make that workflow better and more user-friendly, even for people who are,
who don't have an extensive machine learning background.
Right.
Because one thing that like prompting an LLM or prompting a generative model has is that it's
a very low barrier to entry. And it's very, very use the UX is very good. You just type in a question,
you talk to it the way you would talk to a human, and that's easy to get started with the workflow.
That's a bit more involved. Yes. Machine learning developers know how to do that and they know
when to do it, but it's not as accessible to people who don't have all of that experience. And so that's
kind of the underlying thing that we're trying to solve.
This portion of Talk Python to Me is brought to you by Sentry. In the last episode, I told you about how we use Sentry to solve a tricky problem. This time, I want to talk about making your front end and back end code work more tightly together.
If you're having a hard time getting a complete picture of how your app is working and how requests flow from the front end JavaScript app back to your Python services down into database calls for errors and performance, you should definitely check out Sentry's distributed tracing.
With distributed tracing, you'll be able to track your software's performance, measure metrics like throughput and latency, and display the impact of errors across multiple systems.
Distributed tracing makes Sentry a more complete performance monitoring solution, helping you diagnose problems and measure your application's overall health more quickly.
Tracing in Sentry provides insights such as what occurred for a specific event or issue, the conditions that cause bottlenecks or latency issues, and the endpoints and operations that consume the most time.
Help your front end and back end teams work seamlessly together.
Check out Sentry's distributed tracing at talkpython.fm/sentry-trace.
That's talkpython.fm/sentry-trace.
And when you sign up, please use our code TALKPYTHON, all caps, no spaces, to get more features and let them know that you came from us.
Thank you to Sentry for supporting the show.
You talked about transfer learning and using relatively small amounts of data to specialize models.
Tell people about what that is.
How do you actually do that?
It's actually the same idea that has ultimately really led to these large generative models that we see.
And that's essentially realizing that we can learn a lot about the language and the world and, you know, a lot of general stuff from raw.
Like if we just train a model with a language modeling objective on like a bunch of text on the whole internet or parts of the internet or whatever,
in order to basically solve the task, which can be stuff like predict the next word.
In order to do that, the model has to learn so much in its weights and in its representations about the language
and about like really underlying subtle stuff about the language that it's also really good at other stuff.
That's kind of in a nutshell, the basic idea.
And that's then later led to, you know, larger and larger models and more and more of these ideas.
But yeah, the basic concept is if you just train on a lot of raw text and a lot of these models are available,
like something like BERT, that's already like quite a few years old, but still, if you look at kind of the literature
and look at the experiments people are doing, it's still very competitive.
It's like you get really good results, even with the most, one of the most basic foundation models.
And you can use that, initialize your model with that, and then just train like a small task network on top,
instead of training everything from scratch, which is what you had to do before.
Or it's like, if you imagine hiring a new employee, it's like, yes, you expect, you know, you don't,
you can raise them from birth or you can sort of have them, which is like a very creepy concept,
but it's really similar.
Teach them everything.
You were born to be a barista, let me tell you.
Yeah, and then you teach them English and you teach them.
Yeah, I mean, yeah, it's a lot of work.
And I guess you know this more than me because you have, you have kids, right?
So, yeah, so, and you know, it's understandable that like, okay, this, this, this made a lot
of these ML projects really hard, but now you actually have the employee come in and they
can, they know how to talk to people.
They speak the language and all you have to teach them is like, hey, here's how you make
a coffee here.
Exactly.
Yeah.
You basically lean on the school system to say they know the language, they know arithmetic,
they know how to talk to people.
I just need to show them how this Expresso machine works.
Here's how you check in.
Please take out the trash every two hours.
Like, yeah, very little bit of specialized information, but you, the sort of general working
human knowledge is like the base LLM, right?
That's the idea.
And also transfer learning, it's still, it's just one technology and in context learning,
which is, you know, what we have with these generative models.
That's also just another technique.
Like it's, you know, it's not the case that transfer learning is sort of outdated or has
been replaced by in context learning.
It's two different strategies and you use them in different contexts.
So.
One thing I want to touch on for people.
I know some people, probably everyone listening is more or less aware of this, but in practice,
a lot of folks out there listening, certainly the ones who are not in the ML or developer
space.
They just go to chat or they go to somewhere and they're like, this is the AI I've gone
to, right?
Maybe they go to Bard.
I don't know.
Gemini or whatever they call it.
But there's a whole bunch.
I mean, many, many, many open source models with all sorts of variations.
One thing I really like is LM studio in more introduced this to me, introduced me to it a
couple of months ago.
And basically it's a UI for exploring hugging face models and then downloading them and running
them with like a chat interface just in a UI.
And the really cool thing is they just added Llama 3, but a lot of these are open source.
A lot of these are accessible.
You run them on your machine.
You get 7 billion parameter models run easily on my Mac mini.
Yeah.
What do you think about some of these models rather than the huge ones?
Yeah, no, I think it's, and also a lot of them are like, you know, the model itself is
not necessarily much smaller than what a lot of these chat assistants deploy.
And I think it's also, you know, these are really just the core models for everything that's
like proprietary and sort of in-house behind like an API.
There's at least one open source version that's very similar.
Like I think it's the raw model is really based on academic research.
A lot of the same data that's available.
And I think the most important differentiation we see is then around these chat assistants and
how they work and how the products are designed.
So I think it's also, this is a, it's kind of a nice exercise or a nice way just to look at this
distinction between the products versus the machine facing models.
Because I think that's AI or like the, you know, these products are more than just a model.
And I think that's like a super important thing to keep in mind.
It's really relevant for this conversation because you have a whole section where you talk about
regulation and what is the thing, what is the aspect of these things that should or could be
regulated?
We'll get to that in a minute.
A lot of the confusion, confusion that people have around like, Ooh, are we like, is all
AI going to be locked away behind APIs?
And what, how do these bigger, bigger models work?
I think it kind of stems from the fact that like, it's not always the distinction between
like the models and products isn't always clear.
And, you know, you could even argue maybe some companies that are in this business, you know,
it benefits them to call everything the AI.
Yeah.
That really doesn't help.
So to here, you really see the models.
Yeah.
And just sorry to talk over you, but to give people a sense, even if you search for Lama
3 in this thing, there's 192 different configured, modified, et cetera, ways to work with the Lama
3 model, which is just crazy.
So there's a lot of, a lot of stuff that maybe people haven't really explored, I imagine.
Yeah, it's very cool.
Yeah.
One other thing about this, just while we're on it, is it also comes with a open AI API.
So you could just run it and say, turn on a server API endpoint if I want to talk to it.
Very fun.
But let's talk about some of the things you talked about in your talk.
The AI revolution will not be monopolized.
How open source beats economies of scale, even for LLMs.
I love it.
It's a great title and a great topic.
No, thanks.
No, I'm very, it's something I'm very passionate about.
I was like, I was very, you know, happy to be able to say a lot of these things or to,
you know, also be given a platform.
You and I, we've spoken before about open source and running successful businesses in
the tech space and all sorts of things.
So it's a cool follow on for sure.
Yeah.
I think one of the first parts that you talked about that was really interesting and has nothing
to do specifically with LLMs or AI is just why is open source a good choice and why are
people choosing?
Why is it a good thing to base businesses on and so on?
Yeah.
Also often when I give this as a talk, I've, I ask like for a show of hands, like, Hey,
who, who uses open source software or who works for a company that depends on open source
software?
Who's contributed before?
And usually I, I think most people raise their hand when I ask like who works for a company
that relies on open source software.
So, you know, I often feel like, Hey, I don't even have to like explain like, Hey, it's a
thing.
It's more about like, you know, collecting these reasons.
And I do think a lot of it is around like, you know, the transparency, the extensibility,
it's all kind of connected.
Like you're not locked in, you can run it in house, you can fork it, you can, you know,
program with it.
Like those are all important things for companies when they adopt software.
And you also often, you have these small teams running the project that can accept PRs that
can move fast.
There's a community around it that can basically give you a sense for, Hey, is this a thing?
Should I adopt it?
And all of this I think is important.
And, you know, I also often make a point to like, yes, I've always mentioned, Hey, it's
also free, which is what people usually associate with open source software.
And it's kind of the first thing that comes to mind, but I actually don't think this is
for companies, the main motivation why they use open source software.
I absolutely agree.
I mean, even though we have FOSS, free and open source software, this is not really why
companies care about it, right?
I'm sure.
Certainly some people do, some people don't, but companies, they often see that as a negative,
I think almost like, well, who do we sue if this goes wrong?
Where's our, our service level agreement?
Who's going to help us?
Who's legally obligated to help us?
We've definitely also seen that.
Or like we have, you know, companies who are like, well, who can we pay?
Or can we pay to like, I don't know, get, you know, some guarantee or like some support
or, or, you know, can you like confirm to us that, Hey, if there is a critical vulnerability,
that's like really directly affecting our software, which, you know, has never happened, but are
you going to fix it?
We're like, yes, we can say that.
That's what we've been doing.
But if you want that guarantee, we can give that to you for money.
Sure.
But like, you can pay us, we'll, we'll promise to do what we already promised to do, but
we'll really double, double promise to do it.
Right.
That's definitely a thing.
And also it's kind of to, you know, to go back up to the business model thing, it's what
we've seen with Prodigy, which, you know, we offer kind of, it's, it really as a tool,
it follows the open source spirit.
Like you don't, you pip install it.
It's a Python library, you work with it, but we decided to kind of use that as a stepping
stone between our free open source offering and like the SaaS product that we're about
to launch soon, hopefully.
And it's kind of in the middle and it's paid.
And we've definitely, you know, not found that this is like a huge disadvantage for companies.
Like, yes, sure.
You always have companies with like no budget, but those are also usually not the teams that
are really doing, you know, a lot of the high value work because, you know, it is quite
normal to have a budget or like software tools.
Companies pay a lot for this.
Like, you know, if you, if you want to buy Prodigy, like that, that costs less than,
I don't know, getting a decent office chair.
Like, you know, in a, in a commercial context, these, these scales are all a bit different.
So yeah, I do think companies are happy to pay for something that they need and that's
good.
Yeah.
And the ones who wouldn't have paid, there's a group who said, well, maybe I'll use the
free one, but they're not serious enough about it to, to actually pay for it or actually
make use of it.
You know, I think of sort of analogies of piracy, right?
Like though they stole our app or they stole our music, like, well, because they, it was
a link, they clicked it, but they, they wouldn't have bought it or used it at all.
It's not like you lost a customer because they were not going to be customers.
They just have.
Yeah, exactly.
I mean, it's like, I always tell the story of like, when I was, you know, a teenager, I
did download a crack version of Adobe Photoshop.
And because I was a teenager, I would have never been able to like back then they had,
they didn't have a SaaS model.
Like, I don't know what Photoshop costs, but like, it's definitely not something I would
have been able to afford as a 13, 14 year old.
So I did find that online.
I downloaded it.
I'm pretty sure if Adobe had wanted, they could have come after me for that.
And I do think like, I don't know, maybe I'm giving them too much credit, but I do think
they might've not done that because they're like, well, what it's not like we lost a customer
here.
And now I'm an adult and I'm, I'm proficient at Photoshop and now I'm paying for it.
Yeah, exactly.
And I think there was this whole generation of teenagers who then maybe went into creative
jobs and came in with Photoshop skills.
Like I wasn't even like, compared to all these other teenagers I was hanging out with on the
internet, like all these, like mostly, mostly girls, I wasn't even that talented at Photoshop
specifically.
So maybe, maybe there was someone smart who thought about this as like a business strategy
that these teenagers have our professional tools.
Exactly.
It's, it's almost marketing.
Another aspect here that I think is really relevant to LLMs is runs in house, AKA, we're
not sending our private data, private source code, API keys, et cetera, to other companies
that may even use that to train their models, which then regurgitate that back to other people
who are trying to solve the same problems.
Right.
That's also, we're definitely seeing that companies are becoming more and more aware of this, which
is good.
Like in a lot of industries, like I wouldn't want, I don't know, my healthcare provider
to just upload all of my data to like whichever SaaS tool they decide to use at the moment.
Like, you know, of course not.
So I think it's, you know, it's, it's good.
And then also with, you know, more data privacy regulations, that's all that's really on people's
minds.
And people don't want it's like often we have, we have companies or users who actually
have to run a lot of their AI stuff on completely air gap machines.
So they can't even have internet access or it's about, you know, financial stuff.
We're actually working on a case study that we're hoping to publish soon where even the
financial information can move markets.
It's even segregated in the office.
So it needs to be 100% in-house.
Yeah.
That makes sense.
And I think open source software, it's great because you can do that and you can build your
own things with it and really decide how you want to host it, how it fits into your existing
stack.
That's another big thing.
People will already use some tools and, you know, you don't want to change your entire workflow
for every different tool or platform you use.
And I think especially people have been burned by that so many times by now, and there's
so many like, you know, unreliable startups things you have.
There's a company that really tries to convince you to build on their product.
And then two months later, they close everything down or, you know, it doesn't even have to
be startup, you know, Google.
I'm still mad at Google for shutting down Google reader.
And I don't know, it's been over 10 years, I'm sure.
And I'm still angry about that.
I actually had a, had this, we did it.
We were invited to give a talk at Google and I needed a text example to visualize, you
know, something grammatical.
And that text I made, Google shut down Google reader.
That's a quiet protest.
Oh, that's amazing.
Yeah.
We're going to run sentiment analysis on this article here.
Sure, open source projects can become unmaintained and that sucks, but like, you know, you can fork
it.
It's, it's there and you can, you can have it.
So there is this, this is motivating.
And I think we've always called it like, you can reinvent the wheel, but don't reinvent
the road, which is basically, you can, you can build something, reinventing the wheel.
I don't think it's bad, but like, you don't want to make people follow like, you know, your
way of doing everything.
And yeah, that's interesting.
Yeah.
Like we have electric cars now.
All right.
So give us a sense of some of the open source models in this AI space here.
I've kind of divided it into sort of three categories.
So one of them is what I've called task specific models.
So that's really models that we're trying to do one specific or some specific things.
It's kind of what we distribute for spacey.
There's also a lot of really cool community projects like size spacey for scientific biomedical
techs.
Stanford also publishes their stanza models.
And yeah, if you've been on the hugging face hub, there's like tons of these models that
were really fine tuned to predict like a particular type of categories, stuff like that.
And so that's been around for quite a while, quite established.
A lot of people use these in production.
And it was so quite, especially nowadays, but today's standards, they quite small, cheap,
but of course they do one particular thing.
So they don't generalize very well.
So that's kind of the one category.
You probably used to think of them as large and now you see how giant, how many gigabytes those
models are, you know?
Yeah.
When deep learning first kind of came about and people were sort of migrating from
linear models and stuff.
Like I've met people complaining that the models were too, were so big and slow.
And that was before we even, you know, used much transfer learning and transformer models
and BERT and stuff.
And even when that came about, it was also first a challenge like, Hey, these are significantly
bigger.
We do have to change a lot around it or even, you know, Google who published BERT, they had
to do a lot of work around it to make it work into their workflows and ship them into production
and optimize them because they were quite different from what was there before.
This portion of Talk Python To Me is sponsored by porkbun.com.
Launching a successful project involves many decisions, not the least of which is choosing
a domain name.
And as your project grows, ownership and control of that domain is critical.
You want a domain registrar that you can trust.
I recently moved a bunch of my domains to a new provider and asked the community who they
recommended I choose.
Porkbun was highly recommended.
Porkbun specializes in domains that developers need like .app, .dev, and .foo domains.
If you're launching that next breakthrough developer tool or finally creating a dedicated website
for your open source project, how about a .dev domain?
Or just show off your kung.foo programming powers with a domain there.
These domains are designed to be secure by default.
All .app and .dev domains are HSTS preloaded, which means that all .app and .dev websites will
only load over an encrypted SSL connection.
This is the gold standard of website security.
If you're paying for whois privacy, SSL certificates, and more, you should definitely check out Porkbun.
These features are always free with every domain.
So get started with your next project today.
Lock down your .app, .dev, or .food domain at Porkbun for only $1 for the first year.
That's right, just $1.
Visit talkpython.fm/porkbun.
That's talkpython.fm/porkbun.
The link is in your podcast player's show notes.
Thank you to Porkbun for supporting the show.
Another one in this category of task-specific models is SciSpacee, which is kind of cool.
What's SciSpacee?
Yeah, so SciSpacee, that's for scientific biomedical text.
That was published by Allen AI researchers.
And yeah, it's really, it has like components specific for working with that sort of data.
And it's actually, it's definitely, if that's kind of the domain, yeah, any listeners are working
with, definitely check it out.
They've also done some pretty smart work around like, A, training components, but also
implementing like hybrid rule-based things for, say, acronym expansion.
Right.
They're like cool algorithms that you can implement that don't necessarily need much machine learning,
but that work really well.
And so it's basically the suite of components and also models that are more tuned for that
domain.
You mentioned some, but also encoder models.
What's the difference between the task-specific ones and the encoder ones?
That's kind of also what we were talking about earlier, actually, with the transfer learning,
foundation models.
These are models trained with a language modeling objective, for example, like Google Spurt.
And, you know, that can also be the foundation for task-specific models.
That's kind of what we're often doing nowadays.
Like you start out with some of these pre-trained weights, and then you train like this task-specific
network on top of it that uses everything that is in these weights about the language and the
world.
And yeah, actually by today's standards, these are still relatively small and relatively fast.
And they generalize better because, you know, they're trained on a lot of raw text that has
like a lot of, yeah, a lot of that intrinsic meta knowledge about the language and the world
that we need to solve a lot of other tasks.
Absolutely.
And then you've used the word, the term large generative models for things like LAMA and
Mestral and so on.
One thing that's very unfortunate when, you know, talking about these models is that like
everything we've talked about here has at some point been called an LLM by someone.
And that makes it like really hard to talk about it.
And, you know, so like, you can argue that like, well, all of them are kind of large language
models, right?
And then there's also, you know, the marketing confusion.
Like, you know, when LLMs were hot, everyone wants to, you know, have LLMs.
And so by some definition of LLMs, we've all been running LLMs in production for years.
But basically, yeah, I've kind of decided, okay, I want to try and avoid that phrase as
much as possible because it really doesn't help.
And so large generative models kind of captures that same idea, but it makes it clear, okay,
these generate text, text goes in, text comes out, and they're large, and they're different
from the other types of models, basically.
Question on the audience is, Mr. Magnetics, I'd love to learn how to develop AI.
So maybe let me rephrase that just a little bit and see what your thoughts are.
Like, if people want to get more foundational, this kind of stuff, like, what areas should
they maybe focus in to learn?
What are your thoughts there?
It depends on really, you know, what it means.
Like, if you really, you know, there is a whole path to, okay, you really want to learn more
about the models, how they work, you know, the research that goes into it.
I think there's a lot of actually also academic resources and courses that you can take that
are similar to, you know, what you would learn in university if you started...
ML course.
Yeah.
Like, ML.
And also, I think some universities have made some of their, like, beginner's courses public.
I think Stanford has.
Yeah.
Right.
I thought Stanford, I think there's someone else, but like, there's definitely also a lot
of stuff coming out.
So you can kind of, you know, go in that direction, really learn, okay, how, what goes into this?
What's the theory behind this?
And there are some people who really like that approach.
And then there's a whole more practical side.
Okay.
I want to build an application that uses the technology and it solves the problem.
And often it helps to have like an idea of what you want to, what you want to do.
Like, if you don't want to develop AI for the sake of it, then it often helps.
Like, hey, you have, even if it's just your hobby, like you're into football and you,
you come up with like some fun, fun problem.
Like you want to analyze football news, for example, and analyze it for something you care
about.
Like, I don't know, like often, often really helps to have this hobby angle or something
you're interested in.
Yeah, it does.
Yeah.
And then you can start looking at tools that go in that direction.
Like start with some of these open source models, even, you know, try out some of these
generative models, see how you go.
Try out, if you want to do information extraction, try out maybe something like Spacey.
There's like really a lot there.
And it's definitely become a lot easier to get started and build something these days.
Another thing you talked about was economies of scale.
And this one's really interesting.
So basically we've got Gemini and OpenAI, where they've just got so much traffic.
And kind of a little bit back to the question, actually, is if you want to do this kind of
stuff, you want to run your own service doing it, you know, even if you had the equivalent
stuff.
It's tricky because even just the way you batch compute, you maybe want to talk about
that a bit?
The idea of economies of scale is basically, well, as the companies produce more output,
the cost per unit decreases.
And yeah, there's like all kinds of, you know, basically it gets cheaper to do more stuff.
And, you know, there are like a lot of more boring, like business-y reasons why it's like
that.
But I think for machine learning specifically, the fact that GPUs are so parallel really makes
a difference here.
And because, you know, you get the user text in, you can't just arbitrarily chop up that
text because the context matters.
You need to process that.
So in order to make the most use of the compute, you basically need to batch it up.
So either, you know, kind of need to wait until there's enough to batch up.
And that means that, yes, that favors a lot of those providers that have a lot of traffic
or, you know, you introduce latency.
So that's definitely something that at least looks like a problem or, you know, something
that can be discouraging because it feels like, hey, if you, you know, if supposedly the only
way you can kind of participate is by running these models and either you have to run them
yourself or go via an API, like then you're kind of doomed.
And does that mean that, okay, only some large companies can, you know, provide AI for us?
So that's kind of also the, you know, the point and, you know, the very legit, like worry
that some people have, like, does that lead to like monopolizing AI basically?
It's a very valid concern because even if you say, okay, look, here's the deal.
Open AI gets to run on Azure.
I can go get a machine with a GPU stuck to it and run that on Azure.
Well, guess what?
They get one of those huge ARM chips that's like the size of a plate and they get the special
machines and they also get either wholesale compute costs or they get just, we'll give
you a bunch of compute for some ownership of your company, kind of like Microsoft and open
AI.
Yeah.
That's a very difficult thing to compete with on one hand, right?
Yes.
If you want to, you know, run your own, like, you know, LLM or generative model API services,
that's definitely, you know, a disadvantage you're going to have.
But on the other hand, I think one thing that leads to this perception that I think is not
necessarily true is the fact that you want to do anything you need, basically larger and
larger models that, you know, if you want to do something specific, the only way to get
there is to turn that request into arbitrary language and then use the largest model that
can handle arbitrary language and go from there.
Like if you, and I know this is like something that, you know, maybe a lot of LLM companies
want to tell you, but that's not necessarily true.
And you don't, yeah, for a lot of things you're doing, you don't even need to depend on a large
model at runtime.
You can distill it and you can use it at development time and then build something that you can run
in-house.
And these calculations also look, look very, very different if you're using something at
development time versus in production at runtime, and then it can actually be totally fine to just
run something in-house.
And the other point here is actually some, you know, if we're having a situation where, Hey,
you're paying a large company to provide some service for you, provide a model for you by an API.
And there are lots of companies and kind of the main differentiator is who can offer it for
cheaper. That's sort of the opposite of a monopoly at least, right? That's like competition.
So this actually, I feel like economies of scale, this, this idea does not prove that, Hey, we're
heading into, we're heading into a monopoly. And it's also not true because it's not, if you realize
that, Hey, it's not, you know, you don't need the biggest, most arbitrary models for everything
you're doing, then the calculation looks very, very different.
Yeah, I agree. I think there's a couple of thoughts.
I also have here is one, this LM studio I was talking about, I've been running the Llama 3,
7 billion parameter model locally instead of using chat these days. And it's been, I would say,
just as good. And it's, it runs about the same speed on my Mac mini as a typical request does over
there. I mean, can't handle as many, but it's just me. It's my computer, right? I'm fine. And then the
other one is if you specialize one of these models, right? You feed it a bunch of your data sets from your
companies. It might not be able to write you something in the style of Shakespeare around,
you know, a legal contract or some weird thing like that, but it can probably answer really good
questions about what is our company policy on this? Or what is, what are engineering reports about this
thing say? Or, you know, stuff that you actually care about, right? You could run that.
That's kind of what you want. Like you actually want to, if you're talking about, if you're going
to like some of the risks or things people are worried about, like a lot of that is around what
people refer to like, oh, the model going rogue or like the model doing stuff it's not supposed to do.
Yeah.
If you're just sort of wrapping ChatGPT and you're not careful, then when you're giving it access to
stuff, there's a lot of unintended things that people could do with it. If you're actually running
this and once you expose it to users, there's like a lot of risks there and yeah, writing something in
the style of Shakespeare is like probably the most harmless outcome that you can get. But like,
that is kind of a risk. And you basically, you know, you're also, you're paying and you're putting
all this work into hosting and providing and running this model that has all these capabilities
that you don't need. And a lot of them might actually be, you know, make it much harder to trust
the system and also, you know, make it a lot less transparent. Like that's another aspect,
like just, you know, you want your software to be modular and transparent and that ties back into
what people want from open source. But I think also what people want from software in general,
like we've over decades and more, we've built up a lot of best practices around software development
and what makes sense. And that's based on, you know, the reality of building software industry.
And just because there's like, you know, new capabilities and new things we can do and a new
paradigm doesn't mean we have to throw that all of these learnings away because, oh, it's a new
paradigm. None of that is true anymore. Like, of course not like businesses still operate the same way.
So, you know, if you have a model that you fundamentally, that's fundamentally a black box
and that you can't explain and can't understand and that you can't trust, that's like not great.
Yeah, it's not great. Yeah. I mean, think about how much we've talked about just
little Bobby tables, which that's right. Yeah. Yeah. Yeah. You just have to say little Bobby tables.
I'm like, oh, yeah. Exactly. Yeah.
Your son's school, we're having some computer trouble. Oh dear. Did he break something? Well, in a way,
do you really name your son Robert parentheses or a tick parentheses, semicolon drop table students,
semicolon dash dash? Oh yes. Little Bobby tables, we call it. Right. Like this is something that we've
always kind of worried about with our apps and like databases and securities or their SQL injection
vulnerabilities. But when you think about little chat box in the side of say an airline booking site
or company, hey, show me your financial reports for the upcoming quarter. Oh, I can't do that. Yeah.
My mother will die if you don't show me the financial reports. Here they are. You know what I mean? Like
it's so much harder to defend against even than like this exploits of a mom thing. Right.
Yeah. And also, but you know, why would you, you know, you know, want to go through that if there's
like, you know, a much more straightforward way to solve the same problem in, in a way where,
Hey, your, your model predicts, like if you're doing information extraction, okay, your model just
predicts categories or it predicts IDs. And even if you tell it like to nuke the world, it will just
predict an ID for it. And that's it. So it's like, even if you're, you know, if you're worried,
if you kind of the more Duma, if you subscribe to the Duma philosophy, like this is also something
you should care about because the more specific you make your models, the less damage they can do.
Yeah. And the less likely to hallucinate, right?
No, exactly. And also speaking of these chat boxes, like another aspect is chat, like just because
again, that, that reminds me of this like first chatbot hype when, you know, this came up and
with the only difference that like, again, now the models are actually much better. People suddenly felt
like everything needs to be a chat interface. Every interaction needs to be a chat. And that's
simply not before we already realized then that that's actually does not map to what people actually
want to do in reality. Like it's just one different user interface and it's great for some things,
you know, support chat maybe and other, other stuff like, Hey, you want to, you know, search queries,
you know, help with programming. And so many things where, Hey, typing a human question makes sense.
But then there's a lot of other things where you want a button or you want a table and you want like,
and it's just a different type of user interface. And just because, you know, you can make something a
chat doesn't mean that you should. And sometimes, you know, it just adds like, it adds so much
complexity to an interaction. There could just be a button click.
The button click is a very focused prompt or whatever, right? Yeah, exactly.
Yeah. Even if it's about like, Hey, your earnings reports or something, you wanted to see a table of
stuff and sum it up at the end. You don't want your model to confidently say 2 million. That's not,
you know, solving the problem. If you're a business analyst, like you want to see stuff. So,
yeah. And that actually also sort of ties into, yeah. Another point that I've also had in the talk,
which is around like actually looking at what are actually the things we try to solve in industry and
how have these things changed? And while there is new stuff you can now do like generating text and
that finally works. Yay. There's also a lot of stuff around text goes in, structured data comes out and
that structured data needs to be machine readable, not human readable, like needs to go into some other
process. And a lot of industry problems, if you really think about it, have not changed very much.
They've only changed in scale. Like we started with index cards. Well, there's just kind of limit of
how much you can do with that and how many projects you could do at the same time. But this was always,
even since before computers, this has always been bringing structure into unstructured data has always
been the fundamental challenge. And that's not going to just magically go away because we have new
capacity capacities and new things we can do.
Let's talk about some of the workflows here. So you have an example where, you know, you take a large
model and do some prompting and this sort of iterative model assisted data annotation. Like what's that look like?
You start out with this model, maybe, you know, one of these models that you can run locally, an API
during development time, and you prompt it to produce some structured output, for example, or some answer.
You know, we also have like, for example, you can use something like Spacey LLM that lets you, you know,
plug in any model in the same way you would otherwise, you know, train a model yourself.
And then you look at the results, you can actually get a good feel for how is your model even doing.
And you can also, before you really get into distilling a model, you can create some data to evaluate it.
Because I think that's something people are often forgetting because it's kind of not, it's not,
maybe not the funnest part, but it's really, you know, it's like writing tests.
It's like writing tests can be frustrating. I remember when I kind of started out, like,
tests are frustrating because they actually kind of, they turn up all of these edge cases and mistakes
that you kind of want to forget about.
Right. Oh, I forgot to test for this. Whoops.
Yeah. Yeah. And then like, oh, if you start writing tests and you suddenly see all the stuff
that goes wrong and then you have to fix it and it's like, it's annoying. So you better just
not have tests. I can see that. But like evaluation is kind of like that. And it's ultimately a lot of
these problems, you, you have to know what you want and here's the input, here's the expected output.
You kind of have to have to define that. And that's not something any AI can help you with because,
you know, you are trying to teach the machine. You're teaching the AI.
You want to, yeah, you want to build something that does what you want. So you kind of need examples
where you know the answer. And then you can also evaluate like, hey, how does this model do out of the box
for like some easy tasks? Like, hey, you might find something like GPT-4 can give you 75% accuracy
out of the box without, without any work. So that's, that's kind of good or even higher.
Sometimes it's like, if it's a bit harder, you'll see, oh, okay, you went like 20% accuracy,
which is kind of, which is pretty bad. And the bar is very low, but that's kind of the ballpark that
you're also looking to beat. And then you can look at examples that are predicted by the model. All you
have to do is look at them. Yes. Correct. If not, you make a small correction and then you go through
that and you do basically do that until you've beat the baseline.
The transfer learning aspect, right? Yeah. And then you use transfer learning in order,
you know, to give the model like the solid foundation of knowledge about the language and
the world. And you can end up with a model that's much smaller than what you started with. And you
have a model that's really has a task network that's only trained to do one specific thing.
Which brings us from going from prototype to production, where you can sort of try some of
these things out, but then maybe not run a giant model, but something smaller, right?
Yeah. Yeah. And you can take all these aspects basically that you're interested in,
in the larger model and train components that do exactly that. And another thing that's also
good or helpful here is to have kind of a good path from prototype to production. I think that's also
where a lot of, yeah, machine learning projects in general often fail because it's all, you know,
you have this nice prototype and it all looks promising and you've hacked something together in your
Jupyter notebook and that's all looking nice. You maybe have like a nice streamlit demo and you can
show that, but then you're like, okay, can we ship that? And then if your workflow that leads to the
prototype is completely different from the workflow that leads to production, you might find that out
exactly at that phase. And that's kind of where projects go to die. And that's sad. And yeah, so that's,
that's actually something we've been thinking about a lot. And also what we've kind of been trying to
achieve with Spacey LLM where you have this LLM component that you plug in and it does exactly the
same as the components would do at runtime. And it really just slots in and then might use GPT-4 behind
the scenes to create the exact same structured object. And then you can swap that out. Or maybe,
you know, you, there are a lot of things you might even want to swap out with rules or no AI at all.
Like, you know, like a ChatGPT is good at recognizing US addresses and it's great to build a prototype,
but instead of asking it to extract US addresses, for example, you can ask it, give me Spacey rules,
match your rules for US addresses. And it can actually do that pretty well. And then you can bootstrap from there.
Oh, nice.
There's a lot of stuff like that that you can do. And there might be cases where you find that,
yeah, you can totally beat any model accuracy and have a much more deterministic approach if you just
write a regex. Like that's still true.
It does still work.
Yeah. It's still something, it's easy to forget because, you know, again, if you look at research
and literature, nobody's talking about that because this is not an interesting research question.
Like nobody cares. You know, you can take any benchmark and say, I can beat ChatGPT accuracy with
two regular expressions. And that's like, that's true. Probably in some cases.
Yeah.
It's like nobody cares. Like that's not, that's not research.
For sure. But you know, what is nice to do is to go to ChatGPT or LM studio or whatever and say,
I need a Python based regular expression to match this text and this text. And I want to capture group for
that. And I don't want to think about it. It's really complicated. Here you go. Oh, perfect.
Now I run the regular expression.
Yeah. That's actually, that's a good use case. I've still been sort of hacking around on like
these, you know, interactive regex editors because I'm, I'm not particularly good at regular expressions.
Neither am I.
Like on the scale, like I can do it, but like, I know people who really, I think my co-founder,
Matt, he, he worked through it. Like he's more the type who really approaches these things very
methodically. And he was like, now he, he wants read this one big book on regular expressions.
And like, he really did it like the hardcore way, but like, that's why he's obviously much better than I am.
I consider regular expressions kind of write only. Like you can write them and make them do stuff,
but then reading them back is tricky.
Yeah.
At least for me. All right, let's wrap this up. So what are the things that you did here at the end
of your presentation, which I want to kind of touch on is you brought back some of the same ideas
that we had for like, what are the values of open source or why open source, but back to
creating these smaller focused models. Talk us through this.
How specific components. Yeah. I mean, if you kind of look at, Hey, what are the, you know,
the advantages of sort of approach that we talked about of distilling things down of creating these
smaller models, a lot of it comes down to it being like it's modular. You, again, you're not locked in
to anything. You own the model. Nobody can take that away from you. It's easier to write tests.
You have the flexibility. You can extend it because, you know, it's cold. You can program
with it because often it very rarely you do machine learning for the sake of machine learning. It's
always like there is some other process. You populate a database, you do some other stuff
with your stack. And so you want to program with it. It needs to be affordable. You want to understand
it. You need to be able to say, why is it doing what it is? Like, what do I do to fix it? It again,
runs in-house it's entirely private. And then, yeah, when I, you know, was kind of thinking
about this, I realized like, oh, actually, you know, it like this really maps exactly
the reasons why that we saw it. We talked about earlier why people choose open source or companies.
And that's obviously not a coincidence. It's because ultimately these are principles that
we have come up with over a long period of time of, yeah, that's good software development.
And ultimately AI is just another type of software development. So, of course, it makes sense that
the same principles make sense and are beneficial. And that, you know, just having a workflow where
everything's a black box and third party, this can work for prototyping, but it's not.
That kind of goes against a lot of the things that we've identified as very useful in applied settings.
Absolutely. All right. So we have to answer the question.
Oh, the...
Will it be monopolized?
And your contention is no, that open source wins even for LLMs. Yeah.
Open source means there's no monopoly to be gained in AI. You know, I've kind of broken it down into
some of these strategies, which, you know, how do you get to a monopoly? And these are like, you know,
this is not just some big stuff. These are things like a lot of companies are actively thinking about.
If you were in a business where, you know, it's winner takes all, like you want to, you know,
get rid of like all of that competition that companies hate, that investors hate. And there are ways to do
that and companies really actively think about this.
Those pesky competitors, let's get rid of them.
There are different ways to do that. Like one is having this compounding advantage.
So that's stuff like network effects, like, you know, if your social network, of course,
that makes a lot of sense. Everyone's on it. If you could kind of have these network effects,
that's good. And economies of scale. But as we've seen, like economies of scale is a pretty lame mode
in that respect. Like that has a lot of, you know, a lot of limitations. It's not even fully true.
It's kind of the opposite of a monopoly in some ways.
Yeah. Especially in software.
Yeah. In software. Exactly. So it's like, I don't think that's, that's not really the way to go.
One example that comes to mind, at least for me, maybe I'm seeing it wrong, but Amazon,
amazon.com. Just, you know, how many companies can have massive warehouse with everything at by every
single person's house?
Yeah. The one platform that everyone goes on. So even if you're a retailer, you kind of, yeah,
they feel the Amazon has kind of forced everyone to either sell on Amazon or go bust because...
Exactly. It's very sad that it's the way it is. Yeah. And then network effects. I'm thinking,
you know, people might say Facebook or something, which is true, but I would say like Slack actually.
Oh, okay.
Or Slack or Discord or, you know, there's a bunch of little chat apps and things, but if you want to
have one and you want to have a little community, you want people to be able to, well, I already
have Slack open. It's just an icon next to it versus install my own app. Make sure you run it.
Be sure to check it. Like people are going to forget to run it and you disappear off the,
off the space, you know?
That will make sense. And I do think, you know, these things don't necessarily happen accidentally.
Like companies think about, okay, how do we, you know, Amazon definitely thought about this.
This didn't just like happen to Amazon. Yes, they were lucky in a lot of ways, but like,
you know, that's, that's a strategy.
Exactly.
Yeah. And then the other thing that's not relevant here is like, you know, another way is controlling
a resource. That's really more, if you're like, you know, if they are physical, if there was like
a physical resource.
I brought the cables. Something like that.
Yeah. I mean, it's, yeah. Or like in Germany, I think for a long time, the telecom, they owned
the wires in the building.
Right. Exactly.
And they still do, I think. So they used to have the monopoly. Now they don't, but they kind of still,
to some extent, they still do because they need to come. If even, no matter who you sign up for,
with, for internet, telecom needs to come and activate it. So if you sign up with telecom,
you usually get service a lot faster.
It's a little better service. Yeah, exactly. Don't wait two weeks. Use us.
That's kind of, that's how it still works, but we don't, we don't really have that here.
And then the other, the next point that's very attractive. The final one is regulation. So that's
kind of like, you have to have a monopoly because the government says so. And that is one where we have
to be careful because if we're not like, if in all of these discussions, we're not making the distinction
between the models and the actual product, you know, very different characteristics and
we now do a very different things. If that gets muddy, which like, you know, a lot of also companies
quite actively do in that discourse, then we might end up in a situation where we sort of accidentally,
or, you know, gift a company or some companies a monopoly via the regulation. Because if you let
them write the regulation, for example, and we're not just regulating products, but lumping that in with
technology itself and open research.
Yeah. It's a part of your talk. I can't remember if it was the person hosting it or you who brought
this up, but an example of that might be all the third-party cookie banners, rather than banning,
just targeted, retargeting and tracking. Like instead of banning through the GDPR, instead of banning
the thing that is the problem, it's like, let's ban the implementation of the problem.
That's a risk or that's like, you know, in hindsight, yes, I think in hindsight, we would all agree that
like, we should have just banned targeted advertising. Instead, what we got is these
cookie pop-ups. That's like really annoying. And that's actually what I feel like is one of the,
as much as I think the EU, you know, I'm not an expert on like AI regulation or the EU AI Act,
but what I'm seeing is at least they did make a distinction between use cases. And it's very much,
there is a focus on here are the products and the things people are doing, how high risk is that,
as opposed to how big is the model and how, you know, what does that, because that doesn't,
doesn't say anything, but that would kind of be a very, very dangerous way to go about it. But the
risk is, of course, if we're rushing regulate, like if we're a rushing regulation, then, you know,
we might actually end up with something that's not quite fit for purpose. Or if we let big tech
companies write the regulation or lobby. Lobby for it to get it. Yeah.
These are some ideas because, you know, if they're doing that, like, I think it's pretty obvious,
they're not just worried about the safety of AI and are like appealing to like Congress or whatever.
Like, I think most people are aware of that, but like, yes, the, I think the intentions are even less
pure than that. And I think that's a big risk.
The regulation is very tricky. It's,
Yeah. And you know, just for the record, I am pro-regulation. I'm very pro-regulation in general,
but I also think you can, if you fuck up regulation, that can also be very damaging,
obviously.
Absolutely. And it can be put in a way so that it makes it hard for competitors to get into
the system.
Yeah.
There's so much paperwork and so much monitoring that you need a team of 10 people just to operate.
Well, if you, a startup, well, you can't do that because,
Hey, Art, we got a thousand people and 10 of them work on this. Like, well.
Even beyond that, like it's, you know, if you think back to all the stuff we talked about,
like they are, this goes against a lot of the best practices of software. This, this goes,
you know, this goes against a lot of what we've identified that actually makes good, secure,
reliable, modular, whatever software, safe software internally. And even doing a lot of the software
development internally, like there are so many benefits of that. And I think, you know, companies,
companies actually working on their own product is good. And if it was suddenly true that like
only certain companies could even provide AI models, I didn't even know what that would mean for open
source or for academic research. Like that would make absolutely no sense. I also don't think that's
like really enforceable, but it would mean that, you know, like this would limit like everyone in
what they could be doing. Like I think, and there's like, you know, there's nothing to do with like,
there's a lot of other things you can do if you, you know, care about AI safety, but that's really
not it. And I also, you know, I just think being aware of that is good. I don't like, I can, you
know, I cannot see an outcome where we really do that. It would, it would really not make sense. I
could not see the reality of this, you know, shaking out, but I think it's still, it's still relevant.
Yeah. I think the open source stuff and some of the smaller models really does
give us a lot of hope. So that's awesome.
I feel, you know, also very positive about this. I've also talked to a lot of developers at conferences
that like, yeah, actually thinking and talking about this gave them some hope, which obviously is,
is nice because I definitely did that some of the vibe I got, like it can be kind of easy to end up a bit
disillusioned by like a lot of the narratives people here. And that, you know, also, even if you're
entering the field, you're like, wait, a lot of this doesn't really make sense. Like, why is it like,
like this? Yeah. It's like, no, it actually, you know, your intuition is right. Like a lot of software,
software engineering best practices, of course, still matter. And, you know, no, they are like,
you know, they are better ways that we're not, you know, we're not just going in that direction.
And I think I definitely believe in that. A lot of the reasons why open source won in a whole bunch
of areas. Yeah. Could be exactly why it wins at LLMs as well, right? Yep. And, you know, again,
it's all based on open research. A lot of stuff is already published and there's no secret source.
The software, you know, software industry does not run on like secrets. All the differentiators are
product stuff. And yes, you know, open AI might monopolize or dominate AI powered chat assistants,
or maybe Google will do like that's, you know, that's a whole race that, you know, if you're not in that
business, you don't have to be a part of, but that does not mean that anyone's going to win at or
monopolize AI. Those are very different things. Absolutely. All right. A good place to leave it
as well. You know, thanks for being here. Yeah. Thanks. That was fun. Yeah. Yeah. People want to
learn more about the stuff that you're doing, maybe check out the video of your talks or whatever. What
do you recommend? Yeah, I think I definitely, I'll definitely give you some links for the show notes
like this. The slides are online, so you can have a look at that. There is at least one recording of the
talk online now from the really cool Python, PyCon Lithuania. It was my first time in Lithuania this
year. Definitely. You know, if you have a chance to visit their conference, it was a lot of fun.
I learned a lot about Lithuania as well. We also on our website, Explosion AI, we publish kind of this
feed of like all kinds of stuff that's happening from maybe some talk or podcast interview, community
stuff. There's still like a lot of super interesting plugins that are developed by people in community
papers that are published. So we really try to give a nice overview of everything that's happening in our
ecosystem. And then of course, you could try out Spacey, Spacey LLM. You know, if you want to try out
some of these generative models and especially for prototyping or production, whatever you want to do
for structured data. If you're any of the conferences and check out the list of events and stuff,
I'm going to do a lot of travel this year. So I would love to catch up with more developers in person
and also learn more about all the places I'm visiting. So that's cool. I've seen the list. It's very,
very comprehensive. So I kind of a neat freak. I like to, I also be very much like to organize things in
that way. So yeah. So there might be something local for people listening now that you're going to be
doing all right. Well, as always, thank you for being on the show. It's great to chat with you.
Yeah. Thanks. Yeah. Thanks.
So next time.
Bye.
This has been another episode of Talk Python to Me. Thank you to our sponsors. Be sure to check
out what they're offering. It really helps support the show. Take some stress out of your life. Get
notified immediately about errors and performance issues in your web or mobile applications with Sentry.
Just visit talkpython.fm/sentry and get started for free. And be sure to use the promo code,
talkpython, all one word. This episode is sponsored by Porkbun. Launching a successful
project involves many decisions, not the least of which is choosing a domain name. Get a .app, .dev,
or .food domain name at Porkbun for just $1 for the first year at talkpython.fm/porkbun.
Want to level up your Python? We have one of the largest catalogs of Python video courses over at Talk Python.
Our content ranges from true beginners to deeply advanced topics like memory and async. And best of all,
there's not a subscription in sight. Check it out for yourself at training.talkpython.fm.
Be sure to subscribe to the show, open your favorite podcast app, and search for Python. We should be right at the top. You can also find the iTunes feed at /itunes, the Google Play feed at /play, and the direct RSS feed at /rss on talkpython.fm.
We're live streaming most of our recordings these days. If you want to be part of the show and have your
comments featured on the air, be sure to subscribe to our YouTube channel at talkpython.fm/youtube.
This is your host, Michael Kennedy. Thanks so much for listening. I really appreciate it. Now get out there and write some Python code.
Thank you.