# The End of Finetuning — with Jeremy Howard of Fast.ai

- **Show:** Latent Space: The AI Engineer Podcast
- **Published:** 19 Oct 2023
- **Source:** https://lspace.beehiiv.com/podcast/s/latent_space_the_ai_engineer_podcast/the_end_of_finetuning_with_jeremy_howard_of_fast_ai
- **Transcript:** https://podcasts.opennash.com/shows/latent-space/the-end-of-finetuning-with-jeremy-howard-of-fast-ai-1b6549/
- **Provider:** OpenNash Podcasts (machine-generated)

## In brief

Jeremy Howard argues that "fine-tuning" is a misleading idea: there is only continued pre-training. Models forget things when people train them in sequential stages with narrow data. He says the better approach is to keep all kinds of data in the mix and gradually raise its quality, rather than throwing data away. He ties this to his belief that powerful AI should be accessible to many people, not controlled by a few labs.

The episode traces how Howard's ULMFiT work, which most NLP experts said would fail, became the template behind ChatGPT-style training. The tension is that the industry then drifted toward zero-shot and few-shot approaches, and now uses his three-step recipe in ways he thinks are flawed. He says the field is still immature: nobody really knows how to train, fine-tune or prompt these models well.

## Key insights

1. **Fine-tuning is just continued pre-training** Howard says the same process that put knowledge into a model originally can add new knowledge and skills later. Problems come from doing it badly, such as training on only one kind of data.
2. **Narrow staged training causes catastrophic forgetting** He cites Code Llama, which he says used only about 0.3% non-code data in its fine-tuning and became weak outside coding. He argues keeping a broad data mix would have prevented this.
3. **LLMs appear to memorize after one example** Howard and Jonathan Whitaker saw training loss drop sharply at the start of each epoch and ran experiments supporting memorization after a single exposure. This may disturb training dynamics, and nobody knows how to fine-tune around it.
4. **Retrieval augmented generation is an inefficient hack** Howard says RAG splits data arbitrarily and relies on questions embedding near answer paragraphs, so broad questions fail. He suggests fine-tuning to put information into the weights, then adding RAG on top.
5. **Fast.ai won DAWNBench to prove accessibility** With about 10 days' notice, Howard's team used ideas like progressive resizing to win a speed-training benchmark. This countered the story that only Google with TPUs could train ImageNet quickly.

## Questions this episode answers

### What does Jeremy Howard mean when he says fine-tuning doesn't exist?

He means fine-tuning and pre-training are the same process of training a model to predict text, just at different stages. So he prefers calling it continued pre-training.

### Why does Howard think Code Llama is a cautionary tale?

He says Meta trained it on almost entirely code data, with only about 0.3% non-code, so it became good at coding but forgot other skills. He calls this catastrophic forgetting, meaning a model losing old abilities when trained on new material.

### What is retrieval augmented generation (RAG), and why does he criticize it?

RAG means searching your documents for relevant passages and feeding them to the model along with a question. Howard calls it an inefficient hack because it depends on arbitrary chunking and embeddings that may not match broad questions.

### What was ULMFiT and why did it matter?

ULMFiT was Howard's approach of training a language model on Wikipedia, refining it on more specific text, then training it on a task. Howard says it gave a state-of-the-art result on IMDb within hours and is the pattern behind ChatGPT-style training.

### Why does Howard say the AI field is still immature?

He says nobody really knows how to train, fine-tune, prompt or use these models well, and compares the moment to computer vision in 2013. He says companies rushed to ship useful products and left technical debt.

## Facts

- **swyx** [0:02:12]: "in the magical month of June 1999, you founded both Optimal Decisions and FastMail, which I also used."
- **Jeremy Howard** [0:19:31]: "Fastmail was the first kind of synchronized email provider for non-businesses."
- **Jeremy Howard** [0:19:31]: "Optimal Decisions invented a new approach to insurance pricing, something called profit-optimized insurance pricing."
- **Jeremy Howard** [0:03:39]: "the idea that deep learning was something that you could make more accessible was generally considered stupid."
- **Jeremy Howard** [0:11:40]: "So step one was train a language model on a big corpus step two was fine-tune a language model on a more curated corpus and step three was further fine-tune that model on a task"
- **Jeremy Howard** [0:11:40]: "the first time i tried it within hours i had a new state-of-the-art academic result on imdb"
- **Jeremy Howard** [0:13:12]: "he said, well, I was pretty sure that pre-training on a general large corpus wouldn't work. So I hadn't tried it. And then I read ULM fit and turns out it did work."
- **Jeremy Howard** [0:27:34]: "Google had just released their TPUs."
- **Jeremy Howard** [0:28:04]: "we basically got together an emergency bunch of our students and Rachel and I and sat for the next 10 days"
- **Jeremy Howard** [0:29:25]: "your model has to run on Kaggle within nine hours. And Kaggle's very, very limited. So you've only got 14 gig RAM, only two CPUs and a small, very old GPU."
- **Jeremy Howard** [0:29:58]: "Sylvain Guzher, when he worked with us, created called Fast Progress, which is kind of like TQEDM, but we think a lot better."
- **Jeremy Howard** [0:35:11]: "CodeLama is like 500 billion token fine tuning of Lama 2 using code and also pros about code that Meta did."
- **Jeremy Howard** [0:35:36]: "Only like 0.3 % of their epochs were non-code data. So it did. It forgot everything else."
- **Jeremy Howard** [0:53:26]: "taking a pre-trained base model and getting it to generate SQL. And it took 15 minutes to train on a single GPU."
- **Jeremy Howard** [0:53:51]: "A really underappreciated one is BTLM 3B, which is a kind of 7B quality 3B model."
- **Jeremy Howard** [0:44:58]: "I met Chris, I think it was at the first TensorFlow Dev Summit."
- **Jeremy Howard** [0:46:16]: "he was like, yeah, so we're going to create this new thing called Swift for TensorFlow."
- **Jeremy Howard** [0:48:50]: "so you know in the end chris left you know swiffer tensorflow got archived there was no backup plan"
- **Jeremy Howard** [0:49:59]: "google now does have a backup plan you know they have jacks which was never a strategy"
- **Jeremy Howard** [0:49:23]: "he called me up and he's like jeremy i've taken your advice i've started a company"
- **Jeremy Howard** [1:02:58]: "In my 2014 TED Talk, I had a graph and I said, like, this is like the slope of human capabilities"
- **Alessio Fanelli** [0:04:40]: "you were also the top ranked participant in both 2010 and 2011"

## Transcript

**[0:00:10] Alessio Fanelli:** Hey, everyone. Welcome to the Latent Space Podcast. This is Alessio, partner and CTO in residence at Decibel Partners, and I'm joined by my co-host, swyx, founder of Small AI.

**[0:00:21] swyx:** Hey, and today we have in the remote studio, Jeremy Howard, all the way from Australia. Good morning.

**[0:00:26] Jeremy Howard:** The remote studio, also known as my house. Good morning. Nice to see you, Ruth.

**[0:00:31] swyx:** Nice to see you too. I'm actually very used to seeing you in your mask as a message to people, but today we're mostly audio. Thank you for doing the very important public service of COVID awareness.

**[0:00:41] Jeremy Howard:** I won't say it was a pleasure. It was all very annoying and frustrating and tedious, but somebody had to do it.

**[0:00:47] swyx:** Somebody had to do it, especially somebody with your profile, I think, really drives home the message. So we tend to really introduce people for them and then ask people to fill in the blanks on the personal side. Something I did not know about you was that you graduated with a B in philosophy from the University of Melbourne. I assumed you had a PhD.

**[0:01:03] Jeremy Howard:** No, I mean, I barely got through my BA because I was working 80 to 100 hour weeks at McKinsey and Company from 19 years old onwards. I actually didn't attend any lectures in second and third year university.

**[0:01:19] swyx:** Well, I guess you didn't need it or you're very sort of self-driven and self-motivated.

**[0:01:23] Jeremy Howard:** I took two weeks off before each exam period when I was working at McKinsey. And then, I mean, I can't believe I got away with this in hindsight. I would go to all my professors and say, oh, I was meant to be in your class this semester and I didn't quite turn up. Were there any assignments I was meant to have done, whatever. I can't believe all of them, they basically always would say like, okay, well, if you can have this written by tomorrow, I'll accept it.

**[0:01:47] swyx:** So yeah, stressful way to get through university. Well, it shows that, I guess, you min-maxed the opportunities. That definitely was a precursor.

**[0:01:57] Jeremy Howard:** I mean, funnily, in philosophy, the things I found interesting and focused on in the little bit of time I did spend on it was ethics and cognitive science. And it's kind of really amazing that now I come back around and those are actually genuinely useful things to know about, which I never thought would happen.

**[0:02:12] swyx:** Yeah, a lot of relevant conversations there. So you were a consultant for a while. And then in the magical month of June 1999, you founded both Optimal Decisions and FastMail, which I also used. So thank you for that.

