0:01 open source sketching up proprietary models need something entirely new to skill at first it was throw as much data as we could at the problem that’s our Solution that’s train time comput then chat GPT started to introduce test time computes that it just generate more So-Cal thoughts hopefully that will improve your performance but then deep CK and did the same thing extremely well making it in the top five models sometimes even first we have our hammer and we’re continuously looking for a nail to use it on but it really really doesn’t make sense when you’re using a super expensive piece of product to do something incredibly simple sometimes I want a local model I want a model that’s for my specific use case I want to ask it questions that I don’t want to end up at some server that I have no control
0:52 over control is important the great thing with local models is they are also becoming smaller and smaller which means they’re more and more access ible to your everyday person up to the point where we have models that can run on your cell phone sometimes people think okay but we we want a model that can do everything right small models are good at very specific things small things difficult things they’re easy to train they’re cheaper to train and they will just continue to grow more accurate I will always see open source catching up to these proprietary mods always I don’t think there’s a world where they will never be close today our guest is Martin kendor co-author of Hands-On large language models and an instructor at Deep learning AI through his open- Source contributions and popular AI newsletter Martin helps make large language models
1:43 more accessible and understandable for thousands of people this all in addition to his day job as a data scientist in this episode we dive into how AI models have evolved over the last 30 years when to use open source versus close Source AI models why small language models could be the future of AI and the skills you need to stay ahead in the AI era if you work in AI data science or product or if you’re just fascinated by the future of language models this episode will give you an insiders look at how AI is evolving and where things are headed next if you enjoy this conversation subscribe to data neighbor on your favorite podcasting app and YouTube it’s the best way to stay updated and it helps us keep us bring you great content with that let’s dive into our conversation with
2:32 Martin gors welcome back listeners to another episode of Da neighbors with hi svia and me Sean we have a really exciting guest today someone who has helped make large languin models more understandable and accessible to many people we’re joined by Martin gundor you may recognize him from his fantastic book Hands-On large languin models co-authored with J Alamar as well as his course on on deep learning dayi where he breaks down how Transformers work so Martin’s works all about kind of making AI more approachable whether it’s through his his open source contributions or or visual explanations or teaching really excited to have you here welcome to the show Martin uh thank you for having me it’s amazing to be here welcome Martin we’re so excited to talk to you we’ll get right into it I really like to spend our time get into your background and
3:20 your recent book um we have a lot of questions around open source versus proprietary eye representation models vers generative models pre-training vers first fine tuning um and your thoughts on the future of AI but maybe just to help set the stage a little bit for our listeners I wonder if we might start with a little history lesson AI progressed really rapidly and I don’t know for many consumers like definitely for me a few years ago when chat GPT came out it kind of seemed like it came out of nowhere but in your book you provide like this really clear timeline of how kind of language models evolved from so like even like bag of words to where we are today so I wonder if you might walk our listeners through kind of that timeline and any key breakthroughs you think that are really important yeah
4:08 of course so for quite a while the bag of words type of models those were really popular right and they treat it as the name implies literally a bag of words just counting how many times a certain word appears inside of a document and that’s basically it and the funny thing is that actually works really really well we’re still very focused on embedding techniques large language models and all that kind of stuff but even in my day-to-day job I’m still using bag of words quite frequently because it’s small and it’s fast and it’s still quite accurate so it’s not that we’ve been stuck with bag of words for a while but it just works well on doing something a little bit more complex that’s where we need more compute more data becomes a little bit more difficult to me one of the the more
4:53 interesting things that started to to come out were you know obviously the attention mechanism that we have with Transformers that change the industry and that’s all nice and interesting but for me it was actually word Tove which attempted to you know convert these words that we have into Vector representations you know instead of just one value how many times a word appears it now has some sort of contextual information or meaning to that specific entity and when you have that when you have a multi-dimensional perspective of a word to me that’s where things started really rolling and we started to understand okay we have to look at language a little bit differently from you know just a bag of words because it’s way more than that there are many techniques that we find now that’s where we can still say that language sometimes
5:48 still is a bag of words depending on the specific use cases but what we saw is that you know this this semantic meaning this context that was missing from a account based perspective really gives you a a whole new field to discover and that’s what I think really started to change the field and that’s was was from a representational perspective right not necessarily the generative part because what we first had to do was find and and create models and architectures that could represent you know all of these large textual data those large Cory really well I think that’s why there first was a really large focus on these so-called representation models models that Focus purely on representing the text and whether that’s bag of words or a vector embedding doesn’t really matter but the moment you start doing that and
6:43 you start reaching certain ceilings of performance that’s when you start thinking okay what if we now take those models and we start generating new text on top of that and I think that’s where we first saw some results but you know they weren’t really usable yet especially with gd3 it was cool and interesting to create poems but that’s about it and obviously open AI just threw a huge amount of data and money at the problem uh and made sure it got to that next stage but that was so costly and so difficult to achieve that’s not something the open source Community I think could have done yeah absolutely and when you talk about kind of like the I think the vector Iz ation contextual embeddings is that what you mentioned in your book when you say like bag of words like for the word I
7:35 think you give the example like the word Bank like you can’t tell if it’s referring to like a bank where your money is kept or like the bank of a a river but once you have these contextual embeddings you can start to basically figure that out based on what else is around that is that kind of where that that took it that’s exactly the change right because with a bag of words model the word bank is just counted and the context isn’t really taken into account a little bit maybe but with how many times all the words appears in the same sentence but the so-called embedding for the word bank is just account value where those contextualized embeddings they really take into account you know the other words that appear inside a given sentence or document or paraphrase and that is truly interesting
8:24 because you know even if you still refer to a financial bank the way you refer to a financial bank again can still differ depending on the context of a sentence and that that’s what makes language so interesting but also so incredibly difficult because there’s a lot of subjectivity inside any given sentence because quite frankly it’s what we do right I speak sentences I communicate with you and I try to do that with a bunch of words but you don’t necessarily know the meaning behind what what I try right to say so language is inherently really difficult to capture uh and the only way to do that and with those contextualized perspectives I think is throwing a lot of high quality data at the problem where you know that the intention is properly communicated in a sentence or paragraph or what have you
9:20 before giving it to the model you know even with with a podcast like this right you ask me question but I might misinterpret it because I don’t necessarily understand your intention or your perspective or your view and that’s so incredibly difficult and the only way I think to to circumvent something like this from a language modeling perspective is high quality data and that’s again what when open AI started with uh with gypt 3.5 is what they were really good at yeah it it makes me think too like I uh I lived in Indonesia for a couple years and I took I took a few months of bahas Indonesia when I when I got there but even a year and I’d be living with my host family and I’d kind of like direct translate what am I trying to say in English I’ll
10:05 directly translate it and my host he spoke some English and he like dude I know what you’re trying to say right now but you say it so weird what you’re saying does not actually like he only knew because he was like translating it back to English and then my host parents were just like dude you suck at this but obviously human to machine that’s a totally different thing it just happens everywhere in terms of timeline can you give us kind of like a rough sketch of the what we’re talking about is this like 30 years ago is this like very recent what’s what’s the development like for our audience so and that’s that’s interesting because something like back of words I don’t think we exactly know when it was first used there are some mentions here and there but indeed we’re
10:49 talking about at least 30 years ago because this is so simple right counting the number of words in a sentence it’s it’s a very elegant and cool method to use and there there of course there are some developments as time goes by like tfidf where you you know weigh the importance of words instead of words like the anend and I which appear in every sentence it’s sometimes meaningless so small changes small things that that that we see growing but then when word to V came out and we were looking into these sometimes encoder like models we started to to really understand the power of of this technology and that was like 10 years ago or so and even that took a little bit of time to be usable by a lot of people grow in the quality of the data
11:37 and what we could do with it so there was also from the community I think a huge learning curve to understand okay we now use word to V or glove or fastex the kinds of models that can you know embed these specific words and create a little bit more meaning from it but that still took five six seven years before then Transformers became more and more a thing we focused on birdlike models on encoder models those the really focus on representation of text and the interesting thing is that’s still relatively slow compared you know the moment that open AI released GPD 3.5 that’s when everything went crazy it was essentially an exponential type of growth it felt like and that was the moment where it was like we go with everything we’ve done in the past 10 years is now done in a couple of months
12:32 which is a horrible experience by the way to keep up with but uh yeah that’s what happens everybody’s everybody’s a AI Enthusiast overnight yeah exactly that’s all that’s also what makes this field incredibly difficult because it’s uh it’s so easy for people to get into this field which is a good thing definitely as more and more people easily get can get into this field the competition increases significantly and I’ve seen that with a lot of new students that are trying to find work whilst there are a lot of people that just you know they Google some stuff they asked it uh they ask chpt or clot or deep seek and they learn a little bit and they can now call themselves AI experts information is so close by uh these days it’s so easy to get entire industry changes seemingly
13:25 overnight it’s a little bit longer than that of course but it feels like that did feel like overnight actually hey Martin what got you into L’s then yourself I’m actually a psychologist so I have Master degrees in uh industrial psychology so that’s more on the work floor and one in Clinical Psychology so that’s really focused on helping people with anxiety or depression or BTSD those kind of disorders which are very interesting Fields by themselves but I was missing something technical I I I still consider myself a little bit of a nerd and I like statistics so I I then transitioned into data science and did a degree there but the funny thing is is when you transition from a very let’s called the soft field into a very technical field is at least in my experience I had to convince a lot of
14:13 people that I could actually do the technical thing right because a stereotype of a psychologist is that that we can’t be that technical right we’re good at this we’re good at talking and understanding people but when there’s an equation it’s like an an equation and it’s scary and I understand what people are coming from but that that makes it difficult for me to then say okay but I’m good at what I’m doing and so I started writing and creating a lot of articles on explaining how certain types of AI work and it could be you know simple things like cross validation or nessi cross validation to you know now at this uh time in my life at this point in my life large language models mixure of experts quantization or U uh more of these so-called Advanced Techniques but what I found out is that I really
15:01 like explaining all of these things to Showcase no this is how it works and how you can use it it’s it’s where my background as psychologist really helped to to understand how to communicate communicate these things because the stereotype in a way still is true because when I started with data science and whenever I did see a very complex mathematical formula I was like I don’t understand and this is difficult and I don’t feel well looking at this and truly a lot of people have that yeah and it makes sense in a way it’s scary right what’s happening there and super complex and you you will never be able to understand what’s happening even the Bas most basical formulas but that’s because it’s a language you don’t know so let’s focus on the languages we do know which is just you know writing stuff down
15:49 visual representations those kind of things and you can do that well in the in the field of large language models so I really focused a lot in the last couple of years on doing this educational stuff on large language models on AI I might want to do also image stuff at some point but you know time is limited yeah I was going to ask you where do you get all the time but I don’t know it’s uh and you do work at you do work a full-time job as well on the side yeah almost yeah almost full-time so wow yeah that’s kind of that’s difficult so I’ve I work 32 hours on a day-to-day job which is very cool because we’re doing Federated machine learning okay which is again kind of different but very cool technical Challenge and then I have my
16:35 open source on the side so bird topic and keyboard those kind of packages that I maintain the book then which even after you done writing still takes some work here and there or additional courses or blogs that you write and of course the blogs newsletter that I create that’s fun to do so so also that one and then miscellaneous stuff in between so just no sleep I mean that’s the answer I guess and hopping on to random podcast to talk about it all too that’s relax a little bit talk with nice people yeah exactly yeah that’s awesome where we your break I guess in between definitely oh no this is hey Martin that’s so cool this just came up uh if you were to given how much you’ve taught people especially like making things simple is like the hardest thing
17:22 in the world right like it’s never easy to make stuff that everybody understands it’s very to make something super hard for people to understand because inherently most things are not that easy of all your teaching that you’ve done is um uh what is your mission for getting people to you know like why should people care about L’s from your perspectives and I’ll tell you a little bit about maybe in a followup why this question even came about why llms I don’t think that the llms will be there’s a hype surrounding llms and to a certain extent rightfully so because there is a large impact I just think it’s a cool piece of technology to use it’s as simple as that if we look at for the coders that use GI up co-pilot I’m more of an architect of the code that
18:11 I’m creating than that I’m actually creating the code myself whenever you have a question about certain topics and large language modes aren’t perfect but I can ask it and I can discuss it and feels like I have my own personal teacher at times to help me understand certain concept and you know the the principle of having an a very smart rubber duck on your desk that tells you no that doesn’t work or it does work or just nudges you towards certain directions is a very interesting and and cool experience because it helps you understand everything so much faster so much better as long as you understand how to use it that’s still the difficult part with you know forgetful Behavior hallucination that kind kind of stuff there’s still risks and there’s still things that we have to be careful for but if you know
19:04 how to use it and if you are critical of what’s being said large language models are a truly amazing piece of technology that will enhance lives but maybe not to the extent where you know hundreds of millions of people are losing their jobs yeah yeah no that’s that’s that’s cool that’s that’s awesome to get that perspective because where I’m coming from especially you know like we hosted this podcast for a few episodes with many different AI experts in their field in their own rights is we’ve seen people are kind of in two camps one is like you know hey I’m a you know like this is just another piece of software so I’m skeptical of it the other one is like hey this is going to change the world you got to get on board but it almost feels like there’s nothing in between
19:47 you know like but then we’re like you know hey it’s uh uh it’s it’s number one it’s real number two it’s actually really good to supercharge you in terms of being like a very productive um uh you know like just getting you an advantage especially in the next probably you know a year a year and a half if you’re really good at this you’re going to be really good at whatever else you’re doing whether it’s in your job where you’re trying to get a job or you know just in general building anything and so you know like uh you don’t need to be in one camp or the other but if you’re good at using it just use it use it a ton then you’re probably in good shape yeah exactly and I think that’s very similar to my perspective where it’s maybe just an
20:31 efficiency tool right it helps you it’s an it’s an assistant helping you out with a lot of small menial tasks that otherwise would be very boring and wouldn’t help you do the things that are really productive or really helpful and just makes your work way more focused on the difficult stuff the things that relate to your domain experience your domain knowledge or your long-term experience of a specific company or the interactions that you have with stakeholders or managers or colleagues or what have you and I feel like you don’t have to be in one of the two camps I fully agree to me I’m I’m more somewhere in the middle I understand the technology and I see that it’s something very cool I wouldn’t say okay everybody’s going to be out of the job in x amount of years or AGI is on the on
21:21 our doorstep I’m not so sure about that but the impact is huge I do think it’s very difficult to get around something like that but the interes in part is is even though that we expected to to do a lot of stuff and to to have a major impact on our lives it’s still difficult to get there because so for last couple of years the field has moved incredibly fast but in a way it’s also been very very slow because all of this technology we expected to be integrated into every piece of Our Lives by now right because everybody’s saying it will change the world and we would do everything uh and I think was a couple of days ago that you know was struggling with getting AI uh uh properly integrated on on their new iPhones it’s the same principle of
22:06 but then you actually need to embed all of this into your software and that’s where it all becomes difficult it’s not a magical tool Things become magical the moment you integrate it well into software and that’s why something like cursor the the vs code alternative yeah is just an amazing piece of technology because they implemented this piece this tool incredibly well and I think that’s where the most of the benefit will lie in properly implementing all of this and if you can do that well then you have to killer product but it takes a bit of effort to get there yeah we had a guest in this show who actually who does a curse a course on cursor when when I started looking at that that was one of the moments where I was like oh wow this can unlock so much stuff for me I agree
22:52 I don’t think it’s necessarily going to replace a bunch of jobs I like at moreal as it makes things for me that were that before or I’m limited by what my skill is and what I know what I might imagine as a business idea or something else isn’t feasible it kind of yeah it kind of opens up your just makes your imagination a little more real actually this this weekend uh my wife and I were with our niece who’s s years old and my wife her aunt has to tell her like lots of stories and she enjoys it but like she’s making this stuff up it’s hard to make that story up for like 25 minutes and then this week she had done that for a bit and she like oh let me like show you like Dolly what are you imagining
23:29 what do you want to see and you know my niece is like how about like a cutie eyed Kitty unicorn that shoots rainbows and then like in the style of Lisa Frank Disney and it was like hit it she was like whoa that’s so cool and then they just played that game for probably half an hour it was awesome cuz she was imagining the seven-year-old all these crazy amazing things and then there’s like an image of it unlocks what you can imagine a lot easier yeah and that’s that’s really interesting right because especially with skill sets there are a lot of things that I can’t do but now with these kind of Technologies everything is suddenly possible MH and I might not be able to do everything perfect like an expert would but I can at least try it out and see how far I
24:19 get whether it’s amazing Story by the way super cute also showcases the creativity that these types of Technology actually enable and not necessarily always disable which you know is a is a fear and right fear or some cases MH but also for me I have very little front-end experience for example but if I now want to code something nice demo of some data I’ve created in HTML CSS JavaScript I let you know let’s let chat GPT or whatever llm there is do it all for me and it doesn’t need to be perfect right it’s a demo I just need to Showcase something cool something nice and it’s right over it m but now suddenly I can do front end not in deployment not perfectly but I can do it and there are so many of these cool technologies that are or skill sets that
25:12 are suddenly available to you which wasn’t the case before and that also for me at least has been a shift in the way I think about things normally you would think about okay this is my skill set and I’m going to use that apply that to a specific problem use case what have you and now suddenly there are a lot of skill sets that you don’t have but you that you can still apply to the problem just to see how far you can get and just to see if it works that’s incredible I mean one one more comment and we’ll move on to uh to another segment of the show which is like you know like one example I like to give to a lot of people is when we after we talked to eang the other guest that uh that was on the show who taught a on
25:58 on AI and how to use it effectively I then afterwards used cursor to uh to to build a Mario game like from scratch I asked it to do it I had no software engineering background and it’s live on the internet and I sent the kind of like the link to to to sha and travia like that weekend as well I’m like this is crazy I didn’t do like I didn’t know anything about this other than just plugging in and like the possibilities are now s suddenly like wide open and so the 50 startup ideas that I used to have now they’re all become attainable and that that’s just because you know like hey these things actually work and then after I took your course on deep learning like I I I um went through the course and stuff The Compound Effect of
26:42 that is that you know hey you might think of these Technologies as something like hey it’s really complicated super hard to get to to understand don’t know what they’re doing but after that I’m like they’re pretty straightforward and then once you understand that to your point it’s like hey they’re not going to replace your job but then you better be like really good at it in terms of you know just being comfortable because if someone else’s is is comfortable and is using it then you have no chance um yeah next one thing I want to get into is in in your book and also the course too in my day-to-day I’m using open Ai and I’m using anthropic a lot and your book is the first time where I started looking at and learning about some like these open source models out
27:25 there and I think you refer to the ones in the book is like CPU poor models that like anyone can kind of run on your on your laptop or computer if it’s good enough you don’t need to have like some massive uh investment in in all these Nvidia chips and and you’ve authored and contributed and maintain a lot of um you know open source uh libraries as well and I was wondering if you could kind of chat a little bit about like what is open source first proprietary Ai and why do you think open source AI is important maybe what unique benefits it kind of brings to the table Beyond proprietary models yeah of course so you have close source and open source models and for the sake of Simplicity let’s start with close source which are proprietary models you know the open AI models cloth
28:14 wow I know a lot of open models no but those those types of models uh are proprietary and and quite frankly understandably so they are very costly to train to develop uh to get the right data to get the right people to create these models and you pay for them uh you pay per tokens a word or a subword uh that’s being generated or read on these specific surface and so the shift to you know this generative domain that we’re now in really started with the open AI model proprietary model that did stuff that no one else really could do and did it amazingly well but the problem is with proprietary models is a you have to pay for that and we don’t like to pay for things but mostly it’s a security and privacy perspective because for example I work day-to-day in healthcare
29:05 and there’s no way we’re going to send patient data to any cloud provider that’s just we’re not going to do that so then the alternative is something that you can run locally so that’s the open source models the models that somebody has created and basically said okay here you go you can run it on your own device on your own Hardware you can turn off the internet and it would still run and do stuff and you can play around with it generally open-source models are less performant than close Source models and that’s kind of obvious because it’s something they put a lot of time money energy in so not everybody is going to give it freely out to the entire Community but there are a lot of organizations now doing that more and more and more and that’s because it’s
29:53 becoming easier to train these models and to create them so we have now a hug amount of open models that perform extremely well the most well-known is the Llama models of course with M trol and quen coming very close to Performance and sometimes even exceeding it and we have seen exchange crashing with deep seek that came out with their own completely fully open model that really nearly outperformed jet GT’s offering and that’s really exciting to understand then okay but sometimes I want a local model I want a model that’s for my specific use case I want to ask it questions that I don’t want to end up at some server that I have no control over that can be just because personal reasons and whatever that might be is perfectly fine it can be because your organization doesn’t want patient data
30:47 to end up there it might be that your organization just has models that they’re training new technologies that they’re inventing and they don’t want to share that not saying that just because you’re using Cloud it ends up in someone else’s hands but that’s the concern you have no control over it and control is important and the great thing with local models is they are also becoming smaller and smaller smaller which means they’re more and more accessible to your everyday person up to the point where we have models that can run on your cell phone which is very cool of course they’re not not as great as jet GPD but they can run and that’s cool because every couple of months we see that uh large language models reach a new performance and whenever they do the smaller models always almost always also
31:35 increase in performance so whenever CET GPT does something amazing great because that means good stuff for the rest of the open source community and typically also vice versa so to me when we’re talking about open source versus closed Source I don’t think one is necessarily better than another I obviously have a preference for open source but as long as if there’s enough of both closed source and open source I think we have a healthy community of models yeah so it sounds like it it really depends a lot on the use case like if a company or a person’s evaluating what they want to use some of those facets of that decision might be around obviously like cost is always something to bear in mind and then it sounds like another big one is kind of privacy and security any any other kind
32:25 of Dimensions you think someone should be thinking about when they’re like evaluating oh should I you know I’m trying to build this product or something should I go with an open source first closed Source model I also think it has to do with knowledge because close Source are easy to use there’s a bunch of Engineers behind them that have created nice easy to use uis and apis uh whatever you need the moment you’re going into open source that will always mean something you have to hack yourself that you have to create some sort of software and it will never ever be as perfect I think as the tools surrounding close Source models which again makes sense but that’s I think that also is something to take into account doesn’t mean that it’s necessarily difficult to use open source model it’s easy there are a lot of cool
33:14 and nice pieces of Technologies out there but because they’re often supported by people who are just coding all of these things as a hobby they might not be the most perfect pieces of Technologies out there and that’s not not a problem because again you’re getting stuff for free the uh Perpetual trade-off of uh do you want something easy or do you want something all done for you it definitely is yeah do you think as like a models in general just become smaller and more efficient do you think we’ll see growth in kind of open models I’m sure it’s going to going on for a long time I don’t know anything about open source models but I feel after keep seeking the news at Le people were like wow there seemed to be at least probably not in the open source Community but in
34:03 the media for this race to the top by these like big tech companies and only they can do it by having more and more and more data and whoever spends the most money on it and then one of them’s going to win and we’ll see what happens to the others but yeah I don’t know now now kind of feels like there’s a lot of other options and maybe they are there always was but how do you kind of see it things growing in the future that the is that the the chat GPT moment for open source that’s a very good point yes it definitely is but because the moment my parents and my grandparents know about deep seek is the moment that it gains the same popularity that that chat gbt has gotten right it’s in a way still all
34:46 about marketing and being a household name even though so deep seek is an amazing model it’s brilliant it’s very accurate and they did a huge amount of very cool tricks to make it form the way it did but it doesn’t mean that there haven’t been amazing models smaller ones out there for years already the Llama models the mistol models the quen models those are all amazing pieces of technologies that a lot of people including myself have been using locally but what we see now is that as these new models come out we we can use them to train these smaller models through distillation of these very capable llms we can for example say okay it generate for me a poem about blah blah blah and then it does you know you feed that through a deep seek model and then that
35:34 conversation you can use that as as training for a very small model so the growth of small models will be huge because they’re easy to train they’re smaller they’re cheaper to train and we can generate data using all of these very very large models so this distillation process allows us to create very efficient small models and they will just continue to grow more accurate as we improve architectural performance of these llms but also as we defies more and more cool tricks to use them because small models are good at very specific things or small things or not difficult things and sometimes people think okay but we we want a model that can do everything right but what if you think about LM agents instead about llms one bigger llm that can do a lot of stuff that’s St all of these very tiny
36:29 llms to do very specific tasks send them Mill summarize this transcribe this and then aggregate all of that information into the larger model where it can be processed so these small models are very good at at at expanding the potential of these larger models I think and especially as we see that with for example cursor where you can use also can use agents to create files and to look up code all that stuff you don’t want a very big model to do very basic things but if we have a very small model that’s still like 90% as accurate the larger model can still steer that model into very specific talks and that’s the agent perspective small models are amazing to use on your phone or as a Siri like assistant all kinds of purposes use it in your browser for
37:19 example to summarize information on a given page you don’t need deep seek like levels to do basic summarization of things so the small models I think that’s what makes it possible to use them across all of the technology in your life if it makes sense when you think about uh you yeah had you made a point there about mean around having specific tasks that just got me thinking so would that be another benefit of open source for instance if it’s is it easier to say like tune those models to a very specific use case that you have within your product that you might not be able to do with a Clos sourced model maybe yeah maybe even to get into like could you talk a little bit about kind of what you know what pre-training is vers fine tuning and then where there’s kind of
38:07 like an opportunity for people to get their models to do like more specific tasks yeah so so you make an excellent point right so we talked about security and privacy and things like that but fine tuning for very specific tasks that’s also becomes easier and easier so we generally have it’s rather black and white because technology changes and things change but there’s a two-way approach to creating these large language models and the first step is pre-training and that typically is the most costly process where we have billions of documents that we just throw at the large language model and say okay learn to predict the next word and that’s it nothing more and in a way it’s in order to quote unquote understand these documents and understand language and understand reasoning understand the way people talk all those types of
38:57 things thing so to get a basic foundation of the world so to say got and this is really expensive to do yeah really really expensive that’s where most of the money goes into and when you have that base model typically it it really can’t do much more than just predict the next word so it doesn’t have to be a conversational model yet because it might not have been trained as such and then fine tuning involves IT training it to a very specific task but the task can also be conversation to make sure whenever I ask a question the model gives an answer that I’m satisfied with and there many tricks to make sure that process works well but that’s aask and after have after you have done that you have your conversational model that people generally use those are the
39:44 instruct models or the chat models and then you can even do another round of fine-tuning after that with very specific domain data because there’s a lot of data that’s not available to entities like open AI or anthropic or what have you for me for example I work in a Cancer Research Institute we have a lot of very specific domain data that many of these models struggle with to answer your question open models allows us to then fine-tune these models on that very specific data we know that the data is not going to end up in strange places we have control over it and we have our own model that has you know learned some of this domain knowledge and can reason a little bit better about our specific domain yeah yeah that makes lot of sense so we’ll add that to our
40:33 dimensions of why when to evaluate you know which to use open or close you have kind of the cost your kind of like knowledge and comfort with working with those models you have privacy and security and then you also have do you want something to be yeah more specific around the domain you’re working on where that uh one of these larger models might not have yeah and there are couple of other nuances that you can even include like if you’re using proprietary model you never know or you don’t necessarily always know which model you’re using if it’s an updated version older version if they add a lot of business rules between the model and the actual output so a lot of constraints that you might not want to have there’s a lot of focus on uncensored models for example if you’re
41:23 writing a horror book and you want some inspiration about how to do how to phrase certain types of things I believe C GPT in in its early days would say NOP I’m not going to generate that kind of content because it’s potentially hurtful and that makes sense but for very specific use cases that might be difficult so you might want to use an open model that maybe doesn’t have those downsides so it’s much of it really is about control over uh the model yeah absolutely I mean if uh yeah if open AI goes down your product goes down whereas you know sure that that same thing will will happen if your own like locally holed model goes down too but at least you have control over that and you’re not just uh I don’t know on X tweeting at opening ey like
42:10 come on get on there it went down the other day actually I was I I went on I don’t really usually go on X that much but I was like is it down like what is going on I was just trying to do some stuff in curs her but it was quite funny actually there was a lot of uh students who were like I have a test tomorrow like this paper is Du like you’re going to I’m going to get an F I like oh man yeah that external uh lack of control just use another model there’s so many out there exactly exactly what’s the actually what’s your prediction Martin in terms of the proliferation of open soures versus closed models like I’m thinking you know like in the business side kind of like hey what’s the market share of the two but like do you feel
42:50 like one is going to be more dominant over time I’m guessing like one is probably a long tail over the other it’s a difficult question because obviously I don’t know all of what’s happening in the proprietary side of things I know some but not enough to give a a full picture that said the trend thus far has been that open source is catching up and that they’re growing closer and closer to one another and that proprietary models are still doing very cool stuff but that it sometimes seems like we need something entirely new to skill right so at first it was just throw as much data as we could at the problem and and that’s our Solution that’s called train time compute MH where we focus on training the model and then Jet GPT started to introduce test time compute
43:36 where you focus on the output of the model so give it more time to generate tokens let it just generate more so-called thoughts and hopefully that will improve the performance of these kinds of models so that was the trend but then deep SEK and did the same thing extremely well making it you know in the top five models of which the other four were proprietary and I’ve I think depending on the eval evaluation metric it was second sometimes even first so you can say that many of these models are catching up that said there’s a lot of new um new technologies being developed that have shown tremendous potential that if implemented well could exceed some of the models that are currently out there and I think that’s something for the the proprietary side of things to do because it’s crazy expensive to
44:31 train these models and if there’s a new type of Technology out there whether it’s uh it’s mamba or bitnet or all different types of architectures that these large language models have a university is not going to train or going to just see just throw 50 million at the problem and see whether this architecture actually skills to that size right it requires a lot of testing to see what whether that all works out so it’s very difficult to say which of these pieces of Technologies is going to be the next thing I think Google recently released a new paper Google Titans which is supposed to be again an improvement on the well-known Transformer architecture but again there are so many of these papers that really do show tremendous potential just the implementation and scaling it then to the size of these deep seek like models
45:22 that’s expensive but quite frankly I will always see open source catching up to uh to these proprietary models always I don’t think there’s a world where they will never be close yeah that makes sense what recommendation would you have for our audience viewers listeners who maybe are like hey uh you guys are recommending me to get into Ai and just be comfortable with it but there’s so many options like what what do I do here I’m lost what’s my step one first you got to get his book you know Hands-On large langin model yeah I’ve got it right here recomendation no the very very first step would be to go to CET gbt or mist or Claud or whatever platform that you know and try it out uh the example Sean you gave about the dolly uh with your was it seven-year-old cousin that’s cool
46:18 right do something that makes you excited using this type of Technology don’t use it for the sake of using it because that becomes boring mhm it still needs to be a nice and interesting a cool learning experience but yes there are still so many things to do with it but I don’t think there’s necessarily A a wrong way to start interacting with these models because it’s a new technology it’s still new it’s not that old we believe it will change the world it’s the new internet so to say so but that means that because it’s new it will change in a couple of months with some new technology that comes out so just being familiar with interacting with an llm asking it tough questions easy questions fun questions to get a feeling of what these types of Technologies can do but also what they cannot do because
47:10 I I can tell you what they can and cannot do but that lesson will work much much better if you just do it yourself one I I think there’s one really um like an understatement that you just highlighted there which is like uh like use it for something that you like as in like just try out in your daily life integrate it seamlessly instead of I have to use it so I need to write it a prompt uh one one one just inspires you much more than the other once you see the same results probably so I love that what are you already doing it’s not like go don’t go in there like what can this do be like what am I already doing can it do that things you already know about for it with my wife and my niece like oh
47:51 I’m already I’m telling this story like uh I’m really enjoying it but it does require a a lot of kind of like creativity is there something that can supplement that or obviously in your work too it’s like I don’t know I’m writing I’ve done this analysis and now I have to summarize it in a way where a non-technical audience can also understand it before you might spend a lot of time on that try leveraging one of these models to do that instead yeah and and that’s the thing right with with this with this hustle culture that that we live in currently people like to focus okay everything that I do should be should be useful and should have an output that people can can use or that I can use or that I learn from that’s nonsense that’s that’s not a way of
48:36 living I think do what’s fun and if if usefulness is fun to you then do usefulness but if you just want to create uh a Super Mario game because that’s cool to do and then that do that if you want to create images see what’s possible if you want to create a story book for your daughter or your your son to read that’s also cool to do it doesn’t have to be you know the most useful thing out there I think the the the best learning experience that you can ever have if you’re motivated in a in in a in an internal way to do it and to to learn all of this new stuff and fortunately I’ve have been so that’s nice not everyone else is and that also makes sense but I I would always say just just
49:25 focus on the fun thing things and if you do that then easy learning is by far the most easiest thing there ever is I think we got our punchline for this episode yeah I really want to create a story book for like I’ve been thinking about for like a story book for my wife for her birthday that’s like about our dog this will be the Easter egg in the episode we’ll see if she actually listens to this if she’s gotten this far she’ll know where her birthday present is but that’s that’s a very cool experience to to create something like that yeah so we’re almost at time here I wanted one more topic I wanted to discuss though before we go is um we’ve been talking a lot about like uh these new models or these like generative models um something that I was just
50:08 think about you mentioned how hey maybe sometimes small models are better than large models depending on your use cases what use cases would you say that like representative pre-existing representative models are still better at than a like a generative model like an example I thinking of their day in my own work is like okay like I have these documents or Clauses or something and I want to classify them I probably don’t need to jump straight to like hitting open ai’s API to like classify this stuff there’s probably pre-existing things like bird that I can use for that maybe some of the the use cases comparing those to yeah so the the most common use case for representation models I think currently is to use embeddings those Vector representations for let say sentences or paragraphs because they’re very relative cheap to
50:57 generate compared to a given generative model and then you have a representation for your entire data let’s say you have 10 million documents about whatever subject you only have to generate all of those embeddings once you store them somewhere in a database and you can access them whenever you want you you don’t have to recreate these representations and you can use those to train a model for for classification or you know in my case with bird topic which is a topic modeling package models the most frequent topics in those 10 million documents and the alternative would be to use a generative model let’s say chpt to go through those 10 million documents one at a time and uh for example extract the topics or to classify something a super expensive and B what if I want to change the pront and
51:47 run it again just to see if I can now do it better then it will be again super expensive and quite slow because 10 million documents through jgpt it’s that’s it’s not going to be fast and that’s what we typically see between those things is it feels like we have generative models we have our hammer and we’re continuously looking for to use it on but it really really doesn’t make sense when you’re using an super expensive piece of product to do something incredibly simple and with embeddings you can get away not even get away it’s it’s still very accurate those representation models but you can do all of these types of analys ales create classification models that are cheap that can run in production with low latency little cost to classify spam or what have you we’re not going to use you
52:38 know GPT reasoning models to classify spam it’s it’s a complete waste of of resources but those representation models what they do well is they give you that representation those factor embeddings and you can store them that storage is very interesting because it allows you to create some sort of database for your input let’s say again those 10 million documents and then you can throw a generative model on top of that and say okay I have a question and we search in that database between those 10 million documents to find the most relevant one and feed those to the generative model we only use the the generative model for the for more difficult tasks because you know it’s focused on generative AI not necessarily classification instead of always focusing on those big large generative deep seek like models those embeding models don’t just have their use cases
53:37 they’re still extremely popular for retrieval tasks for clustering for classification just representation semantic D duplication of data let’s say you have 10 million documents and you want to D duplicate them you’re not going to use a large language model for that at least the generative model representation models way more efficient so there are are hundreds of use cases where you would rather use an embedding model than a generative model and I do feel like that people tend to forget that yeah the latest greatest and shiniest object always wins right yeah yeah and it kind of makes sense right because it is really shiny yeah it is very cool it does very nice and amazing things but what happens is that new generation of data scientist or AI people will focus on those generative models and keep getting that embedding models exist that you can train a very
54:29 cheap Bird model for classification tasks and and not cost your company many thousands to keep it life yeah it almost reminds me a little bit of like in data science ml when sometimes people will jump to like more complex models like I don’t know XG boost or something and then it’s like dude you can just use regression for that like we’re not trying to do anything too crazy it’s super quick and like you know it just depends on the use case really and that’s that’s really fun that you that you mention that because that has always been the case when word to became a thing people would say no no no just try bag of words first and then when more complex embeddings became a thing people would say no just try word to F or again back of words first and we continue on
55:14 this trend of saying always focus on the shiny new thing but know that there’s dozens of years of very cool technologies that are way cheaper efficient and sometimes even more accurate than those new shiny models so it’s nice to see this trend happening over and over and over yeah hi any other questions from you no I think uh I think that’s been it’s been a such a wonderful conversation Martin yeah nothing nothing from on on my end I think we can close it out yeah one one more quick question I like to ask everyone um in terms of like whether someone’s maybe in the field of data um since you’re you’re you’re a data scientist or or also you know ml or or AI what do you think is the most underrated skill someone may want to invest in as
56:04 their you know breaking into or progressing in the field a little bit biased as a psychologist so you know where this answer is going but I do think it holds true as objective as I can be is is truly Communication in most cases you will always be interacting with people and not necessarily systems the thing that you’re deploying that you’re making is going to be integrated within organization that’s comprised of people stakeholders that don’t really care sometimes about the performance of your model they just want it to be useful so you have to explain why it is useful for them and how it can help the organization and that’s not because you fine-tuned a large language model and that’s very cool no it helps the business case because of XYZ and this communication part I think is one of the
56:55 more complex things that you can learn because how do you communicate well there’s not a guide somewhere that tells you the exact steps that you have to do every single time because people that you communicate are all different from one another the context is entirely different so it’s a feeling in a way that you develop by doing it more and more and more now the good thing is is that teaching in a way becomes more accessible with something like Tik Tok for example just record yourself explain something in 30 to 60 seconds put it online that’s step one do that plenty enough of times and you can really learn to understand what people want to see when people will listen to you when you are when you explain something clearly enough that the questions people ask are not about okay I don’t understand it but
57:47 but how then does also this and this work and how would you integrate this and this into your technology or whatever it so communication just just I think is what makes the world work and will always will be but in data science it’s especially useful because I’ve seen so many organizations that have data science teams but still have to explain to business why they exist and why they are useful and why they should remain existing because they’re often not a product but consultancy or advisory or what have you um and the only way you do that is through communication wow that was so good I think I think uh I think um the takeaway there Martin is uh everybody should learn Tik Tok that’s the most underrated skill I’m I’m I’m okay with that not too much not too much
58:35 no but that’s really good though like I can’t agree more it’s you know like of of all the really interesting really cool technology especially AI Frontier stuff like it always comes comes down to the basics right like what’s what’s valued the most never changes not in the face of this like really cool technology it’s still going to be how you interact how effective you can be and how much impact you can land in whatever you’re doing yeah well great we won’t take more of your time right I know you’re uh very busy person with all the different things you’re juggling but thank you so much for coming on the show I think our audience is really gonna enjoy this one lots of great conversation and learning here to our audience if you enjoy this please like And subscribe drop a comment
59:18 and if you have other questions for us or Martin I also wanted to plug again like check out Martin and Jay’s book hands- on large language models check out the Deep learning AI course they did on how Transformer LMS work yeah for me those are super helpful so also just thank you for writing and um going to keep following your your stuff along as well that’s kind of you to say it was a a truly a bless to be here and have these kinds of conversations love all the work that you’ve done Martin please keep it up because uh I’ll be sure to be following great thank you I definitely have some things in the pipeline which hopefully one or two weeks maybe new visual guide that will be cool all right we may have to have you back on the show
59:58 sometime in the future to to check that stuff out but uh yeah thanks so much everyone we’ll see you next time thanks everybody