If you take a model release as an anchor point, let’s say Nemotron 3 or Qwen 3.5, you can go in both directions: You can either plug them into an agent and play around with that, or you can look, okay, what does the model look like under the hood? What are the ingredients? What type of attention mechanism do they use? What are currently research techniques that could make that even better in the next generation of models? What can we swap out, basically? And I’m interested in both of these! Sebastian Raschka, Independent AI Researcher and author of Build a Large Language Model from Scratch, joins Hugo to talk about what’s changed in AI architecture, from post-training to hybrid models, and why understanding what’s under the hood matters more than ever for developers building in the agentic era. Sebastian’s upcoming book, Build a Reasoning Model from Scratch, currently available for pre-order on Amazon and in early access on Manning! Vanishing Gradients is a reader-supported publication. To receive new posts and support my work, consider becoming a free or paid subscriber. We Discuss: * Ed Tech for Agents: should we design educational content specifically for agentic systems, or is there a better approach? * Inference Scaling is the new frontier, driving “gold-level” performance during generation via parallel sampling and internal meta-judges; * Hybrid Architectures from Qwen 3.5 and Nemotron 3 scale almost linearly, making long-context agentic workflows significantly more affordable and performant; * Multi-head Latent Attention (MLA), developed by DeepSeek, wins the KV cache war by drastically reducing memory overhead without performance hits; * Agent Harnesses need to be continuously simplified as frontier models are post-trained on agent trajectories. Teams that don’t strip back their scaffolding risk the harness getting in the way of a more capable model. * “AI Psychosis”: the cognitive load of supervising self-supervising agents, and why we’re all conducting an orchestra we were never trained to conduct; * Sebastian’s AI Stack: a surprisingly simple setup (Mac mini, Codex, Ollama) with a ~20-item QA checklist, delegating the boring work to preserve energy for creative development; * Fine-tuning is now an economic decision, optimizing costs and latency for high-volume tasks where long system prompts outweigh a one-time training run; * Process Reward Models (PRMs) are the next frontier, verifying intermediate reasoning steps to solve “hallucination in the middle” for complex math and code tasks; * “Implementation Does Not Lie”: Sebastian’s layer-by-layer verification philosophy, comparing from-scratch builds against HuggingFace references to catch details invisible in papers; * Architecture Details dictate inference stack choices; nuances like RMSNorm stability or RoPE flavors are critical for optimal performance and troubleshooting; * The Distillation Loop drives open-weight parity, enabling specialized, “frontier-class” models by “pre-digesting” frontier outputs without multi-million dollar training risks. You can also find the full episode on Spotify, Apple Podcasts, and YouTube. You can also interact directly with the transcript here in NotebookLM: If you do so, let us know anything you find in the comments! Our flagship course Building AI Applications just wrapped its final cohort but we’re cooking up something new. If you want to be first to hear about it (and help shape what we build), drop your thoughts here. Links and Resources * Build a Reasoning Model (From Scratch): Sebastian’s new book, currently available for pre-order on Amazon and in early access on Manning. You’ll learn how reasoning LLMs actually work by starting with a pre-trained base LLM and adding reasoning capabilities step by step in code. A hands-on follow-up to Build a Large Language Model from Scratch. * LLM Architecture Gallery: Sebastian’s collection of architecture figures and fact sheets from his blog posts, updated with each major model release. A go-to visual reference for comparing what’s changed under the hood across model generations. * Sebastian Raschka on LinkedIn * Sebastian’s website * Ahead of AI (Sebastian’s Substack) * Build a Large Language Model from Scratch * PinchBench: OpenClaw Benchmark Leaderboard * DeepSeekMath-V2: Towards Self-Verifiable Mathematical Reasoning * Gated Delta Networks: Improving Mamba2 with Delta Rule (ICLR 2025) * DeepSeek-R1: Incentivizing Reasoning Capability in LLMs via Reinforcement Learning * Hugging Face Model Hub * Upcoming Events on Luma * Vanishing Gradients on YouTube A Bit More on Agent Harnesses * Components of A Coding Agent by Sebastian * How To Build An Agent that Builds its own Harness by Hugo and Ivan Leo (DeepMind, ex-Manus) * Build Your Own Deep Research Agent with Hugo & Ivan Leo (Google DeepMind, ex-Manus): In this livestream, you’ll learn how to build a production-grade agent harness from scratch in pure Python; * AI Agent Harness, 3 Principles for Context Engineering, and the Bitter Lesson Revisited with Lance Martin (Anthropic), Duncan Gilchrist (Delphina), and Hugo * The Post-Coding Era: What Happens When AI Writes the System? with Nicholas Moy (Google DeepMind), Duncan Gilchrist (Delphina), and Hugo * What is an Agent Harness? from What 300+ Engineers from Netflix, Amazon, and Instacart Asked About AI Engineering. How You Can Support Vanishing Gradients Vanishing Gradients is a podcast, workshop series, blog, and newsletter focused on what you can build with AI right now. Over 70 episodes with expert practitioners from Google DeepMind, Netflix, Stanford, and elsewhere. Hundreds of hours of free, hands-on workshops. All independent, all free. If you want to help keep it going: * Become a paid subscriber, from $8/month * Share this with a builder who’d find it useful * Subscribe to our YouTube channel. Thanks for reading Vanishing Gradients! This post is public so feel free to share it. Get full access to Vanishing Gradients at hugobowne.substack.com/subscribe
Audio and video play straight from the show's own hosting. PodSubs stores and serves no media.
Transcript
From the show. Tap a time to play from there.
SPEAKER_00if you take the working LLM architecture as an anchor point, let's say what came out last week, I think Nimotron 3 Super and maybe Gwenn 3.5. If you take like model releases like that as the anchor point, you can go in both directions. You can either plug them into an agent in one direction and play around with that. Or in the other direction, you can look, okay, what does the model look like under the hood? What are the ingredients? What type of attention mechanism do they use? Context length and so forth.
SPEAKER_00And then also you can think about, okay, what are currently research techniques that could be used to make that even better in the next generation? That was Sebastian Rajka, independent AI researcher, on what's currently exciting him the most. Taking LLM architectures as an anchor point and exploring in both directions,
SPEAKER_01plugging models into agents and looking under the hood at what's changed. along with rebuilding them from scratch. Sebastian is the author of Build a Large Language Model from Scratch and has a new book on the way, Build a Reasoning Model from Scratch. In this episode of Vanishing Gradients, Sebastian and I get into what it actually feels like to work in the agentic era right now, what we're calling AI psychosis, the cognitive load of supervising agents that supervise themselves, and why it feels like conducting an orchestra you were never really trained to
SPEAKER_01conduct. Sebastian shares his wonderfully simple personal AI stack, why he loves building LLMs from scratch, and why he believes implementation does not lie. We then dive deep on the architecture side. We explore hybrid architectures fusing transformers with state-space models like Mamba, why multi-head latent attention is winning the KV cash war, and how RLVR trains reasoning into frontier models and that reasoning spreads across the ecosystem through distillation. We talk about why teams need to keep strict
We also discuss the shifting economics of fine tuning and why understanding these
SPEAKER_01under the hood mechanics may for navigating the trade-offs between cost, latency, and reliability. This was also a guest Q&A that Sebastian kindly gave in our recent Building AI Applications course, which just wrapped up its final cohort. It was so great to have him there. We'll be releasing a few more guest talks and workshops in the near future, so keep your eyes open.
SPEAKER_01Our course just wrapped up, but we're cooking up a few new things. If you want to be first to hear about them and help shape what we build, there's a link in the show notes to drop your thoughts. We also live stream many of our podcasts and free workshops and would love you to join. Check out The Vanishing Gradients, Luma Calendar, subscribe to our subset newsletter and YouTube channel. All links are in the show notes. If you enjoy the show, the best way to support it is to share this episode with a friend or a colleague who you think would get something out of it also. I'm Hugo Bowne-Anderson and welcome to Vanishing Gradients.
SPEAKER_01Sebastian's here.
SPEAKER_00Sorry, I... I have this set up here.
SPEAKER_01Hey, how are you? How are you, man? I'm good, how are you? This is super informal. It's been ages, dude.
SPEAKER_00Yeah, it has been, well, is it years? Something like that.
SPEAKER_01I think the last time I saw you in person was at SciPy.
SPEAKER_00Yeah, right. And that was, I think, in Austin, right? Yeah, we went to the Claypot with Alan Downey and Stefan and Michael Chow. So it must have been three years at least, because last year, the year before, it was Seattle, I think, yeah. exactly but we did do a podcast two years ago after that i think yeah all good things come in threes like three years later now it's very true so we're actually we're streaming to an to youtube to an unlisted youtube stream and people in the class in the course of watching and they're gonna ask some
questions on discord and
SPEAKER_01i can filter them through as as needed but hey where are you by the way
SPEAKER_00I'm still in Wisconsin. I do like it a bit more remote. I like going to events, but then I also need my recharge quiet time. I'm directly at the lake of Wisconsin, which is quite a nice place. It is, you know, you can't almost like advertisement Wisconsin here. You can't distinguish it from like the ocean if you are actually at the beach, which is quite nice. So it's kind of like, except it's much colder in winter, but in summer, you know, it's just beautiful. And it's where I get stuff done because there are not that many
distractions.
SPEAKER_01For sure. And actually, I've spent some summers in Chicago when I used to live in the US. And on the beach, I actually went and did one of David Beasley's workshops back in the day in Andersonville. And going down to the, I was going to say the beach, it's the lake, but playing beach volleyball. volleyball on the lake and in the summer is, but in winter, of course, I mean, that. Different story. Even in autumn, it's kind of, it's really cold.
SPEAKER_00Yeah. I mean, if you like cold plunges, that's maybe still okay, but it is getting cold after, I guess, October. Yeah.
SPEAKER_01It's funny you should mention it. I went and did a cold plunge yesterday and I feel like... Oh, wow. Yeah, well, because you may recall I lived in Germany for a couple of years and in Saxony, well, places, and I very much got inculcated in the sauna culture there.
SPEAKER_00Yeah.
SPEAKER_01I always say if I left tech, I'd become an Alfgussmeister, I think. Yeah,
SPEAKER_00I think that is, I mean, one of the biggest health benefits these days, like sauna and cold plunges. It's just like very, you need a lot of willpower. Yeah.
SPEAKER_01Absolutely. Stubbornness. Cool. Let's jump in, man.
SPEAKER_00Maybe you'll launch us a good segment, right? Exactly.
SPEAKER_01Exactly. And maybe I'll introduce you, introduce someone who perhaps needs no introduction at all. But everyone, Sebastian is an LLM researcher with a lot of experience over a decade in AI, machine learning, data science, bridging academia and industry. And his expertise lies in LLM research and the development of high-performance AI systems with a very, very deep focus,
SPEAKER_01as you all know, on practical code-driven implementations, as evidenced by your book, Build LLMs from Scratch, and what you're working on now, Build Reasoning Models from Scratch. I do want to say, you know, if people look at your back catalog, the greatest hits It isn't only this stuff, though. There's a lot of classic machine learning. When we met in 2017, I think we first met at SciPy, and I think you were teaching a tutorial on scikit-learn, and I was teaching one with our friend Eric Ma on Bayesian inference. And then before that, of course,
SPEAKER_01one of the first books of yours I ever read was actually Heat Maps in R.
SPEAKER_00Ah, yeah, quite the journey. I think, yeah, you're right. That was like 2016, 17, scikit-learn by Bayesian inference. And I don't, I mean, who knows if we would go into a college like right now, how many people would still, I mean, I wouldn't say remember, but use these techniques which I think are still very fundamental and important. Actually we were quite lucky I think back then that we had the let's say luxury to be able to spend time on these things in terms of learning and using these things because I think nowadays you know LLMs can do everything which
is I guess a blessing and a curse so in that sense I feel like everyone is in the in a rush to just get things done and we had the luxury there were not that many things there was only scikit-learn i think tensorflow just came out like 2017 18 or something there were not that many options so it was quite the um i guess quieter more reflective time a simpler time machine learning simpler times yeah that's maybe the
SPEAKER_00right word yeah
SPEAKER_01We, I totally agree. And time for slow time as well. I actually have no AI Sundays, as people in the course know where, for example, I'll write without even looking at AI. I'll Google some things, of course. And if, you know, there are other products that incorporate AI. We have lots of people saying hi in the chat and saying how much they love your work as well. We've already got someone asking about Member 3. So I'm excited to chat about that. Exactly, and Carol Wheeling says, Sebastian is amazing, loves your blog, newsletter,
SPEAKER_01and she remembers Sci-Fi 2017 well. Thank you. I am interested in, we were talking about teaching in a simpler time, and I suppose, well, this is really jumping into the cold plunge pool, but I've been thinking a lot about how to teach agents to teach, and I'm wondering, I mean... Predictions are predictions, but I wouldn't be surprised if people are learning more and more through agentic systems in the coming years, not only through things like code code, but, you know,
SPEAKER_01more consumer agents and these types of things. So I wonder, you know, your sum stack, for example, is designed to be read by humans. I'm wondering if you've thought about designing educational material and things you build for more agentic systems.
SPEAKER_00So you mean essentially preparing the content, so basically preparing the content such that you can put an agent between, let's say, the content and the person learning from that content? Is that what you mean?
SPEAKER_01Exactly. So I'll give one concrete example, which is actually Kapathi on NoPriar's podcast last week, talked about micro GPT and that he would normally like do a video on this, but now he's thinking about actually writing a skill next to the code that is his way of describing it. But then anyone's personal agent will know more about them to be able to describe what they need.
SPEAKER_00Okay. Spontaneous thought here. I do think the reason LLMs are so, let's say, good and useful is that there's a lot of data out there and it picks up the patterns that people themselves use for writing, reading, everything. And I think what I'm trying to say is if you look at the training data and if you look at any teaching material you currently would create in a form of a book or video or blog post, well, it looks,
SPEAKER_00I mean, it's basically the training data, right, for the LLM. So I don't know why you would, I mean, necessarily need, can I say that? I think it is already a very good format for an agent on LLM. I think you don't need to do that much because it is already what the system ingests anyway. And I do think it makes sense to have a skill to help it a bit. But I also think at the same time, the content is not that... I wouldn't say not complicated, but it's not esoteric.
SPEAKER_00It's not like trying to teach... the model or agent, I don't know, like how to put together the motor in a car in a physical way. It is already usually, I mean, when we are talking about teaching here, it's usually involving research, math, some code, you know, and I think these things are already very familiar to the model. So I think with a skill you can maybe change the style a bit because there are different audiences also, like some people with more or less coding background. Some people also want to get different things out of the
learning material.
SPEAKER_00And I think that is also how I learn or in general, Also, even when reading papers, I read papers differently. There were a few people asking me in the past, like, how do I read papers? And there's no universal answer because it depends on why I read the paper for what type of project I read. read it and i think in that sense um i can also see with the skills so you mean like a skills.md file for the agent i think this is something
that might be better provided by the learner rather than the teacher if that makes sense like where you specify more like what you want to get out of the material because the teacher in a
SPEAKER_00sense well you can structure it in a sense so you can help along explain okay here are some files here's my code here's some math and you can describe as a meta document how to put it all together but i do think if you own i mean if you don't develop your own skills at mde it's not that different from someone actually writing the blog post for you you know because If you have a blog post, it doesn't mean you can't use agents and LLMs. You can still use them. You can have that as a PDF markdown file.
SPEAKER_00You can export it from the website, or you can just give it the URL and you can still ask the agent to explain new things or prepare the content differently, strip out things, rearrange it. So I don't know if a skilled MD is really necessary. Because natural text is already kind of a good form for LLMs, if that makes sense. like the just yeah but i may also be misunderstanding your point no no no i think i
SPEAKER_01think you are no but i do think part of the point was like to express an opinionated way of how to perhaps if you give it the code for micro gpt you'll tell the skill and i'm putting thoughts in karpathy's mind now probably explain forward pass before backward pass so like simple things like that it's a good question how much of Things around skills and harnesses and hopefully we'll get to this become ingested by frontier models or become incorporated into the models in future.
But I do want to step back a bit and just because so much is happening in the
SPEAKER_01space, I'd just love to know what you're excited about at the moment.
SPEAKER_00A lot of things. That's a problem. There are too many exciting directions to go where the day is only 24 hours and eight of that is sleep and other parts are exercise, relaxation, everything. So there's not that many hours in the day. There's not enough hours to do all the exciting things that are currently happening in the AI world. So I'm currently in between I really like still following the LLM research. I like building things. There's also all the agent stuff, but it's all also connected, right?
SPEAKER_00So you have, so basically for me, it's like if you take, I would say like a working LLM architecture as an anchor point, let's say what came out last week, I think Mnemotron and maybe Gwent 3.5. If you take model releases like that as the anchor point, you can go in both directions. You can either plug them into an agent in one direction and play around with that, or in the other direction you can look, okay, what does the model look like under the hood?
SPEAKER_00You know, like what are the ingredients? Like what type of attention mechanism do they use? Context length and so forth. And then also you can think about, okay, what are currently resources research techniques that could be used to make that even better in the next generation of models like what can we swap out basically and I think I'm interested in both of these like if you take just the model itself I like to download it look at it play around with it and then Yeah, you could plug it into an agent, for example. I think right now,
QUENT 3.5 might actually be quite popular right now in the open claw context,
SPEAKER_00the 27B model, for example. So there's this website. I honestly don't know how good the benchmarks are. I know the classic benchmarks like SweetBench, Verified and Pro and these coding benchmarks, but there's this website, PinchBench, and they provide benchmarks for models when they are, let's say, in an open-clock context. And I think it's a quite interesting, I would say, way to also rank models, because it's like what a lot of people want to also get out of these models, basically. And so I wanted to go with this.
I find it quite interesting to look at these recent releases, but then also look at them.
SPEAKER_00What do they do differently from previous models? And I think with the current generation of models, like QUEN 3.5, for example, has been also developed with Gentec applications in mind. And a lot of models are going into this direction to somehow have tricks also to, I mean, better tool calling, but also to make longer contexts more, let's say, affordable in that sense, because, yeah, a lot of people, I think, use APIs in OpenClaw. For example, you know, the obvious ones like GPT 5.4 or Claude,
SPEAKER_00maybe, I don't know about Gemini actually, but Claude and GPD, for example, or GPT 5.4 are popular models in OpenClaw. But at some point, there's also, it's getting expensive, especially if you use the API. I think with Codex, you can use the subscription But, well, I don't want to say something and then people get banned. So I don't know if it's officially recommended by OpenAI to use the subscription in OpenClaw. But there are more and more people also looking into ways to run local models to make that basically flow.
SPEAKER_003 minus the electricity. So I think that's also a very interesting direction. And for that, you want to know what are good models. And also, you know, if you're curious, I think we are as researchers and tinkerers are naturally curious what is actually, what does it mean? Like when I change the name from QUENT3 to 3.5, how they're different? Is it just different training data or is this actually a different model? Most people don't need to, let's say, re-implement the model, but I think it's still to know what the differences are.
SPEAKER_00It's the same in classic statistics. There are different statistical tests for hypothesis testing. You could just go there to the documentation and maybe write down the function name and plug it in into R or Python and just run it. But I do think it is useful to understand what you're actually running there, in my view. And it's also interesting and exciting, to be honest. It's fun.
SPEAKER_01Absolutely. I'm just going to close my window because construction has just started. the data centers man that drilling is wild so much interesting stuff I'm interested that you mentioned OpenClaw, and about agents more generally, thinking about this tension between what happens in the model and what happens in the agent harness, which we talk about and work on a lot in this course. And for those who are listening or don't know, the harness is really the scaffolding around the LLM that just manages all the
stuff from tool execution to context to safety and guardrails and state and this
SPEAKER_01type of stuff. But something we did see last year in November, particularly with... Opus 4.5 was... And before that, though, the models got so good that a lot of us had to start tearing our harnesses out. And Manus rebuilt, stripped away parts of their harness three or four times last year. Claude Code did the same. And so something that we're seeing is that the models... are not only getting so good that you know people frame it as like let your models spread its wings let it be free right and i do wonder how much
of that is due to uh it being trained or particularly in post training on agent trajectories or agent traces kind of making it more native to the model kind of in the similar fashion to how we used to like do chain of thought right and a lot of that has now been
SPEAKER_01incorporated into into reasoning
SPEAKER_00Ah, I see. So, chain of thought, you mean the prompting? Yeah. I think that chain of thought is a bit of an interesting term because I'm also coincidentally working on the Reasoning from Scratch book, which is I'm currently in the final stages. So I'm actually on Wednesday, two days. trying to get everything submitted i mean it's done just doing the editing and um you mentioned chain of thought there was uh one of the editors brought up the term
like it was not clear because exactly like you said chain of thought could be just a prompting technique and that is like the bigger also it's kind of like the bigger why i'm saying this is like a bigger topic or conundrum is when we are saying reasoning um well we expect something sophisticated but in a sense it is more like
SPEAKER_00uh like a behavior rather than a technique almost like where yeah you could technically take an existing base model nowadays the base models are pretty capable without even instruction fine-tuning and give it instructions and say explain it step by step and it will kind of almost look like a reasoning model basically it explains the answer step by step and everything and so what is the boundary between a non-reasoning model and the reasoning model like in that sense you can already have reasoning behavior i mean if
you define reasoning behavior as the intermediate explanations with just prompting and um also
SPEAKER_00there's also like you said the agent uh traces they are in the training data and the same is true for the reasoning models and that is why they can also do already reasoning without post training so the base models can already do that and in that sense it's not that different from distillation it's essentially distillation because distillation is supervised fine-tuning and supervised fine-tuning is pre-training except that you have different um prompts but it's the same loss function so pre-training and supervised fine-tuning are the same loss function
SPEAKER_00reinforcement learning for reasoning like the reinforcement learning with verifiable rewards it's a different loss function a different technique but what so what i'm trying to say is you have already the reasoning traces from the reinforced reinforcement learning trained model in the training data of other models so you're essentially in pre-training kind of already distilling other models and then that's why you get already a pretty good behavior and that is maybe what uh you are also seeing when you mentioned like the progress
recently in the last few months it's getting better and better and I think that's because already so people I think can train more efficiently now so back in the day you only had the raw data and that was in my opinion based on my knowledge or experiments or like small scale but models learn faster when you have good quality data and I do think it's almost
SPEAKER_00like how we humans learn so if you give some i mean if i would say if you randomly walk into a library and you would take out random books and try to learn something and it's a lot of work to find the right the right book for you that is the right difficulty and everything and now think about it even In a worse sense, the books are not really high quality or maybe you just have random internet data. It's possible to learn, but it's really very time consuming. You need a lot of different blog posts to learn about a topic.
And if you have a high quality textbook or high quality blog post, you learn from that fast.
SPEAKER_00So you only maybe need to read that one thing. What I'm trying to say is like you can get better models with less data because the data is already higher quality and it's kind of like almost like pre-digested. On the internet you have a lot of let's say not so good quality things and in the worst case it can even make the model worse or the model has to just you know learn how to sift through it which is not a bad thing because then On the one hand, if you as a user make typos and write quick and dirty prompts, which I do because I know the models are so robust.
SPEAKER_00If I have a typo in my prompt, I don't care. Just leave it there. I don't even bother fixing it. So it kind of learns this kind of robustness. But at the same time, if you give it also higher quality data, it also just learns faster and then you get better models and you can use that additional compute. if you have let's say a three months so and so many hours compute on other things like post training like you said and so I think more effort is now spent on post training because you don't need to yeah overdo the pre-training because with moderate I don't know 15 trillion tokens you can already get
pretty good base
SPEAKER_00models and then you can spend more on the post training basically
SPEAKER_01Amazing. I love it. And I'd love to talk about how we've moved from getting a lot of low-hanging fruit from pre-training through to mid-training and now post-training. And I love that you mentioned internet data. It's pretty low signal, but there's a lot of great stuff in there. I always use Reddit as an example. where some subreddits are probably some of the highest signal you can get from humanity outside canonical textbooks history whatever it may be right but it's pretty noisy in there so figuring out mechanisms to to do that so let's take a quick tour through history and to do this what i want to do is
just show you i think you'll dig this our last podcast a couple years ago i threw into notebook lm
SPEAKER_01and i built this mind map and so It was all about LLM development and training, right? And so we have Sebastian, staff research engineer at that point, author educator, open source contributor, ML researcher, great. We went through the LLM lifecycle, so coding the architecture, pre-training, fine-tuning, deployment, monitoring, and updating. talked about look how much we covered instruction fine-tuning rlhf and dpo continued pre-training laura dora mixture of experts and of
course i'll share this with everyone afterwards and for this this one as well you can click on any of these to get to the particular sections then talked about coding assistance writing ideation our boat both our backgrounds in biology of course translation then we
SPEAKER_01actually did a demo of um training uh you did a GPT-2. So I must say this is really cool and we have not scripted this podcast or anything so this is like generally a surprise I did not know that you built this and so I'm quite I mean I'm trying to right now remember actually and you're right I think that is true I think we demoed something in the podcast it was like two years ago and I'm surprised Dora and Laura it feels like ages ago but yeah it's just two
SPEAKER_00years yeah.
SPEAKER_01It really does. I call it the accordion of time. You know, the days are long and the years are short. And so this was two years ago. And we like, especially like we had big conversations around RLHF and DPO and instruction fine tuning. And what I want to make clear is that this is, yeah, we did that around this time, right? So I'm wondering if you can talk us through what, you know, the story from pre-training through to mid-training and what we're seeing now.
SPEAKER_00Yeah, so I should say also in this note there, I try to summarize some of the interesting milestones, but you can categorize it differently. I mean, trying to put in some interesting topics that are like top of mind for people. So, but it's a mix between research topics and industry topics. So if you, so I think we stopped at Laura and Dora. And I think what's new since we talked last time is of course, all the reinforcement learning with verifiable rewards that
came out 2000.
SPEAKER_00I mean, Yeah, 2025, it became popular with DeepSeq R1. I think there was another paper in November 2024 that already introduced it, but it got really popular last year. But I also think inference scaling is a very popular topic that is often overlooked because it's not... How can I say that? I mean, inference scaling versus training is about spending compute during the development of the model or later when you use it. And yeah, it doesn't make always sense to use... So inference scaling means multiple things.
It means generating more tokens in a broad sense where you can spend more tokens by
SPEAKER_00making longer sequences, which is essentially the reasoning behavior when you explain things more elaboratively. It's not always true, but it can help the model to generate more correct answers in certain cases. It basically improves the capability of the model. But then you can also sample in parallel, for example, and you can combine those. You can have multiple... parallel explorations, almost like an ensemble. And for each ensemble, you can make the answers longer with reasoning behavior.
SPEAKER_00But then also on top of that, you can also add sequential refinement. So the model can refine it. itself and then you can also add external judges that judge the answer and give it a rubric and then you can keep going infinitely like add more judges and meta judges and so forth and all that makes everything more expensive but it also makes the model better so there was like this paper on deep seek math version 2 where they showed that they had a very good math model which was
pretty decent i think
SPEAKER_00like maybe you know it's been from fall 2025 so i i think at that time it was on par with a at that time the best chat gpt model or about that but then when they added uh more of this this inference scaling like the self-refinance and parallel sampling and it was a reasoning model all these axes of inference scaling they were able to get gold level performance in these math Olympics competition type of settings but then it's of course
course very expensive so you don't want to do that on every query and so what I find interesting I mean this was also last year really where people pay more attention to inference scaling instead of just okay here's the best model and we
SPEAKER_00use it all the same way all the time so what is more important now is also to decide how much effort on the task do you want to spend because you first you don't want to wait infinitely but also it's it's more expensive also for contexts like the context length you have a limited context length you have to you want to let's say use it smartly, not just put unnecessary things in there or not all the time. And so last year was also, I think the first year where people developed like these automatic model selectors
SPEAKER_00are more like model behavior selectors. I think one of the good examples was a GPT OSS, the open weight model where they had, I mean, there was not the first one, but they had the system prompt where you can select minimal, moderate, and high reasoning effort, for example, to decide how much inference scaling you want with the reasoning. But then on top of that, you can also add these inference scaling steps. And yeah, ChatGPD also, they added the auto mode in the UI user interface where you can select or the
model tries to
SPEAKER_00predict what type of effort is needed for that task. And I think that goes a long way. I mean, still personally, I often also sometimes have just a simple mode or thinking mode manually selected, but often I also just use the auto mode. It really depends now. But it is really one of the bigger things or topics in 2025, how we get more out of the LLMs, basically, without, let's say, spending just more training effort.
SPEAKER_01Absolutely. And I think, you know, to your point, ChatGPT now, it will do something auto and it will say thinking longer for a better answer and you can choose to skip that. We also see it on the harness level. Agents like AMP will route to different models based on what you're Query is Cloud Code. Well, if you're using Opus 4.6, if you're doing something basic, it may route it to Sonnet or Haiku. And sometimes you only see that if you look at Control-O or whatever you're doing there. I think the idea of routing is very interesting.
SPEAKER_01It doesn't always do what I want, but I now, I won't be surprised. I mean, we're still kind of very early days, so I have no question that these things will become... get far more intelligence with respect to routing mechanisms.
SPEAKER_00Yeah, and on top of that, you also have the routing to sub-agents now. That's a new thing, too.
SPEAKER_01And to sub-agents and sub-agents. You mentioned OpenClaw before. I've got my Claw set up. And funnily, I use Opus 4.5 with my Claw, not 4.6, because it just... Opus 4.6 smashes tokens like nothing else, man. But my OpenClaw, it will use clawed code. on my Mac mini instead of me, and it will then spawn sub-agents to use code code as well. So we'll continue conversations with me. So we're getting, we're moving up the, I mean, this is why we have emerging terms like AI psychosis, I think,
SPEAKER_01right? Yeah, it's interesting also I wanted to say is like that workflows have shifted a lot now.
SPEAKER_00Basically, it's how to orchestrate these things. It's almost like on multiple levels, multitasking, but now the models are also multitasking. I think, I hope, I mean, it's at some point It is honestly, but like you said AI psychosis, it is also a bit stressful because you are now supervising agents which are self-supervising themselves in a sense and it's like you're watching an orchestra there and you're trying to get everyone doing the thing you wanted to do and then it's kind of an interesting thing and it happened so quickly.
SPEAKER_00It's like, yeah, it's... Absolutely. And I do think it is like conducting an orchestra, but I've never conducted before.
SPEAKER_01You have to learn how to fight. Yeah, this is another point that Kapathi has made and others have. He honestly feels that if he can't get these... or agents to do stuff in the short term, it's most likely a skills issue on his part now that he hasn't figured out essentially how to communicate as well as possible. And I do think there's a back and forth and he's being provocative there. But part of the point is, To your point, it's stressful because you asked them to do something and maybe they'll do the right thing, but in an odd way as well,
SPEAKER_01or maybe they'll like mess up the thing. So your mind, you haven't taken the cognitive load and given it to something you can totally trust and verify a few small things with. So we're actually creating a huge, like far more cognitive load for ourselves because we haven't quite figured out how to conduct them correctly, right?
SPEAKER_00Mm-hmm. Yeah, that and also I feel like it's like a fine line. If it does exactly what you want, it feels awesome. For me, the best example is just my website. I've been working my website for 12 years and I'm not a very good web developer it's very basic aesthetic website just HTML CSS and everything and it's very hard for me to make fixes because CSS files get very messy and they're very long and if it just accumulated so much craft over the 10 12
years I have been adding to it and if you tweak one thing it breaks another thing on your website so it's actually awesome when I use an LLM to fix things or improve things on my
SPEAKER_00website because it's almost like magic you tell it what to do like hey Add a new button here or something. It does a good job most of the time. It's like, wow, that's amazing. It would have cost me like hours and tweaking things and figuring out. But then if it does something wrong, it is also very frustrating because I know exactly it's in my mind. I know what I want, but you're just not understanding. because i had that problem with like i have like a dark mode button up at the top and then you minimize the website it would jump around and i try to explain no no it's still jumping around okay let me fix that for you and then
no no it's not aligned and then it's like it takes screenshots and oh yeah i see and then it moves
SPEAKER_00it in the wrong direction and it's like ah It's at the same time, I feel like, okay, now if I would do that myself, it would be maybe less frustrating because it's like a programmatic thing you can do, you know, like it's deterministic. You can maybe change the width or something. And so I think also for that reason, it is still useful to know how to certain things, how to do like the coding, because then, yeah, you can let it do certain things. And then almost sometimes it's more efficient to jump from prompting to the code then directly or to the CSS in that sense and just
SPEAKER_00adjust the pixels and refresh, adjust, refresh. It's faster than every time prompted again and then, oh, it made the change for you and then going through that loop. So I think, yeah, it's like this fine line between awesome results and it's magic and feels great because it did something that would frustrate you because you don't, personally, I don't like working on CSS files, but then also sometimes it's frustrating if it doesn't do what you want. And then, yeah, it's still useful to know how to do that thing yourself, basically.
SPEAKER_01Without a doubt. And I do think something also you're speaking to there is a lack of a good internal, well, it's still early days. So I'm actually really impressed with where it is already, but internal feedback mechanism for multimodal models to give themselves visual feedback. I think products like Matter, actually did that very well with slides. I do think my claw, for example, will build front end stuff and then get sub agents to go and take screenshots and click around and see what's up and then send it to me on Telegram while I'm at the beach. You know, we're figuring things
SPEAKER_01Because you were talking about how you're building stuff, I'm wondering, so we have a question from Joey in the chat, would love to hear how Sebastian uses AI to aid education and writing workflows. I do want to know that. I do want to preface that by saying, ever since I've known Sebastian, pre you know the current incarnation of generative ai he has been as prolific and wonderful material i mean i've always been inspired and impressed by how much you're able to very detailed quality heartfelt content you're able to produce all that having been said we'd love to know about your stack what
do you use ai wise
SPEAKER_01not ai wise hardware yeah what's what's your setup look like To be honest with you, I always think about, is there anything that I should add?
SPEAKER_00It's actually quite simple, almost very classic. I actually do use a Mac Mini, but it was before OpenCulture. claw. My main computer is just like a Mac mini happens to be. And because I just like how quiet and small it is basically. I'm not the biggest laptop user anymore. Right now it's a laptop. It's my second computer that I've set up here because in my other room, the background is not quite as nice. Otherwise, honestly, I use Codex, like most people, or I mean, it's either Claude or Codex.
SPEAKER_00For my educational material, though, I do. So how I use it is more for what I try to get out of it is making the tedious things more convenient, like things I found frustrating before to make them more let's say reducing friction and making the quality better. Like I don't really necessarily care about making more because what I make is, or how I approach things is I try to actually, it sounds weird, but I try to write it also for myself in a sense,
SPEAKER_00like when I'm writing or creating something, I want to, I mean, I want to like it basically. And I usually have an idea and it's for me, like the workflow is just going from the idea, getting it down to something. I'm more like a writer than a video person because with writing I can edit it, which is nice. So I get some thoughts out and then I flesh it out and then I almost sequentially add things from top to bottom. And then I have multiple refinement stages and make figures and everything. And where AI comes into play is basically quality assurance or
like proofreading
SPEAKER_00and highlighting issues. It can be simple things. For example, I have a checklist actually for that, which is nice. So I, over the years, I have developed a checklist for things to check, for example, mundane things like title casing everything if i i mean it depends i don't it depends on the style um for example for manning they have a sentence case for the headers and everything but like making it consistent not jumping from sentence case to title case like mundane things like just tedious checks. I have a checklist of that, like, I don't know, 20 items when I write an article or something to go through.
SPEAKER_00It's a markdown, so it's a good actually input for an LLM to, hey, and so me checking all these things here is my article. Here's my list. Make sure I check off all my things or is there anything broken or is anything missing? Or, for example, check if all the links work and these types of things. But then also, for example, when I'm writing the book for Manning, I have usually a notebook, a code notebook, and I have the chapter where I write all the the explanations and add the figures. And there's often feedback from the community that I
incorporate in the notebook. And sometimes, rarely, but sometimes I do forget, or maybe it's like a bug in Google Docs.
SPEAKER_00I don't know why. Sometimes it happens that the code is not the same in the notebook and in the chapter anymore in the Google Docs and it used to be in previous years super tedious to find these bugs where you have differences and this is great for an LM here's my notebook here's my Google Doc is there any code that is different you know and then it gives you certain places sometimes like oh great it would have taken me hours to find this basically i like that a lot that it kind of like it's a very very tedious and boring work and that you can really automate it and make it much
more pain-free to do these types of things while you can develop the content basically and uh you can yeah outsource the tedious things to the llm basically
SPEAKER_01Yeah, fantastic. Thank you for sharing how you're working at the moment. Quick word from our sponsor, which is, well, me. Vanishing Gradients is a podcast, workshop series, blog and newsletter focused on what you can build with AI right now. Over 70 episodes, hundreds of hours of free hands-on workshops, all independent, all free. If you want to help but keep going, you can become a paid subscriber on Substack, starting at $8 a month, or share this episode with someone who'd get something out of it. Links are in the show notes.
SPEAKER_01All right, let's get back into it.
SPEAKER_00I do want to jump into what's happened the past couple of months,
SPEAKER_01and we touched briefly on the fact that A lot of what we've seen in the last year was big developments in post-training and then inference time scaling. The post-training in particular, ROVR, so reinforcement learning, verifiable feedbacks, which helps us with math and code stuff, stuff that's verifiable. But I'm wondering what's happened the past... It's 24th of March here. It's 23rd of March there, Australia. We live in the future and walk upside down. We haven't seen the new DeepSeek model yet, sadly, because we were hoping to be able to talk about that today.
But yeah, what have we seen in the past couple of months that we should keep an eye on? maybe as the starting point for our timeline, otherwise it would get, I guess, out of scope. We had our LVR, like the Reinforcement Learning with Verifiable Rewards in 2025 with DeepSeq R1.
SPEAKER_00And since then, I think most people focused really on expanding that, just incorporating that into their training stack. Mid-training is becoming more and more popular, which means essentially training on longer context tasks and specific subsets of the data. Other than that, I mean, The recipes have not changed that much. It's still like pre-training, mid-training, post-training with LRVR and also still RLHF. Architecture wise, there have been a few changes and I think specifically,
SPEAKER_00I would say in the last two, three months this year, there is a trend towards hybrid architecture. So to explain basically what the problem is, so going back to GPT-2 or GPT-1, standard multi-head attention, for example, now it's very expensive, quadratically with input size, the sequence input. And Also when we create, so like that's for the pre-fill, but also when we create more tokens during the generation phase, like token by token, it's also kind of expensive to recompute the keys and values
for things we have
SPEAKER_00already seen before. Like the LM would recompute the keys and values at each time step. And there's a lot of overhead that's not necessary because the other sequence items that came before the sequence, they don't change. So basically what I'm trying to say, we only have one new item that we need to compute each step. We don't need to recompute all the keys and values for all the previous things we've already seen. And so people develop this KV cache for that, to cache the keys and values so they don't have to be recomputed every time. But it's still then also expensive computation if you keep all
the keys and values in the cache. Especially now with agents, the contexts get very long and if you have 100,000
SPEAKER_00tokens and then you have 100,000 keys and values. That's a huge memory overhead that you have to keep in memory. So what people did is grouped query attention, which I think is pretty old. I think 22, 23, I think Lama 2 already introduced it a long time ago. And so grouped query attention is essentially about having keys and values sharing. So having multiple groups where they share the keys and values. So you basically have Let's say you have,
I'm always getting confused with the terminology because KV groups in different,
SPEAKER_00you can say number of groups or KV groups, and then the number of groups means how many items are shared per group or how many groups you have in total, if you know what I mean, like that gets a bit confusing. Let's just say you share keys and values with a ratio of two to one. So you reduce the KV cache size by two, basically. So you have this sharing, but then with this sharing, you have like a little bit of performance hit in terms of how well the attention mechanism can capture things because now you have your parameters and you have less
SPEAKER_00complexity. And so there's less combinatoric, less things you can learn. And so it's one trick to make things more efficient, but then you limit a bit like the modeling performance, but only a little bit. And so DeepSeq also had this technique called multi-hat latent attention in 2000. There was, I think, 24 with DeepSeq version 2. So that was like a bit underappreciated back then. It became only popular later when DeepSeq version 3 became popular. But what their idea is,
SPEAKER_00so instead of this sharing, sharing keys and values for multiple query groups, what they do is they compress the keys and values. So it's kind of like LoRa a bit. So you have the original key, let's say, and then you compress it to a latent representation that is smaller. you store that in memory and then when you do the computation you have another matrix that up projects it so it's kind of like laura you down and up project basically it's like this hourglass shape and you do that for the keys and values and you can also do that for the queries but i would say
queries is more optional it's mostly interesting for the keys and values because that's what gets stored in the kv cache so you can reduce the kv cache um that way and so that has been i'm
SPEAKER_00mentioning that because That has been also quite the trend last year, or also this year, that more and more labs adopt this MLA, which DeepSeq introduced. So for example, Mistral AI had it, I think GLM5 has it. So there are multiple architectures that now adopt MLA or like the latest model from India, Sarvam, I think. They also have it for the 105B model. So more and more labs adopt the multi-head latent attention. it's way more complicated to implement.
SPEAKER_00Group query attention is almost as simple as multi-head attention, but for the multi-head latent attention now you have all the additional projection stuff going on and everything. It adds complexity, but that is something people have been adding over time, which is new basically. The motivation is that you don't have as high of a modeling performance impact as with group query attention. So you get a little bit more better models with that. And so the trend is,
I would say, it's not necessarily building bigger models.
SPEAKER_00It's still like, I think, upper ceiling, like one trillion with K2.5. But it's about let's make the models better at longer content. And with that, basically, what are the tricks? And one is still a mixture of experts, but like mainly KV caching. And then DeepSeq version 3.2, they also had the, I mean, there are multiple sparse attention variants, but they had one they call DeepSeq sparse attention, which is essentially limiting how many tokens you can see at each step. So you don't need to look at the whole context, but only a slice.
So there was a different technique related to that called window attention,
SPEAKER_00which is also very popular still. So sliding window attention is you look at a surrounding subset or you have a current token, like a prediction. You look at a fixed window. let's say 1,024 tokens instead of all the 100,000 tokens. And you slide it basically for each token around that window. But this is not optimal or ideal because maybe sometimes you need something from earlier. I mean, if you go through the layers, you still have in some layers like you have global layers where
you have access to everything but not at each layer you have access to everything it happens to work well enough but this deep seek sparse attention is a bit smarter instead of limiting into a fixed let's say arbitrary size around that given token it is it can look at any position but it's like a fixed pattern you can look let's say at 1000
SPEAKER_00positions but they can be anywhere but this is learned it's like a let's say optimized in quotation marks but it's optimized by the training objective to look at certain locations so it's kind of like an evolution of sliding window attention yeah that is one trend just to make things more efficient i'm seeing i'm thinking of if i'm some if there's something else but yeah i think these are the main variants oh yeah and then hybrid attention so hybrid attention is maybe the most recent trend it started with with Quen 3 Next last year.
SPEAKER_00And so what they did is, I mean, there's also, how far should I go back? But there's also Jamba. So maybe we, because I remember in the beginning, someone mentioned Mamba 3. And so maybe we can tie it back. There's Mamba, a state space model, which is an alternative to, let's say, the autoregressive transformer. And it's more, I mean, this is a very crude analogy, but it's maybe more similar to an RNN where you have a fixed state. And in that sense, yeah, it's much cheaper.
It's more like sequential recursive rather than attention like quadratically with
SPEAKER_00the input size scaling. And there was Mamba. I mean, Mamba itself is a specific states-based model, but there are multiple ones. But Mamba was pretty good and pretty popular. And then people tried to cross it with a transformer. And I think there were... multiple ones like Samba, Jamba, different names, but they were basically hybrids, and that was a few years ago. I never looked too, let's say, deep into them, so I can't say that much in terms of how much they are different from the current iteration of models because yeah there are so many
things out there hundreds of papers almost each day where i these days are more selective i'm looking at models that actually work like big models that work and then work backwards but other ingredients and so quen 3 got my attention because it's of
SPEAKER_00course one of the best models and quen 3 next was the next yeah model and so they replaced the attention layers with these hybrid layers and they used a gated delta net which is i mean the paper title is gated delta net mamba layers with a fast delta rule or something like that so it is essentially not a mamba layer, but it is kind of inspired by the mamba layer and learning or adding a different type of learning rule to it, the delta learning rule. But it's too much detail maybe for this discussion here.
SPEAKER_00I don't want to bore you too much, but the idea is to get rid of most of the tension layers and replace them by these linear layers. Like they scale linearly with the input size. But again, this is like Gwent 3 Next. It's not their flagship model. It's like an experimental type of model. But then recently there was Gwent 3.5, which is the next flagship model. And in that model, they do also use that same gated deltanet. And then NemoTron 3 by NVIDIA, they also do use hybrid attention.
SPEAKER_00So they have attention layers and they have I think they have number two layers. So another, I mean, it's the same idea, but a slide instead of gated delta net having number two layer, a slight difference there. And there is also chemilinear. They have their own version of gated delta net. I may be forgetting one or two, but there are different types of these types of modifications where we're seeing more like a move towards hybrid architectures that perform pretty well. Personally, I think while it's still experimental,
SPEAKER_00I try to use them, let's say like local as local LLMs. And on my computer, they are pretty slow still. They shouldn't be. So they should be faster, but I'm getting less throughput than with a simpler model, like let's say GPT-OSS. And I think the reason though is that the inference stacks i'm using are not quite as optimized at least at the time when i checked them out so i i mean i should i know look broader but i like to use lama cpp for example and i in my like my compiled version the hybrid
versions were a bit
SPEAKER_00slower even though they shouldn't be so i think That is also a recent trend to optimize the inference stacks for these new types of architectures, basically, which is quite interesting. So there's a lot of coding needed because it is quite complicated compared to just attention. Now you have hybrids and the layers alternate and you have different components and optimizing that, it's a lot of extra work, yeah.
SPEAKER_01I appreciate your breadth and depth and clarity. I kind of feel the closest I have in a while to like Neo in the matrix when he just gets plugged in and downloads and comes down. It's like, I know judo. I want to know what you think might be next and maybe we can frame it. And of course, you know, predictions, predictions, but we've both worked in machine learning for a while. I, as we know, like each time deep seek drop something, it, it makes us think in new ways or pushes new boundaries in a variety of ways. So I'm wondering if you have any thoughts on what might be up
and coming out of DeepSeek. Yeah, I wish I had a better answer here, but it is also kind of fun to speculate, I guess.
SPEAKER_00So the last update from DeepSeek, I think it was version 3.2 in December, which is not that long ago. It's just four months. And it It takes about four months to train a model. And I don't know if they trained already version 4 while version 3.2 was still training. So that I don't know. But we had the lightning attention, the DeepSeq. Sorry, lightning attention is a different model. It's Ling. But DeepSeq sparse attention. And we had multi-head latent attention in that model.
SPEAKER_00And so what could you add? might be also hybrid I don't know I don't think so though because it would be hard to come and maybe it would be possible I mean it would be possible to combine all of them they're all they're not like exclusive you can also have you could technically also have multi-latent attention with group query attention it doesn't mean you can't combine them basically so I'm I'm thinking it's either the same model with a new training technique, like some evolution of RLVR,
SPEAKER_00maybe for other modalities, but I can also see like, so what I'm suspecting is having stronger refinement loops in the RVR, because LVR, the original one, is only correct incorrect labels. When the LLM produces a answer is the final answer correct or incorrect or for code does it compile or not and I think what they will incorporate is more like a checking of the intermediate steps because in the DeepSeq R1 paper they had a passage at the
end where they said something that they tried process rewards model and process rewards models are models that kind of also check the reasoning not just the answer but the reasoning so what based on what they said is they tried it and it didn't work so well and I
SPEAKER_00think in the next version, they will have a working version of that that is worthwhile. So in that sense, I think that is at least what we will see. But like you said, they are always so far up for a surprise. So there might be something we can't predict, basically. We could probably predict, but it's like an infinite number of things and something maybe that doesn't exist yet. So hard to say what it is. Yeah. Some secret, a cool ingredient, maybe. uh totally i am interested as you know this is a course for
building on the application layer and that like past five years or whatever is really the first time we could build on the application layer without knowing a lot about neural networks which which i think is is incredibly exciting having said that i think it's really cool for people building on on the application layer to to dive in one
SPEAKER_01reason i think is as we've seen the more you know about the architectures, post-training these days, the more you can attempt to anticipate at least what you'll need to be doing on the application. One example I give is I'm far from saying RAG is dead because I would never say that because it's, I'd be very surprised with that ever the case. Having said that, We have longer context now, which means if I have 30,000, 50,000, up to 100,000 tokens with some frontier models, I'm thinking about effective context, like not public needle in a haystack stuff.
SPEAKER_01A lot of the time, depending on how risky the application is, I'm okay putting all of that all in context. With prompt caching as well, with stuff like Gemini Flash, it can be super cheap. So knowing about what's happening now, in the LLM space can impact the application layer space. But I'm wondering, I suppose you have such a large audience of people so engaged with LLM internals. I'm sure a bunch of them are researchers, but a lot of them are building on the application layer as well.
So I'm wondering why you think there's so much interest in people from the application layer.
SPEAKER_00I think it's just fun or useful to know what you're working with. I would say it's the same with anything. So one might think we can just use the LLMs. Why would I care how they work? It's just like a black box to me, which is fine. I think even if you try to learn the internals, there's always some... You can't look into, let's say, the training data for most models because it's not public information. And so you don't need to be fully able to replicate that model.
SPEAKER_00But I do think it is, well, it is fun, satisfying. And it's, I think also useful. For example, like we just talked about the Gwent 3 and 3.5, like why is my 3.5 slower than 3, basically? If you don't know the internals, you would think, well, I don't know. it incorrectly or something because it should be just a number increase from three to 3.5. Let's say if it's the same size, I don't know why it's slower. Maybe it's a bug or something. But yeah, it's just a different model. It's like this hybrid architecture now.
SPEAKER_00And in that case, it might be the stack was not optimized for that yet. Maybe people are working on that to make that faster. And it's like a transition. It's not just a 3.5. Because 3.5 suggests it's like a small incremental training data update, but it's more than that. It's like an architectural upgrade. And I think knowing that is quite useful. Also with KVCache, for example, what are the different trade-offs? Understanding that Group query attention is more efficient than regular attention for the KV cache, for example.
Not everyone needs to know that because I think you could technically go to a
SPEAKER_00benchmark and they show you the numbers, right? But I do think it is useful to have a good... It's also more satisfying to know like... what is happening inside like in the broad strokes at least you don't have to let's say re-implement everything but just knowing like how it works it's the same I guess with cars right I mean some people most people just drive the car to the destination but I think it's fun and useful to know how motor works like on a basic level like to you know understand what are the gears
and the transmission and why does it need fuel and how does it use the fuel like it explodes and has the
SPEAKER_00pistons and stuff I think that's It's an interesting kind of, yeah, almost like geek knowledge, I would say. But then for developers, I mean, right now we are using LLMs as applications, but also many people are developing LLMs. And I think that is also just future proving yourself to keep up with things, right? Because it only gets, I guess, more complicated from here on. Like we just talked about, like from multi-head attention to group query attention to...
multi-hat latent attention to sparse attention it gets more and more complicated as more and more things get added and the longer you procrastinate with learning the fundamentals the harder it will be to catch up at some point so it's kind of to to keep up with the developments a bit it's kind of nice and useful to you know to learn as we go as new things come out and um yeah that is i think i mean one of the motivations why i'm also interested in the internals um you know like just to
SPEAKER_00It's honestly intellectual curiosity. It's a lot of fun. And also it's very satisfying to know what you're using. It's coming back to the very beginning. We talked about Bayesian inference or scikit-learn. That was the same thing, right? I mean, with scikit-learn, you could just call the SVM function or the random forest function. or class in that case, a Python class. But it was always back then even also interesting to know what is a random forest, what is a support vector machine instead of just using it. And I think for LLMs, it's no difference. It's the same.
SPEAKER_00I wouldn't say it's a requirement for everyone, but it's a good thing to learn about the things you're using, I think.
SPEAKER_01I love it. And I'll probably misquote Richard Feynman, but he did say something like, you don't understand something unless you've built it. And I don't necessarily agree with that as well, but I think it's a nice way to think about this.
SPEAKER_00With that, I would say it's honestly the, maybe it's not the right word, but the most honest, or not the most honest, but like it's one of the best ways to learn because it's What's actually great with LLMs is you can self-check yourself, like self-verify almost your understanding. Building it is a great way to understand how something works, but it's also a great way to make sure
you don't learn anything incorrectly like you fill all the gaps you you because you need to have everything in place for it to work you can't skip or you can't take shortcuts uh like if you have more like a conceptual explanation with a figure or
SPEAKER_00anything you could leave out crucial things but with implementation you can't because it won't work you have to have all the things in place you don't need to let's say let's say have the same level of understanding of everything but you still have to have everything there and everything is there you can look things up which is great it's like the full So basically the implementation doesn't lie. It's like the truth, basically, if it works. And on top of that, what's also cool is there are these open-weight LLMs, for example, on the model hub, the Hugging Face model hub. And when I implement LLMs,
SPEAKER_00EMS from scratch, I actually, I wouldn't say I cheat, but I do download, of course, the weights from there. And they also have a reference implementation, right? So when I implement something from scratch, I use a prompt. It can be any prompt, but I put it through my own implementation. And then I put it through the reference implementation and the Hugging Face Transformers library. And I want to get the same results, right? And if I don't get the same results, it tells me, well, there's something wrong in my implementation then. And then I have to keep looking for the mistake. And what you can do is you can go layer by layer.
SPEAKER_00That's what I usually do. I have the transformer library and I have my own implementation and transformer has, depending on what type of model you use between let's say 12 and 48 layers. You go by, so you start with the input embeddings, then you go into the transformer block. You go into the attention, you compute the query key and values you compute. The attention matrix, the feed forward, like the combined linear layer that combines the outputs, then you have the feed forward and so forth. And so you go step by step and you look at what place do my
things not agree
SPEAKER_00anymore, where I get different techniques. tensor values. Often for me, it's where I make the mistake is the rope, the rotational position embeddings, because often they have, I don't know, like certain scalings in there or some flavors. Sometimes they have in the RMS norm, they have their own RMS norm, like they have like a variant, they add a plus one for stability or something like that. But yeah, going one by one, you can easily find where does your model diverge with the reference implementation. And then it teaches you new things because they did it that way.
And then you fix it and then it works and you get exactly the same result,
SPEAKER_00the same tensors, intermediate tensors, the same result at the end. And that tells me it's basically the correct implementation compared to the reference implementation. And I would have never If you just look at a figure or just scan through the code or anything, you would never think of that. Like the edit, maybe the plus one, it's like such a thing, easy thing to overlook, but it makes in the end all the difference in terms of the results. And these kind of like little details, you can, I think only, I guess, learn when you actually build the thing. Conceptually, it's very hard to reconcile that.
So I think it's a great way if you want to really learn how these elements work to
SPEAKER_00go through a from scratch implementation. Yeah.
SPEAKER_01Totally. And being detail-oriented is something that we still need to remember how to do, and LLMs and agents can make us forget that in a variety of ways. So I do have a question which I think you're so well-positioned to answer. As we hinted at earlier, we live in a world where... For a lot of applications now, you don't even need to fine-tune. I'm not saying fine-tuning is dead because I would never say that. But for many things that we did need to fine-tune previously, you don't need to now.
Having said that, the tools for fine-tuning make it far easier than it used to be.
SPEAKER_01With our API-driven culture as well, there's... In the cultural consciousness, there's an idea that not many people will be training models in the future. We'll all be using big frontier models or open weight, whatever. I'm wondering if you see a different future to this.
SPEAKER_00I do think, well, yes and no. Fine-tuning is such a broad term. So fine-tuning is, often we think of it as something like Laura. I think like something... And I think it still has also its place, but just zooming out a bit, if we look at something like Codex, that is also fine-tuned, right? So Codex is a fine-tuned version of, I mean, GPT, not the application, but the GPT 5.3. codecs. I think there's no 5.4 codecs yet, but maybe it's coming.
SPEAKER_00But what I'm trying to say is even the big labs, they do fine-tuned versions of models because it just makes sense. If you know that you only use the model for coding or mostly for coding, it makes sense to specialize it for coding because coming back to the discussion of pre-training and mid-training, it also depends a bit in what order you present the data because you still have some forgetting happening in the LLM. And so it does make sense if you So it makes sense to make an all-purpose LLM,
but then you take that all-purpose LLM and fine-tune it in different directions
SPEAKER_00for, let's say, math or coding. I mentioned earlier DeepSeq Math version 2. That was the one that was winning the math Olympiad, for example. And I think it makes sense to fine-tune these models for different domains. Personal data, I think fine-tuning will still be relevant, but I think nowadays you need to have a lot of data to make it worthwhile. Not because fine-tuning doesn't work, but because in context learning, or like long context tasks are already so good.
SPEAKER_00Even like you mentioned earlier, RAC. But in general, just even dumping something into the context and the contexts are so long that it does make sense often just to do that. But then if you do it repeatedly on a certain data set and I don't know, let's say you, for me, for example, if I develop a grammar checker, I have mentioned like my checklist thing for my chapters. It's something I do eight times for this book. There are eight chapters. So there's no need to fine tune ELLM to do that.
SPEAKER_00I can just provide this as input and it's fine. But if I were to start a company where I do this for customers and I do it like a thousand times a day or each customer does a thousand documents at that point I would be thinking about fine-tuning it like to make it maybe even better to recognize these things because then you don't have to spend maybe so much on prompting you save some tokens you yeah you do it together with the evaluation you have to see whether it actually improves things but i think then it starts making sense and
popular topic in the news but yeah composer for example cursor composer it's a fine-tuned model essentially right and so it does make sense to fine tune still it's just i think
SPEAKER_00more about What has shifted is more like what is the threshold when it makes sense economically? When is context good enough or not good enough anymore to switch to fine tuning? I think this has changed a bit because natively LLMs are just better now.
SPEAKER_01I'm glad you mentioned composer because I do, I don't want to suggest, I don't want to use the word steel here at all, but I saw this image earlier today, right, where we have anthropic being supposedly clawed, being distilled into Kimi and then being fine for Composer, then us using Composer and Claude getting back. And so I'm wondering, I actually like this because it speaks to the model ecosystem as being something incredible
shared and as you and i know and you're far more than i it isn't only this it comes down to architecture like people publish what their architectures are and then you know i can't remember whether it was deep seek published in architecture that well you mentioned mixture of experts before which then mr did and these types of things so i'm wondering if you can speak to kind of the emergent ecosystem of global
SPEAKER_01globally tools being shared yeah
SPEAKER_00It's a good point. I mentioned Mistral copied the multi-hat attention from, sorry, multi-hat, latent attention from DeepSeq. But like you just said, DeepSeq also kind of was inspired by Mixtral maybe, like the mixture of experts. I mean, Mistral didn't invent mixed up experts I think it was like going back to work from Google back then but I think what I'm trying to say is they cross pollinate basically in a sense in terms of ideas and I think that makes the whole ecosystem richer it's basically I think you get
SPEAKER_00development is much faster this way. If you, let's say, get to look at other models, you try things out and you kind of share. And I think this is just healthy. It's just like the spirit of open source, open development research, just sharing ideas because that's like a win-win, basically. You get better models, other get better models. And I think in that sense, the field makes more progress as a whole if you do it like that, basically. Sorry, there was like a question you asked at the end and now I got so wrapped up with this question. Cross-pollination?
I think that was kind of my question was around kind of the general ecosystem of
SPEAKER_01cross-pollination. Of course, there are people moving between frontier labs as well, right? In terms of headcount.
SPEAKER_00Yeah, I think that's a good point too, that people seem to be constantly switching between these top labs, Google, Anthropic, OpenAI and so forth, just meta switching. And then I think you also have ideas that get shared between these like things that are not public probably in some sense get shared whether it whether it's I don't know if people let's say literally say hey at company X we did that before let's do it here too or whether it's just like an implicit bias because you know what worked and you are more
drawn to that direction
SPEAKER_00like implicitly rather than explicitly sharing company secrets. But I think that is the same where people or companies cross-pollinate with ideas but then also you have the So many open weight models that have different ideas, not completely different. Everyone is more or less using transformer architectures. Now we have these hybrids and they have also slight differences, but I think it's really nice and cool. to see and the figure you showed me I think there was also regarding composer quite
some backlash that they you know didn't develop their own model from scratch my thought here is I mean yeah you there are two things going on I feel like I will get to that in a second but I feel like this what they did is pretty natural because if you are not like a frontier lab you know if you are developing a tool based on AI like cursor so I consider cursor as an application and it's not
SPEAKER_00Let's say a frontier lab that has the primary goal to develop an LLM. And I think in that sense, it makes 100% sense to start with an open weight model. That's the right way to do because I think otherwise, you're really just burning money unnecessarily, right? Because it costs, I don't know how many, but let's say 20, 30 million to develop a Kimi level model. And it would be just burning money. And it's not just the money for compute. You have to have people who are really knowledgeable and be able to do that and pull it off. And it's a risk things can go wrong.
SPEAKER_00during the training run, you end up with a worse model and so forth. And so I think it would be reckless to, or not reckless, but it would be just a waste of resources to just reinvent that same thing basically from scratch. So it makes only sense to use that existing model just focus on the post training but at the same time I think the yeah the problem was that they didn't acknowledge at first they didn't acknowledge it where I mean if we think about it it's still open source open source means you can use it under the terms,
SPEAKER_00but there are still terms where on our open source license, there's still the attribution. So I feel like it's only fair to also say, okay, well, we took this model or we took this open source project and We acknowledge that. That's just being polite and following also the license, right? And so I think that was more like the problem. But I feel like what I read is people were also just disappointed that they didn't develop their own model. And I think there I'm a bit more like, okay, I think it's reasonable.
SPEAKER_00But yeah, the acknowledgement could have been better. It was basically missing, which was more like the problem, I think.
SPEAKER_01Yeah, I think you're right. And I do, I don't know enough about it, but it looks like Moonshot has said that this was legit, like it was a commercial agreement through fireworks, perhaps, or something along those lines. I do also want to say, I just appreciate in a space that can be so cynical, you always come with like a fresh and understanding take about people's incentives and why people are doing what they do. And that's really refreshing, Sebastian.
SPEAKER_00Oh, thank you.
SPEAKER_01We're at time. I do want to say everyone who hasn't checked out Sebastian's Substack definitely should also check out Sebastian's books. In particular, build a large language model from scratch and very soon build a reasoning model from scratch, right? Yep.
SPEAKER_00So it's already all the chapters available in the open access. I'm just putting on the final touches before it goes into production. Production means like the, you know, the steps by the publisher and it will be in color at this time. So it will be exciting. So if you are looking for a nice read. i do think i mean well i don't want to over advertise it but i think it's going to be hopefully my best book yet because it's where i put i mean at least from my my uh perspective i it's the book where i put in the most effort like in terms of it was more like one almost one and a half years one i think i
started when deep sea came out like the january 2025 it's almost yeah not quite one and a half years but it was a lot of work and i think i hope it turned out well and it will be useful to
SPEAKER_00people so yeah i'm pretty excited about wrapping this up finally was quite the journey yeah i can't wait and um people in chat including carol willing are saying thank you so much your books are great carol says bless you for the open access too and that's actually another point with every i mean we're speaking about ecosystem and people have different incentives working for companies and you as an independent uh researcher you know what you're
SPEAKER_01able to do at an ecosystem level is is super inspiring for all of us man
SPEAKER_00Oh, thank you. Yeah, it's, for me, it's always like, I wouldn't lie if I would never get contacted by, let's say, some labs, but I really enjoy the broader community where, you know, like comments like that really make me feel good about my decision to stay independent, because honestly, I'm having a lot of fun and also interacting with people. Also, like, just like this podcast, for example, here, or lecture. i mean lecture in quotation marks i guess it's more like a conversation um but yeah i really enjoy that and getting also yeah the kind
encouragements yeah helps me uh you know being keeping up the let's say work and being excited about things yeah that's uh fantastic well thank you so much for coming and speaking to the course
SPEAKER_01course we teach
SPEAKER_00Yeah, thanks for inviting me. And yeah, that was fun. I mean, it was like a pretty cool conversation. I was just sitting down basically with a friend geeking out about LLM. So I had a good time.
SPEAKER_01It's something we love about this space. And to be honest, I mean, we've been chatting and geeking out for years as we first did around scikit-learn and that type of stuff. But the amount of people we can geek out with now and learn from and the amount of also non-technical people who can enter the space now and bring so much of themselves is so, so powerful.
SPEAKER_00Yeah, thank you so much. And well, I guess we will do this again sometime.
SPEAKER_01Maybe as soon as Deep Seat 4, the next Deep Seat comes out. We'll see. Yeah, fingers crossed. Thanks for tuning in, everybody. And thanks for sticking around until the end of the episode. I would honestly love to hear from you about what resonates with you in the show, what doesn't, and anybody you'd like to hear me speak with, along with topics you'd like to hear more about. The best way to let me know is currently on LinkedIn and I'll put my profile in the show notes. Thanks once again and see you in the next episode.
Hilary Mason, CEO of Hidden Door, works with agents across software development and creative projects. Drawing on Richard Hamming’s distinction between science and engineering, she describes agents as “bringing the...
Agents can write the code, run the analysis, and produce a convincing explanation. How do you check that they’ve answered the right question, used the data appropriately, and reached a conclusion you can act on? I...
“It’s an LLM, a loop, and enough tokens.” - Nicolay Gerold, Amp Code So why does a coding agent forget your instructions, keep reading tiny pieces of a file, or struggle with an edit another model handles easily?...
“If you feel that a product is hard to eval, or you feel like, ‘I don’t even know how to eval this,’ it’s a strong smell that your product isn’t good.” - Hamel Husain, on AI product design An AI data agent tells you...
“It would be sad if local models were not an option and there were only proprietary models. It’s good to have alternatives. Competition is good for business.” - Sebastian Raschka, on open-weight AI Kimi K3’s weights...