**[0:02:24] Jeremy Howard:** Good for you. Yeah. Because I had read the statistics, which is at like 90 % or something of small businesses fail. So I thought if I start two businesses, I have a higher chance. In hindsight, I was thinking of it as some kind of stochastic thing I didn't have control over, but it's a bit odd. But anyway. And then you were president and chief scientist

**[0:02:42] swyx:** There's Kaggle, which obviously is the composition platform of machine learning. And then Analytic, where you were working on using deep learning to improve medical diagnostics and clinical decisions.

**[0:02:54] Jeremy Howard:** Yeah, I was actually the first company to use deep learning in medicine to kind of founder the field.

**[0:02:58] swyx:** And even now, that's still like a pretty early phase. And I actually heard you on your new podcast with Tanishq, where you went very, very deep into the stuff, the kind of work that he's doing. Such a young prodigy at his age.

**[0:03:10] Jeremy Howard:** Maybe he's too old to be called a prodigy now, an ex-prodigy. No, no, I think he still counts.

**[0:03:16] swyx:** And anyway, just to round out the bio, you have a lot more other credentials, obviously, but most recently you started Fast.ai, which is still, I guess, your primary identity with Rachel Thomas. Yep, who's my wife. Doing a lot of public service there with getting people involved in AI. And I can't imagine a better way to describe it than Fast. Fast.ai is you teach people from nothing to stable diffusion in seven weeks or something, and that's amazing.

**[0:03:39] Jeremy Howard:** Yeah, yeah. I mean, it's funny, you know, when we started that, what was that, like 2016 or something, the idea that deep learning was something that you could make more accessible was generally considered stupid. But everybody knew that deep learning was a thing that you got a math or a computer science PhD, you know, those one of five labs that could give you the appropriate skills. Then you would join, yeah, basically from one of those labs, you might be able to write some papers.

**[0:04:06] Jeremy Howard:** So yeah, the idea that normal people could use that technology to do good work was considered kind of ridiculous when we started it. And we weren't sure if it was possible either, but we kind of felt like we had to give it a go. Because the alternative was we were pretty sure that deep learning was on its way to becoming the most or one of the most important technologies in human history. and if the only people that could use it were a handful of computer science PhDs that seemed like a a big waste and be kind of dangerous i don't know one thing on your bio that at Kaggle

**[0:04:40] Alessio Fanelli:** you were also the top ranked participant in both 2010 and 2011 so sometimes you see a lot of founders running companies that are not really in touch with the problem but you were clearly building something that you knew a lot about which is awesome and even yeah talking about deep learning, you created, published a paper on ULM fit, which was kind of the predecessor to multi-task learning and a lot of the groundwork that then went into transformers.

**[0:05:05] Alessio Fanelli:** I read back on the paper and you turned this model of AWD LSTM, which I did the math and it was like 24 to 33 million parameters, depending on what training data set you use today. That's kind of like not even small. It's like super small. What were some of the kind of like contrarian takes that you had at the time and maybe set the stage a little bit for the rest of the audience on what was kind of like the state of the art, so to speak, at the time and what people were working towards.

**[0:05:37] Jeremy Howard:** Yeah, the whole thing was a contrarian take. Okay, so we started Fast.ai, my wife and I, we're trying to think, okay, how do we make it more accessible? We started thinking about it, it was probably 2015. And then 2016, we started doing something about it. Why is it inaccessible? okay well a no one knows how to do it other than a few number of people and then when we ask those few number of people well how do you actually get good results they would say like oh it's like you know a box of tricks that aren't published so you have to join one of the you know labs and learn the tricks so a bunch of unpublished tricks not

**[0:06:08] Jeremy Howard:** much software around but you know thankfully there was the ano and you know rappers and particularly lasagna the rapper but yeah not much software around, not much in the way of data sets, very hard to get started in terms of the compute, like how do you get that set up? So, you know, everything was kind of inaccessible. You know, as we started looking into it, we had a key insight, which was like, you know what, most of the compute and data for image recognition, for example, we don't need to do it.

**[0:06:39] Jeremy Howard:** You know, there's this thing which nobody knows about, nobody talks about, called transfer learning, where you take somebody else's model where they already figured out how to detect edges and gradients and corners and text and whatever else, and then you can fine-tune it to do the thing you want to do. And we thought that's the key to becoming more accessible in terms of compute and data requirements. So when we started Fast.ai, we focused from day one on transfer learning.

**[0:07:04] Jeremy Howard:** Lesson one, in fact, was transfer learning. I mean, there wasn't much in the way of courses. Really, the courses out there were PhD programs that had happened to have recorded their lessons. They would rarely mention it at all. We wanted to show how to do four things that seemed really useful. Work with vision, work with tables of data, work with recommendation systems and collaborative filtering, and work with text. Because we felt like those four modalities covered a lot of the stuff that are useful in real life.

**[0:07:33] Jeremy Howard:** And no one was doing anything much useful with text. Everybody was talking about word-to-vec, you know, like king plus queen minus woman and blah, blah, blah. It was like cool experiments, but nobody's doing anything like useful with it. NLP was all like lemmatization and stop words and topic models and bigrams and SVMs. And it was really academic and not practical. Yeah. I mean, to be honest, I've been thinking about this crazy idea for nearly 30 years since I had done cognitive science university where we talked a lot about the CELS Chinese room experiment, this idea of like, what if there was somebody that could kind of like knew all of the symbolic manipulations required to answer questions in

**[0:08:17] Jeremy Howard:** Chinese, but they didn't speak Chinese. They were kind of inside a room with no other way to talk to the outside world other than taking in slips of paper with Chinese written on them. And then they do all their rules and then they pass back a piece of paper with Chinese back and this room with a person in is actually fantastically good at answering any question you give them written in Chinese. You know, do they understand Chinese?

**[0:08:38] Jeremy Howard:** And is this, you know, something that's intelligently working with Chinese? Ever since that time, I'd say that to me, the most thoughtful and compelling philosophical response is yes. Intuitively, it feels like no, because that's just because we can't imagine such a large kind of system. But, you know, if it looks like a duck and acts like a duck, it's a duck, you know, or to all intents and purposes. And so I always kind of thought, you know, so this is basically a kind of an analysis of the limits of text.

**[0:09:07] Jeremy Howard:** And I kind of felt like, yeah, if something could ingest enough text and could use the patterns it saw to then generate text in response to text could appear to be intelligent, you know, and whether that means it is intelligent or not is a different discussion and not one I find very interesting. Yeah. And then when I came across neural nets when I was about 20, you know, and I learned about the universal approximation theorem and stuff.

**[0:09:31] Jeremy Howard:** And I started thinking like, oh, I wonder if like a neural net could ever get big enough and take in enough data to be a Chinese room experiment. You know, with that background and this kind of like interest in transfer learning, you know, I'd been thinking about this thing for kind of 30 years. And I thought like, oh, I wonder if we're there yet, you know, because we have a lot of text. Like I can literally download Wikipedia, which is a lot of text.

**[0:09:55] Jeremy Howard:** And I thought, you know, how would something learn to kind of answer questions or, you know, respond text? And I thought, well, what if we used a language model? So language models are already a thing. You know, they were not a popular or well-known thing, but they were a thing. But language models existed. This idea that you could train a model to fill in the gaps, or actually in those days it wasn't fill in the gaps, it was finish a string.

**[0:10:16] Jeremy Howard:** And in fact, Andre Capathy did his fantastic RNN demonstration from this at a similar time where he showed you can ingest Shakespeare and it will generate something that looks a bit like Shakespeare. I thought, okay, so if I do this at a much bigger scale using all of Wikipedia, what would it need to be able to do to finish a sentence in Wikipedia effectively, to do it quite accurately, quite often? I thought it would actually have to know a lot about the world.

**[0:10:42] Jeremy Howard:** You know, I'd have to know that there is a world and that there are objects and that objects relate to each other through time and cause each other to react in ways and that causes precede effects. And that, you know, when there are animals and there are people and that people can be in certain positions during certain timeframes. And then you could, you know, all that together, you can then finish a sentence like this was signed into law in 2016 by US President X and it would fill in the name, you know.

**[0:11:08] Jeremy Howard:** So that's why I tried to create what in those days was considered a big language model trained on the entirety on Wikipedia, which was a bit unheard of. And my interest was not in, you know, just having a language model. My interest was in like, what latent capabilities would such a system have that would allow it to finish those kinds of sentences? Because I was pretty sure, based on our work with transfer learning and vision, that I could then suck out those latent capabilities by transfer learning, you know, by fine tuning it on a task data set or whatever.

**[0:11:40] Jeremy Howard:** So we generated this three-step system. So step one was train a language model on a big corpus step two was fine-tune a language model on a more curated corpus and step three was further fine-tune that model on a task and of course that's what everybody still does today right that's what chat gpt is and so the first time i tried it within hours i had a new state-of-the-art academic result on imdb and i was like holy shit it does work and so you asked to what degree was this kind of like pushing against the you know established wisdom you know, every way.

**[0:12:14] Jeremy Howard:** Like the reason it took me so long to try it was because I asked all my friends in NLP if this could work. And everybody said, no, it definitely won't work. It wasn't like, oh, maybe. Everybody was like, it definitely won't work. NLP is much more complicated than vision. Language is a much more vastly complicated domain. You know, and you've got problems like the grounding problem. We know from like philosophy and theory of mind that it's actually impossible for it to work.

**[0:12:38] Jeremy Howard:** Yeah. So don't waste your time. Jeremy, had people not tried because it was like

**[0:12:42] Alessio Fanelli:** too complicated to actually get the data and like set up the training or like were people just lazy

**[0:12:47] Jeremy Howard:** and kind of like hey this is just lazy so like there were two people i thought at that time actually who were the strongest at language models were steven merity and alec radford and at the time i didn't know alec but after i'd released ulm fit and he had released gpt i organized a chat for both of us with kate betts the new york times and alec answered this question for kate and kate Just like, so how did, you know, GPT come about?

**[0:13:12] Jeremy Howard:** And he said, well, I was pretty sure that pre-training on a general large corpus wouldn't work. So I hadn't tried it. And then I read ULM fit and turns out it did work. And so I did it, you know, bigger and it worked even better. And similar with Stephen, you know, I asked Stephen Merity, like, why don't we just find, you know, take your AWD, ASTLM and like train it on all of Wikipedia and fine tune it.

**[0:13:34] Jeremy Howard:** And he was kind of like, I don't think that's going to really fly. Like two years before, I did a very popular talk at KDD, the conference, where everybody in NLP was in the audience. I recognized half the faces, you know, and I told them all this. I'm sure transfer learning is the key. I'm sure ImageNet is going to be an NLP thing as well. And, you know, everybody was interested and people asked me questions afterwards.

**[0:14:01] Jeremy Howard:** But just, yeah, nobody followed up because everybody knew that it didn't work. So we were scooped a little bit by Dai and Lee, Kwok Lee at Google. I didn't even realize this, which is a bit embarrassing. They had already done a large language model and fine-tuned it. But again, they didn't create a general purpose large language model on a general purpose corpus. They only ever tested a domain-specific corpus. And I haven't spoken to Kwok actually about that, but I assume that the reason was the same.

**[0:14:32] Jeremy Howard:** It probably just didn't occur to them that the general approach could work. So maybe it was that kind of 30 years of mulling over this old Chinese room experiment that had convinced me that it probably would work. I don't know. Yeah. Interesting.

**[0:14:45] Alessio Fanelli:** I just dug up Alec announcement tweet from Tony 18. He said, inspired by Cove, Elmo, and Yola, I'm fit. We should have a single transformer language model can be fine-tuned to a wide variety. It's interesting because, you know, today people think of the NIS, the leader, kind of like, kind of like the research lab pushing forward the field. What was that at the time? you know, like kind of like going back five years, people think of being asked an overnight success,

**[0:15:09] Jeremy Howard:** but obviously it took a while. Yeah. Yeah. No, I mean, absolutely. And I'll say like, it's interesting that it mentioned Elmo because in some ways that was kind of diametrically opposed to ULM fit, you know, there was these kind of like, there was a lot of activity at the same time as ULM fits released. So there was before it as Brian McCann, I think at Salesforce had come out with this neat model that did a kind of multitask learning.

**[0:15:35] Jeremy Howard:** But again, they didn't create a general fine-tuned language model first. There was Elmo, which I think was actually quite a few months after the first ULM fit example, I think. But yeah, there was a bit of this stuff going on. The problem was everybody was doing, and particularly after GPT came out then, everybody wanted to focus on zero shot and few shot learning. You know, everybody hated fine tuning. Everybody hated transfer learning. And like I literally did tours trying to get people to start doing transfer learning.

**[0:16:06] Jeremy Howard:** And nobody was interested, particularly after GPT showed such good results with zero shot and few shot learning. And so I actually feel like we kind of went backwards for years. And not to be honest, I mean, I'm a bit sad about this now, but I kind of got so disappointed and dissuaded. It felt like these much bigger labs, you know, like Fast.ai had only ever been just me and Rachel were getting all of this attention for an approach I thought was the wrong way to do it.

**[0:16:33] Jeremy Howard:** You know, I was convinced was the wrong way to do it. And so, yeah, for years, people were really focused on getting better zero shot and few shot. And it wasn't until this key idea of like, well, let's take the ULM fit approach. But for step two, So rather than fine tuning on a kind of a domain corpus, let's fine tune on an instruction corpus. And then in step three, rather than fine tuning on a reasonably specific task classification, let's fine tune on a RLHF task classification.

**[0:17:01] Jeremy Howard:** And so that was really key, you know. So I was kind of like out of the NLP field for a few years there because, yeah, it just felt like, I don't know, pushing uphill against this vast tide, which I was convinced was not the right direction, but who's going to listen to me? Because as you said, I don't have a PhD, not at a university, or at least I wasn't then. I don't have a big set of computers to fine tune huge transformer models.

**[0:17:28] Jeremy Howard:** So yeah, it was definitely difficult. It's always been hard. I've always been somebody who does not want to build stuff on lots of big computers because is most people don't have lots of big computers. And I hate creating stuff that most people can't use. And also stuff that's created on lots of big computers has always been much more media friendly. So it might seem like a recent thing, but actually throughout my 30 years in data science, the attention's always been on the big ION results.

**[0:17:58] Jeremy Howard:** So when I first started, everybody was talking about data warehouses and it was all about Teradata. And it'd be like, oh, this big bank has this huge room full of computers and they have like terabytes of data available, you know, the press of a button. And yeah, that's always what people want to talk about, what people want to write about. And then of course, students coming out of their PhDs and stuff, that's where they want to go work because that's where they read about.

**[0:18:22] Jeremy Howard:** And to me, it's a huge distraction, you know, because like I say, most people don't have unlimited compute and I want to help most people, not the small subset of the most well-off people. That's awesome. And it's great to hear,

**[0:18:38] Alessio Fanelli:** you know, you do such a great job educating that a lot of times you're not telling your own story. You know, I love this conversation. And the other thing before we jump into Fast.ai, actually, you know, a lot of people that I know, they run across a new architecture and one other, like, I got to start a company and raise a bunch of money and do all of this stuff. Instead, you were like, I want everybody to have access to this.

**[0:18:58] Alessio Fanelli:** Why was that the case for you? Was it because you already had like a successful, you know, venture and like fast mail and you were more interested in that,

**[0:19:06] Jeremy Howard:** what was the reasoning? That's a really good question. I guess the answer is yes. It is. That's the reason why. When I was a teenager, I thought it would be really cool to like have my own company. You know, I didn't know the word startup. I didn't know the word entrepreneur. I didn't know the word VC. And I didn't really know what any of those things were really until after we started Kaggle, to be honest, even though I had started to what would now call startups, I just thought they were just small businesses.

**[0:19:31] Jeremy Howard:** You know, they were just companies. So yeah, so those two companies were Fastmail and Optimal Decisions. Fastmail was the first kind of synchronized email provider for non-businesses. So something you can get your same email at home, on your laptop, at work, on your phone, whatever. And then Optimal Decisions invented a new approach to insurance pricing, something called profit-optimized insurance pricing. So I saw both of those companies, you know, after 10 years. and at that point I had achieved the thing that as a teenager I wanted to do you know it took a lot longer than it should have because I spent way longer in management consulting than I should have because I got caught up in that stupid

**[0:20:07] Jeremy Howard:** rat race but you know eventually I got there and I remember my mom saying to me oh you must be so proud you know because she remembered my dream she's like you've done it and I kind of reflected and I was like I'm not I'm not proud at all you know like people quite like fast mail you know it's quite nice to have synchronized email It probably would have happened anyway. Yeah, I'm certainly not proud that I've helped some insurance companies suck more money out of their customers.

**[0:20:32] Jeremy Howard:** I haven't really helped the world very much. You know, maybe in the insurance case, I've made it a little bit worse. So yeah, I was determined to not waste more years of my life working hard to do things which I could not be reasonably sure would have a lot of value. You know, I took some time off. I wasn't sure if I'd ever work again, actually. I didn't particularly want to because it felt like, yeah, it felt like such a disappointment.

**[0:20:54] Jeremy Howard:** But, you know, and I didn't need to. I had enough money. Like I wasn't super rich, but I had enough money. I didn't need to work. And I certainly recognized that amongst the other people I knew who had enough money that they didn't need to work. They all worked ridiculously hard, you know, and constantly put themselves in extremely stressful situations. And I thought, I don't want to be one of those idiots who's tied to buying a bigger plane than the next guy or whatever.

**[0:21:18] Jeremy Howard:** You know, Kaggle came along and I mainly kind of did that just because it was fun and interesting and got to hang out with interesting people. But with Fast.ai in particular, Rachel and I had a very explicit, long series of conversations over a long period of time about like, well, how can we be the most helpful to society as a whole and particularly to those people who maybe need more help? And so we definitely saw the world going in a potentially pretty dystopian direction if the world's most powerful technology was controlled by a small group of elites.

**[0:21:51] Jeremy Howard:** So we thought, yeah, we should focus on trying to help that not happen. You know, sadly, it looks like it still is likely to happen, but I feel like we've helped make it a little bit less likely. So we've done our bit.

**[0:22:00] swyx:** You've shown that it's possible. And I think your constant advocacy, your courses, your research that you published, you know, just the other day you published a finding on learning that I think is still something that people are still talking about quite a lot. I think that that is the origin story of a lot of people who are going to be, you know, little Jeremy Howard's thundering your mission with, you know, you don't have to do everything

**[0:22:23] Jeremy Howard:** by yourself is what I'm saying. No, definitely. Definitely. You know, that was a big takeaway from like analytic was analytic. It definitely felt like we had to do everything ourselves. And I kind of, I wanted to solve medicine. I was like, yeah, okay. Solving medicine is actually quite difficult. I can't do it on my own. And there's a lot of other things I'd like to solve and I can't do those either. So that was, that was definitely the other piece was like, yeah, you know, can we create an army of passionate domain experts who can change their little part of the world.

**[0:22:49] Jeremy Howard:** And that's definitely happened. Like I find nowadays, at least half the time, probably quite a bit more that I get in contact with somebody who's done really interesting work in some domain. Most of the time I'd say, they say, yeah, I got my start with Fast.ai. So it's definitely, I can see that. And I also know from talking to folks at places like Amazon and Adobe and stuff, which, you know, there's lots of alumni there and they say, oh my God, I got here and like half of the people are Fast.ai alumni.

**[0:23:15] Jeremy Howard:** It's fantastic. Yeah. Actually, Andre Capathy grabbed me when I saw him at NeurIPS a few years ago. And he's like, I have to tell you, thanks for the Fast.ai courses. When people come to Tesla and they need to know more about deep learning, we always send them to your course. And the OpenAI Scholars Program was doing the same thing. So it's kind of like, yeah, it's had a surprising impact. That's just one of like three things we do is the course.

**[0:23:38] Jeremy Howard:** And it's only ever been at most two people, either me and Rachel or me and Silvair. Nowadays, it's just me. So yeah, I think it shows you don't necessarily need a huge amount of money and a huge team of people to make an impact.

**[0:23:50] swyx:** Yeah. So just to reintroduce Fast.ai for people who may not have dived into it much, there is the courses that you do. There is the library that is very well-loved. And I kind of think of it as a nicer layer on top of PyTorch that people should start with by default and use it as the basis for a lot of your courses. And then you have NBDev, which I don't know, is that the third one?

**[0:24:11] swyx:** Oh, so the three areas were research, software, and courses.

**[0:24:15] Jeremy Howard:** Oh, sorry. I was going to invite you in terms of software. So then in software, FastAI is the main thing, but NB Dev is not far behind. But then there's also things like FastCore, GHAPI. I mean, dozens of open source projects that I've created, and some of them have been pretty popular, and some of them are still a little bit hidden, actually. Some of them I should try to do a better job of telling people about.

**[0:24:39] Jeremy Howard:** What are you thinking about? What's on the post-mine window? I don't know, just like little things. Like for example, for working with EC2 on AWS, I created a fast EC2 library, which I think is like way more convenient and nice to use than anything else out there. Okay. And it's literally got a whole auto-complete, dynamic auto-complete that works both on the command line and in notebooks that'll like auto-complete your instance names and everything like that.

**[0:25:01] Jeremy Howard:** You know, just little things like that. When I work with some domain, I want to make it as enjoyable as possible for me to do that. So I always try to kind of like, like with GH API, for example, I think that GitHub API is incredibly powerful, but I didn't find it good to work with because I didn't particularly like the libraries that are out there. So like GH API, like Fast EC2, it like auto completes both at the command line or in a notebook or whatever, like literally the entire GitHub API.

**[0:25:28] Jeremy Howard:** The entire thing is like, I think it's like less than 100k of code because it's actually, as far as I know, the only one that grabs it directly from the official open API spec that GitHub produces. It's amazing. And like if you're in GitHub and you just type an API, you know, autocomplete API method and hit enter, it prints out the docs or the brief docs and then gives you a link to the actual documentation page.

**[0:25:55] Jeremy Howard:** You know, GitHub Actions, I can write now in Python, which is just so much easier than writing them in TypeScript and stuff.

**[0:26:01] swyx:** So, you know, just little things like that. I think that's an approach that I wish more developers took to publish some of their work along the way. You described the third arm of Fast.ai as research. It's not something I see often. Obviously, you do do some research. And how do you run your research? What are your research interests?

**[0:26:18] Jeremy Howard:** Yeah, so research is what I spend the vast majority of my time on. The artifacts that come out of that are largely software and courses. So to me, the main artifact shouldn't be papers because papers are things read by a small exclusive group of people. To me, the main artifacts should be something teaching people, here's how to use this insight and here's software you can use that builds it in. So I think I've only ever done three first-person papers in my life.

**[0:26:44] Jeremy Howard:** And none of those are the ones I wanted to do. They were all ones. So one was ULM fit where Sebastian Ruder reached out to me after seeing the course and said, you have to publish this as a paper. And he said, I'll write it. And he said, I want to write it because if I do, I can put it on my PhD and that would be great. And it's like, okay, well, I want to help you with your PhD.

**[0:27:04] Jeremy Howard:** And that sounds great. So one was the masks paper, which just had to exist and nobody else was writing it. And then the third was the FastAI library paper, which again, somebody reached out and said, please write this. We will waive the fee for the journal and everything and help you get it through publishing and stuff. Other than that, I've never written a first author paper. So the research is like, well, so for example, you know, Dawnbench was a competition which Stanford ran a few years ago.

**[0:27:34] Jeremy Howard:** It was kind of the first big competition of like who can train neural nets the fastest rather than the most accurate. And specifically it was who can train ImageNet the fastest. And this was like one of these things where it was created by necessity. So Google had just released their TPUs. TPUs. And so I heard from my friends at Google that they'd put together this big team to smash Dawn Bench so that they could prove to people that they had to use Google Cloud and use their TPQs and show how good their TPUs were.

**[0:28:04] Jeremy Howard:** And we kind of thought, oh shit, this would be a disaster if they do that, because then everybody's going to be like, oh, deep learning is not accessible. You know, to actually be good at it, you have to be Google and you have to use special silicon. And so, you know, we only found out about this 10 days before the competition finished, But, you know, we basically got together an emergency bunch of our students and Rachel and I and sat for the next 10 days and just tried to crunch through, try to use all of our best ideas that have come from our research.

**[0:28:31] Jeremy Howard:** And so particularly progressive resizing, just basically train mainly on small things, train on non-square things, you know, stuff like that. And so, yeah, we ended up winning. Thank God. and so you know we turned it around from being like uh like oh shit you know this is going to show that you have to be google and have tpus to being like oh my god even the little guy can do deep learning so that's an example of the kind of like research artifacts we do and oh yeah so all of my research is always how do we do more with less you know so how do we get better results with less data with less compute with less complexity with

**[0:29:06] Jeremy Howard:** less education you know stuff like that so So ULM fits obviously a good example.

**[0:29:12] swyx:** And most recently you published, Can LLMs Learn from a Single Example? Maybe could you tell the story a little bit behind that? And maybe that goes a little bit too far into the learning on very low resource literature.

**[0:29:25] Jeremy Howard:** Yeah. Me and my friend, John O. Whittaker, basically had been playing around with this fun Kaggle competition, which is actually still running as we speak, which is, can you create a model which can answer multiple choice questions about anything that's in Wikipedia. And the thing that makes it interesting is that your model has to run on Kaggle within nine hours. And Kaggle's very, very limited. So you've only got 14 gig RAM, only two CPUs and a small, very old GPU.

**[0:29:58] Jeremy Howard:** So this is cool, you know, if you can do well at this, and this is a good example of like, oh, you can do more with less. So yeah, Jono and I were playing around with fine tuning, of course, transfer learning, pre-trained language models. And so we always, you know, plot our losses as we go. So here's another thing we created, actually, Sylvain Guzher, when he worked with us, created called Fast Progress, which is kind of like TQEDM, but we think a lot better.

**[0:30:21] Jeremy Howard:** So we look at our fast progress curves, and they kind of go down down, a little bit, little bit, little bit, and then suddenly go clunk, they drop, and then down down a little bit, and then suddenly clunk, they drop. We're like, what the hell, these clunks are occurring at the end of each epoch. So, you know, I've seen this before. It's always been a bug. It's always turned out that like, oh, we accidentally forgot to turn on eval mode during the validation set.

**[0:30:43] Jeremy Howard:** So I was actually learning then, or we accidentally letting moving average statistics throughout the epoch. So, you know, so it's recently moving average or whatever. And so we were using Hugging Face Trainer. So, you know, I did not give my friends at Hugging Face the benefit of the doubt. I thought, oh, they fucked up Hugging Face Trainer, You know, idiots. Well, you'll use the Fast.ai Trainer instead. So we switched over to Learner. We still saw the clunks.

**[0:31:06] Jeremy Howard:** And, you know, that's, yeah, it shouldn't really happen because semantically speaking in the epoch, it's not a thing. You know, like, well, nothing's meant to happen when you go from ending one epoch to starting the next one. So there shouldn't be a clunk, you know. So I kind of asked around on the open source discords, that's like, what's going on here? And everybody was just like, oh, that's just what these training curves look like. Ours all look like that.

**[0:31:29] Jeremy Howard:** don't worry about it. And I was like, oh, are you all using Trainer? Yes. Oh, well, there must be some bug with Trainer. And I was like, well, we also saw it in Learner. And somebody else is like, no, we've got our own Trainer. We get it as well. They're just like, don't worry about it. It's just something we see. It's just normal. I can't do that. I can't just be like, here's something that's like in the previous 30 years of neural networks, nobody ever saw it.

**[0:31:50] Jeremy Howard:** And now suddenly we see it. So don't worry about it. I have to know why.

**[0:31:54] swyx:** Can I clarify? Was everyone that you were talking to, were they all seeing it for the

**[0:31:57] Jeremy Howard:** same data set or in different data sets? They were different data sets, different trainers. They're just like, no, this is just what it looks like when you fine tune language models. Don't worry about it. You know? And you've never seen this before. I hadn't seen it before, but I'd been kind of like, as I say, you know, I kept working on them for a couple of years after ULM fit. And then I kind of moved on to other things, partly out of frustration.

**[0:32:17] Jeremy Howard:** So I hadn't been fine tuning. I mean, Lama's only been out for a few months, right? But I wasn't one of those people who jumped straight into it, you know? So I was relatively new to the kind of Lama fine tuning world or else these guys had been, you know, doing it since day one. It was only a few months ago, but it's still quite a bit of time. So yeah, they're just like, no, this is all what we see.

**[0:32:36] Jeremy Howard:** Don't worry about it. So yeah, I've got a very kind of like, I don't know, I've just got this brain where I have to know why things are. And so I asked people like, well, why do you think it's happening? And they'd be like, oh, it would be pretty obviously because it's like, memorize the data set. It's just like, that can't be right. It's only seen it once. Like, look at this the loss has dropped by 0.3 0.3 which is like basically it knows the answer they're like no no it's just it is it's just memorize the data set jonah and i did not discover this and jonah and i did not come up with a hypothesis you

**[0:33:07] Jeremy Howard:** know i guess we were just the ones i guess we'd been around for long enough to recognize it like this isn't how it's meant to work and we went back and like okay let's just run some experiments you know because nobody seems to have actually published anything about this well it's not quite true some people have published things, but nobody ever actually stepped back and said, like, what the hell? You know, how can this be possible?

**[0:33:25] Jeremy Howard:** Is it possible? Is it what's happening? And so, yeah, we created a bunch of experiments where we basically predicted ahead of time. It's like, okay, if this hypothesis is correct, that it's memorizing the training set, then we ought to see blah, under conditions blah, but not under these conditions. And so we ran a bunch of experiments and all of them supported the hypothesis that it was memorizing the data set in a single thing at once. And it's a pretty big data set, which in hindsight, it's not totally surprising because the theory, remember, of the ULM fit theory was like, well, it's kind of creating all these latent capabilities to make it easier for it to predict the next token.

**[0:33:59] Jeremy Howard:** So if it's got all this kind of latent capability, it ought to also be really good at compressing new tokens because it can immediately recognize it as like, oh, that's just a version of this. It's not so crazy. It requires us to rethink everything. And nobody knows. Okay, so how do we fine-tune these things? Because it doesn't even matter. Maybe it's fine that it's memorized the data set after one go, and you do a second go, and okay, the validation loss is terrible because it's now really overconfident.

**[0:34:27] Jeremy Howard:** That's fine. I keep telling people, don't track validation loss, track validation accuracy, because at least that will still be useful. Which is another thing that's got lost since ULM fit. Nobody tracks accuracy of language models anymore. But it'll still keep learning, and it does. It does keep improving. But is it worse? You know, like, is it like, now that it's kind of memorized it, it's probably getting a less strong signal, you know? So I still don't know how to fine tune language models properly.

**[0:34:52] Jeremy Howard:** And I haven't found anybody who feels like they do. Like nobody really knows whether this memorization thing is, it's probably a feature in some ways. There's probably some things that you can do usefully with it. But yeah, I have a feeling it's messing up training dynamics as well.

**[0:35:06] swyx:** It doesn't come at the cost of catastrophic forgetting as well, right? Like, which is the other side of the coin.

**[0:35:11] Jeremy Howard:** It does. to some extent. Like we know it does, like look at CodeLama, for example. So CodeLama is like 500 billion token fine tuning of Lama 2 using code and also pros about code that Meta did. Honestly, they kind of blew it because CodeLama is good at coding, but it's bad at everything else. Okay. You know, and it used to be good. Before they released it, me and lots of people in the open source discords were all like, oh my God, you know, we know this is coming.

**[0:35:36] Jeremy Howard:** Jan Lekun's saying it's coming. I hope they kept at least like 50 % non-code data because otherwise it's going to forget everything else. And they didn't. Only like 0.3 % of their epochs were non-code data. So it did. It forgot everything else. So now it's good at code and it's bad at everything else. It's fixable. So we definitely have catastrophic forgetting. It's fixable. Just somebody has to spend their time training a model on a good mix of data.

**[0:36:01] Jeremy Howard:** Like, okay, so here's the thing. Even though I originally created the three-step approach that everybody now does, my view is it's actually wrong and we shouldn't use it. And that's because people are using it in a way different to why I created it. You know, I created it thinking that the task-specific models would be more specific. You know, it's like, oh, this is like a sentiment classifier. This is an example of a task. But the tasks now are like a, you know, RLHF, which is basically like answer questions that make people feel happy about your answer.

**[0:36:30] Jeremy Howard:** So that's a much more general task. And it's a really cool approach. And so we see, for example, RLHF also breaks models like GPT-4, RLH-DEFT. We know from kind of the work that Microsoft did, you know, the earlier less aligned version was better. And these are all kind of examples of catastrophic forgetting. And so to me, the right way to do this is to actually throw away the idea of fine tuning. There's no such thing.

**[0:36:53] Jeremy Howard:** There's only continued pre-training. And pre-training is something where from the very start, you try to include all the kinds of data that you care about, all the kinds of problems that you care about. instructions, exercises, code, general purpose document completion, whatever. And then as you train, you gradually curate that. You know, you gradually make that higher and higher quality and more and more specific to the kinds of tasks you want it to do. But you never throw away any data.

**[0:37:20] Jeremy Howard:** You always keep all of the data types there in reasonably high quantities. You know, maybe the quality filter, you stop training on low quality data, because that's probably fine to forget how to write badly. So yeah, that's now my view is I think ULM fit is the wrong approach. And that's why we're seeing a lot of these, you know, so-called alignment hacks and this view of like, oh, a model can't both code and do other things.

**[0:37:45] Jeremy Howard:** And, you know, I think it's actually

**[0:37:46] Alessio Fanelli:** because people are training them wrong. I think you have a clear anti-laziness approach. I think other people are not as good-hearted, you know, they're like, hey, they told me this thing works. and if I release a model this way, people will appreciate it. I'll get promoted and I'll kind

**[0:38:02] Jeremy Howard:** of make more money. Oh, absolutely. Yeah. And it's not just money. It's like, this is how citations work most badly. So if you want to get cited, you need to write a paper that people in your field recognize as an advancement on things that we know are good. And so we've seen this happen again and again. So like I say, like zero shot and few shot learning, everybody was writing about that. or you know with um image generation every everybody just was writing about GANs and I was trying to say like no GANs are not the right approach you know and I showed again through research that we demonstrated in our videos that you can do better than GANs much

**[0:38:39] Jeremy Howard:** faster and with much less data and nobody cared because again like if you want to get published you write a GAN paper that slightly improves this part of GANs in this tiny field you'll get published you know So it's, yeah, it's not set up for real innovation. Again, it's really helpful for me, you know, I have my own research lab with nobody telling me what to do and I don't even publish, so it doesn't matter if I get citations.

**[0:39:04] Jeremy Howard:** So I just write what I think actually matters. And, you know, and actually places like OpenAI, you know, the researchers there can do that as well. It's a shame, you know, I wish there was more academic open venues in which people can focus on like genuine innovation.

**[0:39:20] swyx:** Twitter, which is unironically has become a little bit of that. I wanted to follow up on one thing that you mentioned, which is that you checked around the open source discords. I don't know if it's a pusher to ask what discords are lively or useful right now. I think that something I definitely felt like I missed out on was the early days of Luther AI, which is a fair hard bid. And what is the new Luther?

**[0:39:46] swyx:** And you actually shouted out the Alignment Lab AI Discord in your blog post. And that was the first time I even knew. I saw them on Twitter. I never knew they had a Discord. Never knew that there was actually substantive discussions going on in there. And that you were an active member of it.

**[0:39:59] Jeremy Howard:** Okay, yeah. And then even then, if you do know about that and you go there, it'll look like it's totally dead. And that's because, unfortunately, nearly all the Discords, nearly all of the conversation happens in private channels.

**[0:40:09] swyx:** How does someone get into that world? Because it's obviously very, very destructive, right?

**[0:40:15] Jeremy Howard:** You could just come to the FastAI Discord, which I'll be honest with you, it's less bustling than some of the others, but it's not terrible. And so like, to be fair, one of Emma's bustling channels is private.

**[0:40:29] swyx:** This is the nature of quality discussion, right?

**[0:40:31] Jeremy Howard:** yeah i guess when i think about it like i didn't have any private discussions on our discord for years but there was a lot of people who came in with like oh i just had this amazing idea for agi however if you just thought about like if you imagine the ai is a brain and we you know this just i don't want to talk about it you know i don't want to like maybe you don't want to be dismissive whatever and it's like oh but that's an interesting comment but maybe you should like try training some models first to see if that aligns with your intuition like oh but how can I possibly learn?

**[0:41:01] Jeremy Howard:** It's like, well, we have a course to actually spend time learning. And it's like, okay, I know the people who always have good answers there. And so I created a private channel and put them all in it. And I got to admit, that's where I post more often because there's much less, you know, flight of fancy views about how we could solve AGI, blah, blah, blah. So there is a bit of that. But having said that, like, I think the bar is pretty low.

**[0:41:23] Jeremy Howard:** like if you join a discord and you can hit the like participants or community or whatever button you can see who's in it and you'll see at the top who who the admins or moderators or people in the dev role are just dm one of them and say like oh i here's my github or here's some blog posts i wrote you know i'm interested in talking about this you know can i join the private channels and i've never heard of anybody saying no i will say you know aloof is all pretty open so you can do the Eleuther Discord still.

**[0:41:54] Jeremy Howard:** You know, one problem with the Eleuther Discord is it's been going on for so long that it's like, it's very inside baseball. It's hard to join as newcomer. It's quite hard to get started. Carpa AI. Oh. Looks, I think it's all open. That's more accessible. Yeah. There's also just recently Naus Research that does like the Hermes models and data set just opened. They've got some private channels, but it's pretty open, I think. You mentioned Alignment Lab, that one it's all the interesting stuff is on private channels so just ask if you know me ask me because i've got admin on that one there's also yeah uh os skunkworks os skunkworks ai there's a good discord which i think it's open

**[0:42:36] Jeremy Howard:** so they're yeah they're all pretty good i don't

**[0:42:40] swyx:** want you to leak any discords that don't want any publicity but no i mean this is all helpful

**[0:42:43] Jeremy Howard:** we all want people we just want people who like want to build stuff exactly yeah and like it's fine to not know anything as well. But if you don't know anything, but you want to tell everybody else what to do and how to do it, that's annoying. If you don't know anything and want to be told, like, here's a really small kind of task that as somebody who doesn't know anything, it's going to take you a really long time to do, but it would still be helpful.

**[0:43:05] Jeremy Howard:** And then you go and do it. That would be great. The truth is maybe 5 % of people who come in with great enthusiasm and saying that they want to learn and they'll do anything. And then somebody says like, okay, here's some work you can do. Almost nobody does that work. So if you're somebody who actually does the work, follows up, you will massively stand out. That's an extreme rarity and everybody will then want to help you do more work.

**[0:43:28] Jeremy Howard:** So yeah, so just do work and people will want to support you.

**[0:43:32] Alessio Fanelli:** Our Discord used to be referral only for a long time. We didn't have a public invite and then we opened it and they're kind of like channel gating. I remember it used to be like, you know, a forum a moderator it's like people just want to do like drive-by posting you know i'm like they don't want to help the community they just want to get the question answered i mean the funny thing is our

**[0:43:50] Jeremy Howard:** um our forum community does not have any of that garbage you know there's something specific about the low latency thing there are people like expect an instant answer and yeah we're somehow in a forum thread where they know it's like there forever people are a bit more thoughtful but then And the forums are less active than they used to be because Discord has got more popular, you know. So it's all a bit of a compromise. You know, running a healthy community is, yes, it's always a bit of a challenge.

**[0:44:22] Alessio Fanelli:** All right. We got so many more things we want to dive in, but I don't want to keep you here for hours. This is not the Lex Friedman podcast we always like to say. One topic I would love to maybe chat a bit about is Mojo, Modular, you know, Crystal Liner nominally you on the podcast. So we want to spend a little time there. you recently did a hacker's guide to language models and you ran through everything from quantized model to like smaller models, larger models and all of that.

**[0:44:47] Alessio Fanelli:** But obviously modular is taking its own approach. Yeah. What got you excited? I know you, Chris, have been talking about this for like years and a lot of the ideas you had. So yeah yeah, absolutely.

**[0:44:58] Jeremy Howard:** So I met Chris, I think it was at the first TensorFlow Dev Summit. I'm not sure if he'd even officially started his employment with Google at that point. So I don't know, you know, certainly nothing had been mentioned. So I, you know, I admired him from afar with LLVM and Swift and whatever. And so I saw him walk into the courtyard at Google. It's just like, oh shit, man, that's Chris Latner. I wonder if he would lower his standards enough to talk to me.

**[0:45:26] Jeremy Howard:** Was worth a try. So I got up my carriage because like nobody was talking to him. He looked a bit lost and I wandered over and it's like oh you're chris latner right it's like what are you doing here and i was like yeah yeah i am it's like oh and jeremy howard it's like oh you do some of this ai stuff and i was like yeah yeah i like this ai stuff are you doing ai stuff it's like well i'm thinking about starting to do some ai stuff yeah i think it's going to be cool oh so like i spent the next half hour just basically brain dumping all the ways in which ai was stupid to him and

**[0:45:55] Jeremy Howard:** he listened patiently and i thought he probably wouldn't even remember or care or whatever but yeah then i kind of like i guess i we caught up with him a few months later and it's like, I've been thinking about everything you said in that conversation. And he narrated back his response to every part of it, the projects he was planning to do. And it's just like, oh, this dude follows up. Holy shit. And I was like, wow, okay.

**[0:46:16] Jeremy Howard:** And he was like, yeah, so we're going to create this new thing called Swift for TensorFlow. And it's going to be like, it's going to be a compiler with auto differentiation built in and blah, blah, blah. And I say, wait, why would that help? And he was like, okay, with a compiler during the forward pass. You don't have to worry about saving context, you know, because a lot of be optimized in the backward. But I was like, oh my God, because I didn't really know much about compilers.

**[0:46:39] Jeremy Howard:** You know, I spent enough to kind of like understand the ideas, but it hadn't occurred to me that a compiler basically solves a lot of the problems we have as end users. I was like, wow, that's amazing. Okay. You do know, right, that nobody's going to use this unless it's like usable. It's like, yeah, I know. Right. So I was thinking you should create like a Fast.ai for this okay i but i don't even know swift and it's like well why don't you start learning it and if you have any questions ask me it's just like holy shit like not only has chris latner lowered his standards enough to talk to me but he's offering me personal programming language

**[0:47:15] Jeremy Howard:** that he made so i was just like i'm not going to let him down so i spent like the next two months like just nerding out on swift and it was just before christmas that i kind of like started writing down what I'd learned. And so I wrote a couple of blog posts on like, okay, this is like my attempt to do numeric programming in Swift. And these are all the challenges I had. And these are some of the issues I had with making things properly performant.

**[0:47:40] Jeremy Howard:** And here are some libraries I wrote. And I sent it to Chris and I was like, I hope he's not too disappointed with me, you know, because that would be the worst. I hope he doesn't dislike the fact that I, you know, didn't love everything. And yeah, he was like, oh, thanks for sending me that. Let's get on a call and talk about it. And we spoke and he was like, this is amazing. I can't believe that you made this.

**[0:48:00] Jeremy Howard:** This is exactly what Swift needs. And he was like, and so like somebody set up like a new Swift, I can't remember what they call them, the equivalent of a PEP, you know, kind of RFC thing of like, oh, you know, let's look at how we can implement Jeremy's ideas in the language. And it's just like, oh, wow. So, you know, and then we ended up like literally teaching some lessons together about Swift for TensorFlow. And we built a Fast.ai kind of equivalent with him and his team.

**[0:48:26] Jeremy Howard:** It was so much fun. Then in the end, Google didn't follow through, which is fair enough. Asking everybody to learn a new programming language is going to be tough, but it was very obvious, very, very obvious at that time that TensorFlow 2 was going to be a failure. This felt like, okay, what are you going to do? You can't focus on TensorFlow 2 because it's not working. It's never going to work. Nobody at Google is using it internally.

**[0:48:50] Jeremy Howard:** so you know in the end chris left you know swiffer tensorflow got archived there was no backup plan so i kind of felt like google was kind of screwed you know and chris went and did something else but we kept talking and i was like look chris you know you've got to be your own boss man because like you know you've got the ideas you know like only you've got the ideas you know and if your ideas are implemented we'd all be so much better off because like python's the best of a whole bunch of shit you know like it's amazing but it's awful you know compared to what it could be and anyway so eventually a few years later

**[0:49:23] Jeremy Howard:** he called me up and he's like jeremy i've taken your advice i've started a company that's like oh my god so we're going to create a new language we're going to create a new infrastructure it's going to have all the stuff we've talked about and it's like oh wow so uh that's what modular is and so mojo is like building on all the stuff that chris has figured it out over i mean really from when he did his phd thesis which developed llvm onwards you know in swift and mlir you know the tensorflow runtime engine which is very good you know that was something that he built and has lasted so yeah i'm pumped about that i mean it's very

**[0:49:59] Jeremy Howard:** speculative creating a whole new language is tough i mean chris has done it before and he's created a whole c++ compiler amongst other things looking pretty hopeful i mean i hope it works because uh you told them to quit his job so but i mean in the meantime i will say you know google now does have a backup plan you know they have jacks which was never a strategy it was just a bunch of people who also recognized tensorflow 2 as shit and they just decided to build something else and for years my friends in that team were like don't tell anybody about us because we you know we don't want to be anything but a research project so now

**[0:50:34] Jeremy Howard:** these poor guys suddenly they're the great white hope for Google's future. And so JAX is, you know, also not terrible. It's still written in Python. Like, it would be cool if we had all the benefits of JAX, but in a language that was designed for those kind of purposes. So, you know, fingers crossed that Mojo turns out great.

**[0:50:53] Alessio Fanelli:** Yeah. Any other thoughts on when, where people should be spending their time? So that's more the kind of language framework level than you have the, you know, GGML, some of these other, like quantization focused kind of model level things. Then you got the hardware people. It's like a whole other bucket. Yeah. What are some of the exciting stuff that you're excited about?

**[0:51:13] Jeremy Howard:** Well, you won't be surprised to hear me say this, but I think fine tuning transfer learning is still a hugely underappreciated area. So today's zero shot, few shot learning equivalent is retrieval augmented generation, you know, correct? Which is like, just like few shot learning is a thing. Like it's a real thing. It's a useful thing. it's not a thing anybody would want to ignore. Why are people not spending at least as much effort on fine tuning?

**[0:51:40] Jeremy Howard:** Because RAG is such an inefficient hack, really, isn't it? It's like, segment up my data in some somewhat arbitrary way, embed it, ask questions about that, you know, hope that my embedding model embeds questions in the same embedding spaces of paragraphs, which obviously is not going to if your question is like, if I've got a whole bunch of archive papers embeddings. And I asked like, what are all the ways in which we can make inference more efficient?

**[0:52:10] Jeremy Howard:** The only paragraphs it'll find is like if there's a review paper that says here's a list of ways to make inference more efficient. Doesn't have any other specifics. No, it's not going to be like, oh, here's one way, here's one way, here's a different way in different papers, you know? Yeah, if you fine tune a model, then all of that information is getting directly incorporated into the weights of your model in a much more efficient and nuanced way.

**[0:52:33] Jeremy Howard:** And then you can use RAG on top of that. So I think that that's one area that's definitely underappreciated. And also the kind of like the confluence of like, okay, how do you combine RAG and fine tuning, for example?

**[0:52:45] swyx:** Something that I think a lot of people are uncertain about, and I don't expect you to know either, is that whether or not you can fine tune new information in. And I think that is the focus of some of your open questions and research.

**[0:52:58] Jeremy Howard:** But of course you can, right?

**[0:52:59] swyx:** Because it's additional pre-training.

**[0:53:01] Jeremy Howard:** Obviously you can, because there's no such thing as fine-tuning. There's only continued pre-training. Fine-tuning is pre-training. They're literally the same thing. So the knowledge got in there in the first place through pre-training. So how could continuing to pre-train not put more knowledge in? It's the same thing. The problem is just we're really bad at it because everybody's doing it dumb ways. So it's a good question. And it's not just new knowledge, but new capabilities.

**[0:53:26] Jeremy Howard:** You know, I think like in my Hackers Guide to LM talk, I show, it's funny, that's a simple example, because it doesn't sound it, but like taking a pre-trained base model and getting it to generate SQL. And it took 15 minutes to train on a single GPU. You know, I think that might surprise people that that capability is at your fingertips. And, you know, because it was already there, it's just latent in the base model.

**[0:53:51] Jeremy Howard:** Really pushing the boundaries of what you can do with small models, I think, is a really interesting question. Like, I mean, there isn't much in the way of good small models. A really underappreciated one is BTLM 3B, which is a kind of 7B quality 3B model. There's not much of the 1-2B range, sadly. There are some code ones. But the fact that there are some really good code ones in that 1-2B range shows you that that's a great size for doing complex tasks well.

**[0:54:20] swyx:** There was Phi1 recently, which has been the subject of a little bit of discussion about whether they're trained on benchmarks.

**[0:54:27] Jeremy Howard:** Yeah, and Phi1.5 as well. So that's not a good model yet. Why not? It's good at doing, so Phi1 in particular is good at doing a very specific thing, which is creating very small Python snippets. Okay, so like Phi1.5 has never read Wikipedia, for example. So it doesn't know who Tom Cruise is. It doesn't know who anybody is. He doesn't know about any movies. It doesn't really know anything about anything, because it's never read anything.

**[0:54:54] Jeremy Howard:** It was trained on a nearly entirely synthetic data set, which is designed for it to learn reasoning. And so it was a research project and a really good one. And it definitely shows us a powerful direction in terms of what you can do with synthetic data. And wow, gosh, even these tiny models can get pretty good reasoning skills, pretty good math skills, pretty good coding skills. But I don't know if it's a model you could necessarily build on.

**[0:55:20] Jeremy Howard:** Some people have tried to do some fine tunes of it. And again, they're like surprisingly good in some ways for a 1.5B model, but not sure you'd find it useful for anything.

**[0:55:31] swyx:** I think that's the struggle of pitching small models because small is great. You know, you don't need a lot of resources to run them, but the performance evaluation is always so iffy. It's always just like, yeah, it works on some things and, you know, we don't trust it for others.

**[0:55:45] Jeremy Howard:** Yeah, so that's why we're back to fine-tuning. Microsoft did create a 5.1 .5 web, but they didn't release it, unfortunately. I would say a 5.1 .5 web with fine-tuning for your task might solve a lot of tasks that people have in their day-to-day lives, particularly in an enterprise setting. I think there's a lot of repetitive processing that has to be done. And it's a useful thing for coders to know about because I think quite often you can like replace some thousands and thousands of lines of complex buggy code, maybe with the fine tune, you know.

**[0:56:18] Jeremy Howard:** Got it.

**[0:56:18] Alessio Fanelli:** And Jeremy, before we let you go, I think one question on top of a lot of people's minds. So you've done practical deep learning for coders in 2018, 19, 21, 22. I feel like the more time goes by, the more the GPUs get concentrated. If you're somebody who's interested in deep learning today and you don't want to go join OpenAI, you don't want to join Anthropic, what's like the best use of their time? Should they focus on, yeah, small model development?

**[0:56:44] Alessio Fanelli:** Should they focus on fine tuning math and all of that? Should they just like focus on making Ragnar a hack and coming up with a better solution? Yeah, what's a practical deep learning for coders 2024 gonna look like?

**[0:56:56] Jeremy Howard:** Yeah, I mean, good question. I'm trying to figure that out for myself. You know, like what should I teach? Because I definitely feel like things have changed a bit. But one of the ways in which things have changed is that coding is much more accessible now. So if you look at a lot of the folks in the kind of open source LLM community, they're folks who really hadn't coded before a year ago. And they're using these models to help them build stuff they couldn't build before, which is just fantastic, you know.

**[0:57:22] Jeremy Howard:** So one thing I kind of think is like, okay, well, we need a lot more material to help these people use this newfound skill they have because they don't really know what they're doing, you know, and they don't claim to, but they're doing it anyway. And I think that's fantastic. You know, so like, are there things we could do to help people, you know, bridge this gap? Because previously, you know, I know folks who were, you know, doing menial jobs a year ago, and now they're training language models thanks to the help of Codex and Copilot and whatever.

**[0:57:53] Jeremy Howard:** So, you know, yeah, what does it look like to like really grab this opportunity? maybe Fast.ai's goals can be dramatically expanded now to being like let's make coding more accessible you know all kind of ai oriented coding more accessible if so our course should probably look very different you know and we'd have to throw away that like oh you have to have at least a year of full-time programming as a prerequisite yeah what would happen if we got rid of that so that's kind of one thought that's in my head you know as to what should other people do.

**[0:58:24] Jeremy Howard:** Honestly, I don't think anybody has any idea, like the more I look at it, what's going on. I know I don't. You know, like we don't really know how to do anything very well. Clearly OpenAI do, like they seem to be quite good at some things. So they're talking to folks at or who have recently left OpenAI. Even there, it's clear there's a lot of stuff they haven't really figured out and they're just kind of like using recipes that they've noticed have been okay.

**[0:58:50] Jeremy Howard:** So yeah, we don't really know how to train these models well. We don't know how to fine tune them well. We don't know how to do RAG well. We don't know what they can do. We don't know what they can't do. We don't know how big a model you need to solve different kinds of problems. We don't know what kind of problems they can't do. We don't know what good prompting strategies are for particular problems. You know, somebody sent me a message the other day saying they've written something that is a prompting strategy for GPT-4.

**[0:59:15] Jeremy Howard:** They've written like 6 ,000 lines of Python code and it's to help it play chess. And then they've said they've had it play against other chess engines, including the best stock fish engines. And it's got an ELO of 3 ,400. Oh my God. Which would make it close to the best chess engine in existence. And I think this is a good example of like, people were saying like GPT-4 can't play chess. I was sure that was wrong.

**[0:59:41] Jeremy Howard:** I mean, obviously it can play chess, but the difference between like, with no prompting strategy, it can't even make legal moves. With good prompting strategies, it might be just about the best chess engine in the world, far better than any human player. So yeah, I mean, we don't really know what the capabilities are yet. So I feel like it's all blue sky at this point. It feels like computer vision in 2013 to me, which was like in 2013 computer vision.

**[1:00:06] Jeremy Howard:** We just had the AlexNet. We've had AlexNet. We've had VGGNet. It's around the time Xyla and Fergus. No, it's probably before that so we hadn't yet had the xyler and fergus like oh this is actually what's going on inside the layers so you know we don't actually know what's happening inside these transformers we don't know how to create good training dynamics we don't really know anything much and there's a reason for that right and the reason for that is language models suddenly got really useful and so the kind of economically rational thing to do like this is not a criticism this is true The economic rational thing to do is to like, okay, like build that as fast as possible,

**[1:00:45] Jeremy Howard:** you know, make something work, get it out there. And that's what, you know, OpenAI in particular did and Anthropic kind of did. But there's a whole lot of technical debt everywhere. You know, nobody's really figured this stuff out because everybody's been so busy building what we know works as quickly as possible. So yeah, I think there's a huge amount of opportunity to, you know, I think we'll find things can be made to work a lot faster a lot less memory i got a whole bunch of ideas i want to try you know every time i look at something closely like really closely i'm always like oh turns out this person actually had no idea what they're doing you know which

**[1:01:22] Jeremy Howard:** is fine like none of us

**[1:01:23] Alessio Fanelli:** know what we're doing we should experiment with that yes we had a tree down on the podcast who created flash attention and i asked them did nobody think of using sram before you like were people just like now and he was like yeah people just didn't think of it didn't try they didn't

**[1:01:41] Jeremy Howard:** come from like a systems background and yeah i mean the thing about flash attention is lots of people absolutely thought of that and so had i right but i mean the honest truth is particularly before triton everybody knew that tiling is the right way to solve anything and everybody knew that attention fused attention wasn't tiled and that was stupid but not everybody's got his ability to like be like oh well i i'm confident enough in cuda and or triton to use that insight to write something better you know and this is where like i'm super excited about mojo right i always talk to chris about flash attention because i'm like you know there is a thousand flash attentions out there

**[1:02:21] Jeremy Howard:** for us to build you just got to make it easy for us to build them so like triton definitely helps but it's still not easy you know it still requires kind of really understanding the GPU architecture, writing it in that kind of very CUDA-ish way. I think, you know, if Mojo or something equivalent can really work well, we're going to see a lot more flash attentions popping up.

**[1:02:44] Alessio Fanelli:** Great, Jaren. Before we wrap, we usually do a quick lightning round. We're going to have three simple questions. So the first one is around acceleration. And you've been in this field a long time. What's something that it's already here today in AI that you thought would take much longer?

**[1:02:58] Jeremy Howard:** I don't think anything. So I've actually been slightly too bullish. So in my 2014 TED Talk, I had a graph and I said, like, this is like the slope of human capabilities and this is the slope of AI capabilities. And I said, oh, we're, and I put a dot saying we are here. It was just before they passed. I looked back at the transcript the other day and I said, in five years, I think we might've crossed that threshold in which computers will be better at most human tasks than most humans or most average humans.

**[1:03:28] Jeremy Howard:** and so that might be almost true now for non-physical tasks so i was like took that twice as long so i thought it might no i wouldn't say anything surprised me too much it's still like definitely like i gotta admit you know i had a very visceral reaction using gpt4 for the first time not because i found it surprising but actually like actually doing it something i was pretty sure it exists by about now, maybe a bit earlier.

**[1:04:00] Jeremy Howard:** But actually using it definitely is different to just feeling like it's probably on its way, you know. And yeah, whatever GPT-5 looks like, I'm sure, I imagine I'll have the same visceral reaction, you know. It's really amazing to watch develop.

**[1:04:15] swyx:** We also have an exploration question. So what do you think is the most interesting unsolved

**[1:04:19] Jeremy Howard:** question in AI? How do language models learn? You know, what are the training dynamics? Like, I want to see, there was a great paper about ResNets a few years ago that showed how that was able to like plot a kind of projected three-dimensional loss surface for a ConvNet with and without skip connections. And, you know, you could very clearly see without the skip connections, it was super bumpy. And with the skip connections, it was super smooth.

**[1:04:48] Jeremy Howard:** That's the kind of work we need. Like, so there was actually an interesting blog post that came out just today from the pytorch team uh where some of them have created this like uh 3d matrix product visualization thing the metmode visualizer yeah yeah and they actually showed some nice nice examples of like a gpt2 attention layer and like showed an animation and said like if you look at this we can actually see a bit about what it's doing yeah again it reminds me of the xyla and fergus you know uh convnet paper that was the first one to do these reverse convolutions to show what what's actually being learned in each layer in a conf net.

**[1:05:23] Jeremy Howard:** Yeah, we need a lot more of this, like what is going on inside these models? How do they actually learn? And then how can we use those insights to help them to learn better? So I think that'd be one. The other exploration I'd really like to see is a much more rigorous analysis of what kind of data do they need, at what level, and when do they need it, and how often. So that kind of like data set mixing, curation, so forth, in order to get the best capabilities.

**[1:05:48] Jeremy Howard:** How much is Wikipedia? Very uncertain. Yeah. And as you fine tune, what kind of mix do you need for it to keep its capabilities? And what are the underlying capabilities that it most needs to keep? And if it loses those, it would lose all these other ones. And what data do you need to keep those? And other things we can do to change the loss function, to help it to not forget to do things, stuff like that.

**[1:06:11] Alessio Fanelli:** Awesome. And yeah, before wrapping, what's one message, one idea you want everyone to remember

**[1:06:17] Jeremy Howard:** and think about? I guess the main thing I want everybody to remember is that there's a lot of people in the world and they have a lot of diverse experiences and capabilities. They all matter. And now that we have a nearly powerful technology in our lives, we could think of that one of two ways. One would be, gee, that's really scary. What would happen if all of these people in the world had access to this technology?

**[1:06:44] Jeremy Howard:** Some of them might be bad people. Let's make sure they can't have it. Or one might be, wow, of all those people in the world, I bet a lot of them could really improve the lives of a lot of humanity if they had this tool. This has always been the case, you know, from the invention of writing to the invention of the printing press to the development of education. And it's been a constant battle between people who think that the distributed power is unsafe and it should be held on to by an elite few.

**[1:07:12] Jeremy Howard:** and people who think that humanity on net is a marvelous species, particularly when part of a society and a civilization and we should do everything we can to enable more of them to contribute. This is a really big conversation right now. And I want to see more and more people showing up and showing what the great unwashed masses out there can actually achieve, you know that actually regular people are going to do a lot of really valuable work and actually help us be more safe and also flourishing in our lives and providing a future for our children to flourish in if we lock things down to the people that we think you know the elites that we think can be

**[1:07:58] Jeremy Howard:** trusted to run it for us yeah i think all bets are off about where that leaves us uh as a society, you know.

**[1:08:05] Alessio Fanelli:** Yep. Now that's an important message. And yeah, that's why we've been promoting a lot of open source developers, open source communities. I think, Pella.

**[1:08:13] Jeremy Howard:** Good on you.

**[1:08:14] Alessio Fanelli:** Letting the builders build and explore. It's always a good idea. Thank you so much for coming on, Jeremy. This was great. Thank you for having me. Thank you. Thank you.
