AI Augmented Programming with Stephan Janssen

About this episode
Stephan Janssen is always on the bleeding edge of both helping developers grow and with how he uses technology to accomplish amazing things. He led the creation of Devoxx but is a coder at heart. Stephan shares his journey with AI, both as a "library" in his applications and also as an "assistant" that helps him iterate and program more quickly.
Resources & links
- Stephan Janssen
- DevoxxGenie IntelliJ Plugin
- Ollama
- LangChain for Java
- LMstudio
- Llama.cpp
- Rethinking Software Development: James Ward on AI's Role in Software Testing and Coding (link no longer online)
Transcript
Generated automatically by Spotify, so expect the odd misheard word. Select a timestamp to play from there. Download (.srt)
Read the transcript
0:01 Welcome to Happy Path Programming. I'm Bruce Eckel. I'm James Ward.
0:09 All right. Welcome to Happy Path Programming. Oh, we have a fun one today. So we have Stefan Jensen. Did I say Jensen right? You're from Belgium and so the the Jays are a little different there. Right. Well, it's great to have you. You've been, let's start with this. You've been a developer for a long time. Like what, 20-30 years 40? Yeah, it's longer. I was doing first BASIC on a Commodore 64, as many of us probably started there. And then I switched to assembly because I wanted to play and create games, but more hack games. And they put our intro in front of it and then distribute the games around the world. So it was more like a hacking assembly type of thing. But yeah, so from my 1516 years, I started and then luckily, you know, I, I did a switch when I was 28 to Java. And thanks to Bruce thinking in Java seriously. I mean, I used your book as the syllabus for teaching Java to many, many people.
1:13 You know we don't kind. Of embarrassed about that by now because there were things that I've learned then I go, oh, maybe we shouldn't have leaned so hard into the objects well. It was just a a path on part of the journey. It's. Still a great book. Yeah, I mean it helped so many people level up in their careers and and how they write code so. Yeah. And then the other one was Java in a Nutshell from Flanagan. I mean, I think those were two books really sitting next to my bed around 9596 and then basically started the Java user group in 98, which then gave birth to to Java Polis, which then rebranded in 2008 to Devox and then Devox. Well, yeah, now we have like 7 Devoxes, 15 Fox days and 20,000 developers reaching or or attending the events on an annual basis. Yeah.
2:06 And that's where many people May and Stefan from is from Devox. So we've got Devox coming up, Devox Belgium coming up in a couple months. So super excited I get to be there again. But yeah, do you want to say anything about Devox coming up? I mean, there's no tickets available because they sell out in two seconds or whatever, but. They get allocated in two seconds, but then people start releasing them once they internally verified if everybody gots a ticket. So we, we, we announced it this morning at 9:00. There were like 4600 people online refreshing tickets were all allocated in two seconds. But then luckily some started like, OK, we've got enough, let's release them now. Because it they get, they have 25 minutes to actually reserve the tickets. So, so there's still some tickets out there.
2:51 No conference tickets, but we have still the five day tickets or the five days tickets, which are the comic tickets. And it's from the 7th to the 11th of October. And we only have about 3500 people attending. Awesome. I'm excited to go back crazy. I'm. Actually, can I? Oh yeah, you got a plug. Yeah, we are having a developer retreat slash hangout very low or no structure at all. Formal developers get together exactly August 28th through September 1st and this is in here in Crested Butte. So it's anyway awesome if Yep. If anybody wants to come out and hang out with some nerds and write some code.
3:42 We, we, we just have a few people showing up at this point, but it's not, you know, there's, there's no structure to it and it doesn't cost anything. You just have to come prepared to stay in a motel or camp or something like that. And where do people get more information about? Oh, you know, we, we just kind of nailed it down. We have the Winter Tech Forum Slack group. Yeah, that's probably the best place. Sorry. It's. People can get access. To like, it's super casual to the point where it's, you know, we don't really have much in the way of officialness, OK. All right, well, let's dive into our subject for today. So Stefan, you have in your journey as a developer, you've discovered this future of being a developer, which is both using AI tools and like as a developer, but then also building things with AI and Gen.
4:52 AI. So I don't know, maybe just start with telling us about like, where are you with all this stuff? What's what's how are you using these things? Right. And is your tool the one that you mentioned before we started recording? That's an AI tool? Yeah, yeah. OK. Yeah. So you can also tell us about. That let me do one step backwards in the sense that I actually started using convolutional neural networks in 2016, 2017. And the reason why is that my son plays basketball and I was always, or I'm still recording the games, but I wanted to create automatically the highlights of the game. So what I did is I took 4000 pictures of a ball, converted them a bit in different shapes and different directions. So I had 12,000 versions of those pictures and then created a model so I could identify in a video stream where the ball was. And then I did the same for the hoop and I create a rectangle above the hoop, a rectangle below the hoop. And if the ball was in one of those rectangles, most likely a point was made so I could actually identify the highlights in a, in a basketball game.
6:04 So that was my first steps a bit in like, you know, I mean, I have lots of I try to automate lots of hobbies of mine and that's definitely one of them. And so that was a. Major hobby through AI. Oh yeah, absolutely. I mean, once it gets boring where you need to commercialize it, that's where I, I, I stop because then you have the hassle of customers and support and no then, then. Customers, yes. Your plate is full with customers when you're dealing with conferences, so you don't need any more of that. Yeah, exactly. So you were like into into this AI stuff before it was cool, before it was cool? Yeah, well, yeah, more or less. And again, on the level, right. I mean, I, I needed the solution. And what's the best way to get there and whatever it takes to get there, you know, read the books, get the courses and whatever.
6:58 And that's the fun part. And I think it was right after COVID that I started playing with GPT 2 and then gradually, because I was doing, you know, NLP, natural language processing already quite a while because we have like thousands of proposals. And I, I want to always automate it. Like one of the things I want to do was like, people had to enter their tags when they submit a talk, but it's like the tags are in the description in the title. So we need to just extract that automatically, right? So that's something I, I, that, that's very easy to do now, but it wasn't that obvious 3-4 years ago if you want wanted to use a large language model for that, right? But also other things I did was two years ago, I, I built like a prototype called Devox Insights. And what it did is that I, I wrote some Python. It was a lot of Python, not Java, unfortunately, where it actually we published all the talks on YouTube. I downloaded the the transcript from YouTube and then summarized the transcript.
8:03 So you got a summarization of the talk and, and so that was already nice. So you didn't have to watch the full talk, You got a real summarization. Then other things I did was like face recognition. We have a really amazing photographer taking thousands of pictures, doing Devox Devox events. So what I'm doing now ready for many years is taking your Twitter avatar and show you all the pictures that we found in our big database. We have like 25,000 pictures that we've indexed. And so speakers will get the next day or the week after, they will get all their pictures from the, the events. And so they don't have to search through 3500 pictures per events. So these are all like very pragmatic, but it brings added value to the DevOps experience. And so that's, that's really where the fun started. It's like leveraging models and then the, the, the next logical thing was like, for example, creating a summarisation. So if people submit a talk someday, submit like a full A4 abstract.
9:06 And as a reviewer, if you have to review 9900 talks, you just want to have an executive summary. So that's also in the CFP is that it creates a summary, which again, now with large language models, it's really, really that easy, right? So that's a very, very. Ask can can you give it an abstract and be like is this going to be a good talk? No, that's, that's, that's a bit more difficult because you need to compare it also with the, because a conference is like a story you want to tell, right. You really want to start with introductory talks and then follow up with more advanced and maybe a hands on lap and then a few more that go in more detail. And so that storyline needs to be identified. So it's probably possible with a bit of prompting, etcetera. But you need to give it a lot of contents. And one year ago that wasn't possible. I mean, one year ago we could give 4000 tokens. 1 token is on average three to four characters, right? So I don't know if you followed the Strawberry thing on, on Twitter where you ask Chachi PT, how many Rs does Strawberry have?
10:13 And it was always replying incorrectly. And why? Because Strawberry has like depending on the model, it could have two or three tokens where it doesn't know about the two Rs in the one token. It only knows about the token, not the individual letters you see. So anyway, one year ago we had like a window context. So if you create a prompt and you send it to the model, you have a window context. So that's the number of tokens that you can send it and the maximum was 4000 tokens. So that's like 12,000 characters average, which is not a lot not. A lot. Now, do you know how much we have in tokens in a Windows context? How much? 2 million. 2,000,000 OK. 2 million just.
11:01 In the last like year or two, we've gone from 4000 to two million well. Pretty well, yeah. And Bill took our book and asked it to generate a back cover blurb for it and he fed it the whole book and actually what it generated was like pretty amazing. Don't really have any arguments with. That paragraph summary of a whole book? Yeah. Yeah, absolutely. But I mean, I've got another Antonio Gonzalez, he's writing also a book and he contacted me on Monday and I said, yeah, just give it to Gemini with Gemini Google. Gemini is the one who has 2 million. His book was only 90,000 tokens. 90,000 tokens these days is peanuts. We're. Near the limit, yeah. Even a local model already supports up to 130,000 tokens just running on your machine.
11:51 Yeah. As in one year. The the pace is just insane. Exponential. So I have a question I understand I I did take linear algebra when I was in college, but I don't remember much about it at this point. I understand that you have to know linear algebra to be able to understand LLMS or. No, you don't. You don't. Break it down for us. What What is a model? What is a token? How do what's what is inference like? What are what are all these pieces? Yeah. So the the beauty is, is that there's definitely a lot of mathematics underneath. But as a developer, you just talk to a REST interface. That's really what it boils down to. You have a REST interface, and this is called like these LLM providers where you basically talk to a REST interface. You give it a context, you give it a prompt, you give it a temperature.
12:46 That's really important, where the temperature dictates if it's going to be creative or if it's going to be strict. If it's strict, it will always give the same answer. But if you give it creativity like 0.7, it will give constantly a different answer, but in a different flavour, right? So there's there's a few parameters which may be 5-6 maximum and that's it. You send it as a Jason to this LLM provider and it will return adjacent back with the the answer, the tokens it it took, maybe even the cost it took to to produce it. And this is calculated on the input tokens and the output tokens. So the input tokens is often can go to almost 2 million the return or the the output tokens is often only 4000 tokens because it's just a short answer, right. But this is also growing eventually. And and so there's multiple different implementations. So the beauty and that's why I'm so excited about it is that there's this open.
13:49 Well, yeah, don't get me sort of open AI because they're they're the least open of all the the LLM providers. But there are multiple open initiative. For example, Meta is really pioneering and most likely from business strategy, strategy point of view a very smart move. They've basically released an open source their models called LAMA 3.1, which is the latest one. And you they come in different flavours. So you have like the lowest one is 7 billion parameters that it has been trained on the highest. Parameter. So what does a parameter mean in this case? So you, you believe it, you, you basically have a, a neural network and it's all the parameters that it actually has been. How do you call that has been trained upon? And so it uses weights to identify what route it needs to follow via the different neurons. So the the weights with the highest number will actually be the one that dictates the route of the response. And in in in all simplicity, it is basically just a text extended then a text completed because you give it some words and based on the statistic meaning the semantic meaning of those words.
15:04 And that's the big difference since large language models. Before large language models, we did not have the semantic meaning of a word. With large language models, we now have a semantic meaning. So it knows if you have a bank where you take money or a bank where you sit. It knows based on the semantic context, what the bank word means, and that's the big differentiator. When you were doing just NLP, there wasn't really the semantic meaning. Now we have so it now it really knows what a sentence means if you're using the word bank. And that semantic meaning gets encoded in the training phase. So when it's coming up with the model, it has somehow encoded semantic meaning into that model. Correct. Yeah, correct.
15:51 But the beauty of of us being developers is that we just need to know the REST interface. So that makes it the, the, the, the entry is so low for developers because you just need to do a REST call, That's it. And so what's happening is that Open AI has dictated a bit how the structure should be. And then many others like Anthropic, Google, but even Meta and so on, they are following that structure. So there's like this, there's a bit of standardisation happening, which is great. But now, for example, just this week, there's already a new feature being added, which is called cache control. So what they want to do is that you give it like a big corpus, like your book, you give it your book. And I will only give it the book once because it's cached in the server side and then I can start asking questions. So the input tokens and output tokens, but the book is cached so I don't have to send it each time with every request. Well, that full cache control for the moment is only being implemented by Anthropic and by Google. And of course they both are doing the different syntax in the Jason format.
16:58 So like if you then are looking at AP is who work on a higher level, they need to try to find a common denominator to actually standardise that. So there's a bit of, you know, once hopefully Open AI joins with the cash control, there's going to be conversions where standardization will happen on that level as well. And then there's other pieces that are kind of related to this interface to the LLM like functions and rags. And so there's there's other kind of ancillary things around it as well. Maybe give us a rundown. What's a rag you? Know let's let's have stuff on and tell us all. About it, well, the RAG was really retrieval augmented generation. That's called, that's the acronym. It was basically generated for multiple reasons. One reason was because we can only give context of 4000 tokens.
17:45 So if I wanted to like for example, to AQ and A on your book, I could index your book into vectors. So basically what it does is that words are converted to vectors, which is a float. And that float, that vector has that semantic meaning, right? So you basically have an array of vectors which represents your words of your book. And then I could do a search on that vector. So the search would be a similarity search. So what I do is like, for example, I would say, what is the book about, right? So it would change my question into vectors. And then I have like maybe six, maybe 12 vectors and I will do a similarity search on the vectors array of your book with the vectors, questions vectors string. And it will do it has different it has different formulas, but the one would be the nearest point similarity results where basically you need to see these vectors as dots in a spacelikea.cloud and it would put your question into that cloud.
18:52 And all the dots which are nearest are most likely have a close semantic meaning. So that would mean that most likely, if I say what's the book about? You might have had a chapter which was about this book. So it would put my question next to your about this book and then take that chunk of text from your book as the prompt context to the question that is sent to the LLM. So what it would do is that so it would say what is the book about in the prompt? And in addition to the prompt, which is your window context, it would put your page about this book in the prompt. So then the LLM which is, has no idea about your book because it's not public, it's not been indexed. It knows the question, it knows this context of 4000 tokens maximum.
19:40 So we could answer that question based on that small text. I I've given it right and that's that. So this. Was like a, so zooming out for a second, I remember Paul Snidely. I don't remember if it was on our podcast with him or just in a conversation with him. He was like this. A lot of this AI stuff, maybe all of it, is really just compression. It's like we're taking a bunch of data, we're compressing it down. And that's I think why you're saying like the, the input contexts are larger than the output context, because in a lot of ways, the things that we want to use these for is just taking a lot of information and reducing it down. And so rag was is a way to like almost do like a pre compression of some some associated specific data. So that then the LLM kind of it has some additional information so they can give you back newer or better information. Correct.
20:35 Well, it helps with hallucination because what happens is that if they train a model, it has a state of information when the model was trained. So if it was trained two years ago, it does not know about Kamala Harris and the presidential things going on. So there's like this gap of information, a cut off information. So if you have questions about what happened after the model was created, you need to supplement that with RAC techniques. But also other companies are doing this for private data. So you can just take a large language model which knows about the language, the English language and a bit of Internet information that it has compressed. But if you want to add then confidential data, you need to use RAC to actually implement and supplements the context.
21:23 Basically that. So it's like filling in some gaps in what the model knows and and it helps with hallucinations to do that. Yeah, it helps with hallucinations because you basically are providing it with more accurate data in the prompt context, so. In now, given that our context windows are getting larger, is this like? Is this go away at some? Point because we can just. Provide it all in the input context. Yes, yeah. But I mean, that's at least my view is that, yes, what I'm doing currently like I I'll talk, I'll tell you a bit more about the plug in later on. But basically what you can do is you can give your full project like a Java project. I, I so I had an ID to do photo sharing for DevOps Belgium and I built it in 16 hours just with an LLM and the project was like 70,000 tokens. So I could give the full project in the context and then say hey, build me this feature and it would build the feature because it had knowledge of my full project. And it's like.
22:29 I understand Jetbrains is their their AI system which I just paid for a subscription will do things like it knows your whole project and so for example it can generate test code for you and stuff like that. So that's a great point you're bringing up, Bruce, because last year at Devox Belgium, during the opening keynote, I had Anton from Jetbrains do the opening keynote where he demonstrated the AI assistant. It was basically shown during the, you know, this was one year ago. And the question I asked him to Anton on stage, I've got a, it's on YouTube, you could find it. I said, like, are you guys going to support local models? And he said, well, I can't yet answer that.
23:15 And I said, and if you do, will it be pluggable so I can work with any LLM provider? And four months later, like in February, they still haven't replied. And then I've been like, OK, well, it's not gonna happen. I'll build my own plugin. And that's basically what I've been doing for the last six months now is that I build a plugin for Intellij in open source, free, but it works with local models, any local model and cloud models. And you just, they, if it's a cloud model, you just need to get the API key and you pay for the API key. But the beauty of the the plug in is that it allows you based on the window context available of the model that you've chosen or the provider you've chosen, it allows you to completely copy your project in the window context and then start chatting away. And that's where in my opinion, I've called it the error of the ape.
24:10 But the ape in the Dutch spelling, it's AAP and AAP stands for AI augmented programming because we are really entering and it's a revolution. It really is. I mean, I'm an average developer, but with these assistants I'm becoming a senior expert 10 times developer, full web stack guys, It's I. Had an experience over a year ago where I was, I had fallen into Rust and I was really focused on it for a couple of months. And part way through I started using the AI and the, you know, instead of reading somebody else's book and their examples that they thought were in order.
24:56 If you go, oh, I'm interested in this right now, create me an example and then you study that example. I found that accelerated my learning dramatically. Absolutely. Yeah, absolutely. I mean it is like a, it's basically an AI or a senior expert that you have on your side 24/7 and it costs you $20.00 a month. And I think a huge part of it is the fact that you're, you know, in our world, it's all about knowledge and that's our status and everything. And if you admit that you don't know something, even if you get used to doing that, it's still hard sometimes. Whereas when you're talking to the, there's no judgement. You can ask the dumbest question you want. It's always like, oh, that was a great question. You're like. That.
25:42 Was a great question. And there are, you know, there's things that I haven't asked forever because, oh, everybody knows this. And I'd look dumb. And then I'm happy to ask that and it'll explain it to me. And it goes, oh, this is great. Yeah. So. So those two things I think are just. Yeah, And it seems like there are tasks where this is really well suited, like you mentioned learning. So I'm new to Amazon. I've been having to learn a whole bunch of new things and Oh my God, haven't I used Q Developers since that's Amazon's thing and it's in Intellij and I'm just asking questions to it all day long as I'm learning new things. And so learning seems like, of course you're going to use these tools when you're learning something new, but what about when you're, I don't know, just like writing a boring CRUD application or something? Perfect.
26:30 But Even so, like the photo app I was talking about is a stupid photo app, but it was like I was able to really from scratch. I started on Sunday afternoon and on Monday evening I have a fully working deployed application doing sophisticated things which I would have, if I would have done it from scratch without an assistant. It would have taken me three weeks for sure, right? And that was like in 16 hours. That's like. The accelerated even kind of the the boring stuff. In particular the boring stuff, cuz it's like when you go in to try and do something and you go, I'm gonna have to go look up this and figure that out. And it's like it sounds like and when it when it gives you that and then you can focus on I wanna make it do this or that.
27:19 I don't know. I I have found it just to be dramatically helpful. In dealing with the tool I've used guys is the one from Anthropic called Cloud. So cloud has a has multiple models. The lowest one is Haiku, then you have sonnet and then you have Opus. So the one in the middle sonnet is version 3.5. It has a window context of 200,000 tokens. You pay $20.00 a month and what it has as a unique feature is that it allows you to create a project. So you create a project and it uses this cache thing. So what you can do, you create a project like My Photo app, and then you give it the full source code. Now to give it the full source code, there's a few tools you need to use.
28:07 There was one tool that I used to use called Code to Prompt. So it was like just a shell script, Python script, Code to prompt. And what it did is that it went recursively through your directory, created a tree of your project, and then it copied all the files underneath each other. And that was one big text file right now. Well, you then copy it immediately puts it in the clipboard. So you paste that output into the project. But the cool thing is this project was 70,000 tokens. I still had 130, 1000 tokens still available. So you can actually add extra PDF files or extra documents or other libraries that you're interested in using as a context. And then you start chatting.
28:53 And that program was basically created just with prompts. So it was like really producing code. Like I was saying, like, Oh yeah. So you have to create, but you have to give it some good context. So you need to be like the the technical project manager, which has to write the specs for the application. That's really important. And so being a developer and even a senior developer does help because you can say like, OK, I want to use Angular 17, I want to use Spring Boot 3.2, I want to use Firebase. So you give it all those details and then you start giving it the use cases of what you want, and it basically guides you through it. And if you would see my arm, there's goosebumps all over here because it's like, bloody hell, I'm living science fiction. This shouldn't be happening in my lifetime. And it is.
29:43 And it's only, I mean, this is the worst. It's moving too. Fast, like we've got all sorts of different tools that are becoming available and then tools that are just making this all essentially transparent where you don't even have to like copy, do the prompt code to prompt thing and copy it in. Like so Q developer that I've been using has like now a way to create the local vector database all transparently of your code and then you can ask questions of your code. So like the tools are just evolving so quickly in this space. So let me get some clarification. You said that your favorite AI tool is anthropic. Yeah, so I'm using Anthropic Cloud Sonnet 3.5 but the property drive is so. Good. It's I've been using it for a number of things and it's unbelievable. It is on the next level and and Opus is a is going to be even better and they're going to release it end of this year, probably after the elections, but Opus is going to be even better.
30:43 So it's like bloody. But the problem to your question groups is that you can only for $20, you can only ask that many questions per day. So you run out out of basically credits per day rapidly because you're including the full project in the cache and it takes a bit of token. So what I do then is that I move back to Intellij and I use my own plugin Devoxgenie, where I use the API key of Anthropic. And I basically just continue in the development environment of Intellij with my plugin. And so there I, I've built, I've basically, you know, I took the PHP code of code to prompt, gave it to Claude, said like rewrite it in Java for an Intellij plug in and then basically add it to my plug in. So now I can do a right click on my project in Intellij and say copy project to clipboard or copy project to prompt.
31:36 And it's in my prompt. It shows how much it's going to cost you if you send that and so on. And you basically continue in the development environment. So what's what's the plug in that you created called Devox Genie or? Something yeah, Devox Genie. So it was basically out of the frustration of Intellij not supporting local models and not being really open because I understand, I mean, they have to make a business out of it. And I mean, I'm, I'm not really into that. I think that their new multi line completion is local. Model. But but it's not. As far as I know that local model is not trained on your project and not very customizable so. You can't use A1 line code completion, especially if you can run Devoxini with a local model.
32:21 So there's multiple local models that you providers that you can start. You have like LM Studio, you have Yum. But the the most known one is Orlama, which is basically a wrapper around LAMA CPP. And LAMA CPP is like you remember the James FFM Peck. Yeah, yeah, yeah. That was like the Swiss Army knife to do video cutting or whatever. Well, Llama CPP is like the Swiss Swiss Army knife for large language models, for local and especially for Apple Silicon as well. So you can basically run it. It's in C++, but it has Apple Windows versions. You can run it and you link it to a model that you download from Hugging Face and it runs natively on your Apple Silicon.
33:10 And what it does is that it creates a web server which you can then talk to, very similar to the Open AI REST API. You can just talk to it locally from your machine, from DevOps Genie or whatever. And when you say Apple Silicon, you mean like the M1M2M3 chips? Yeah, because it needs that speed. Yes, well, I don't know the full details. I mean, you should really try to get the, I think. What's his name? George. George. He's from Bulgaria. Jerganov, Georgie. I mean, I tried to get him to Devox, Belgium, but he's just too busy. If you look at his GitHub stats, he's just all over the place. So I think, let's hop back for a second. I think a lot of people think about the AI assistant, coding assistant as being primarily around code completion. Like, oh, isn't it amazing that the AI can like like just write a bunch of code for me, But I haven't found that to be the most valuable part of these code assistants. But tell me your perspective on this. Like we were just kind of like talking about how the the multi line completion like like maybe that's not the the most valuable thing here.
34:23 No, not yet. Well, they've just recently I think this week announced the code completion for your shell command. So you can like enter like, hey, I'm looking for a command to do a list of the ports that I'm listening on and it will then give you the the command that it needs to run. I mean, that's already interesting, but I mean, for me, it's really like the fact that you can give it the full context of your project. You have the expert who knows the full project and if you want to write unit test or integration test, it will. And you even can say, Hey, write it with J unit 5 and use Mockito for that. It will do an amazing job because it has all that the full context of your project.
35:09 And I think that's that's the big eye opener. The other thing is that I'm sometimes on a train or on a plane and I'm very productive on the train, but there's no Internet. Well, then the I assistant can't really help me or I need to use my 4G. And so having local models, for example, LAMA 3.1, it will help you in very good ways, which I mean, they're getting so much better in, in every new releases that eventually we'll just have it locally running. But the cool thing is, is that, that's what I'm now doing a bit of research on is that we will move towards a large language model sharding. So you know, database sharding. So they're now doing this for large language models because the problem is if you have a, a llama 3.1 to 405 billion parameters, I think it's like, you know, it's, it's, it could be like 50 or 100 gigs.
36:05 I, I, I haven't downloaded it, but it's, it's huge in size, right? So you can't run it on one machine unless you have like a really beefy $100,000 machine. So what you're doing is that you're doing sharding where you only load a number of tensors based on the vertical or horizontal sharding. You can basically say only load a portion of that model into that machine, the other portion in that machine, and the last portion in another machine. And you create like a mesh of these three machines which talk to each other. And so if you give a prompt. Like model micro services. Whatever, it will go through all the different models on your different machines and then basically concatenate the result and give it to you.
36:50 It will still take a bit of time I've. Heard that one of the challenges with this approach is that somewhere you have to have a router that knows like, oh, you're talking about banks. How does it know that you're talking about like the bank that you get your money out of versus the other kind of bank. And so this the like first entry point into understanding how to then route to one of these other micro models. No, but it's. Different. That thing has to be pretty knowledgeable about everything to then determine. That's a different approach, James. That's not a sharding approach, OK? You see a routing where you go like, OK, go to this specialized narrow model which knows about the financial institutions. Yeah, that's basically what Apple is doing with their new iPhone is that they have like these adapters and these are small large language models and they're specialized in a certain area. For example, anything to do with the help system of an iPhone, it will have like an adapter for that. And so it yes it will do a routing based on your question it will go go to this model or that model. But the sharding is different.
37:50 The sharding is different. It's it's like, it's like database sharding I guess is what? You're saying it's cutting a large model which could never run on one machine into pieces and creating a glue where it goes and uses X amount of tensors on one machine and then goes with and takes the output of those tensors, give it as input to the next layers of tensors that that machine supports, and so on. And basically allows you to have a huge large language model like 400 billion parameters. This is like the RAID arrays of of models. So like how a RAID could give you a virtual disk across, you know, many physical disks. Yeah, like Beijing. So it's somehow dividing your model so that you can have those layers. How does that get figured out?
38:40 How do I visualize it? For the moment is like you have like a starting note and an end note and in between you have multiple notes which are connected and so you can have a vertical slice of sharding or you can do a horizontal slice of sharding and they are basically sharing the outputs Becomes the inputs for sorry, the output becomes the input for the next chart. Because it's the model, a graph, and so you can determine at what point you want to chop the graph and move it over and say, OK, once you reach this node, you can't go to the next node. You have to go to this other machine or something to get to the next. Node, but, and the beauty is Apple is starting to see the potential and they've released the library cord called MLX and MLX is a Python And AC library which actually supports this own silicon. So that's why I'm an Apple fanboy. So I have all Apple machines here. And so my, my, my plan is to, to basically write that in Java, but using the Python library or the C++ library using JNI or the, the Pygral.
39:49 I mean, Graal now has also a Python version. So I'm in, I'm in talks with the Graal people to see, hey, how can we make this work? Because it would make it a cool demo for for DevOps. It's like create this sharding using Java, using GRPC to coordinate and then using I think I'm using JMDNS to to basically do discovery of the different clients and it's like it's so much fun. It's so much fun. But it will not only the fun, it will allow me to run a model which has like 400 billion parameters. So I will have a much more knowledgeable expert next to me helping me without Internet connection. I mean, we are, it doesn't seem like we're that far from having essentially infinitely sized models like so large that that that's no longer a constraint.
40:41 Because right now it seems like there is a bit of a constraint on, on the size of our models. How big they can be is how much they know and how good they are. And the more, the larger they get, the better they get generally. I'm sure there's many other things that make them better as well, but this the, the, the curve of this is a hockey stick and we're going to reach the point where the models are very sufficiently large enough. So, so then, then what's the next challenge is like, like figuring out the places where these things can make our lives better? Like it's made you a more productive developer. It's enabled you to, to solve things like the basketball detection, highlight detection. So it's helped you solve some use cases, but where? Where's this going I guess?
41:27 Well, that's where I'm I'm using a phrase. We, we're like at this quantum superposition states, which is both both frightening and exciting at the same time because it's, it's, it's amazing, but it's also really frightening. I mean, if we extrapolate this, it might be that we just need people who write the specs and the code just comes out and the codes might not, might not be Java, it might just be pure assembly because it knows how to create assembly for that specific device. And we will not understand even what it produces. And that's why I call it ape, you know, the augmented or the AI augmented programming because it's the the next level of a stack overflow where you basically are copying, copying codes without understanding what you're copying, but it's working and but you don't know what it's what's what it's doing.
42:19 Yeah, but how different is that from every level that we've come up before? You know when we abstraction we had everybody was programming in assembly language and we had higher level languages and now we don't know what's happening at the machine level so. Yeah, I did a whole. Podcast on the on exactly that topic with Simon Maple this week. So we talked about this idea of like, like maybe a per the future programmer just writes the specification and who cares how the AI actually comes up with the implementation. Well, and I could see programs of the future as being more interactive in in, in terms of what the user needs. Like, we have a bookstore here and they're using ancient software, but it's not economically viable to put, you know, a team together to build new bookstore software. But if they could work with maybe 1 developer and, you know, an AI, and then once the program was created, if they needed a new feature, they'd go, oh, you know, what I really needed to do is this.
43:29 And it could be just something that would automatically be integrated like change. Based on the economic incentives around this or the economic structure, because right now there's not an economic benefit to anybody to create the app that the bookstore needs to manage. And a lot of other things when you think about, you go, no, it's the same thing we had before where it's like, Oh no, programmers are going to be obsolete. And it's like, well, actually most of the programs that we need the the economics haven't been there to justify writing them. And now this changes that This makes it possible. Instead of saying we don't need programmers anymore, it's like think of all the things that programmers could do right and the problems they could solve. With these tools, but what you see on Reddit, for example, there's so many people who are saying, look at what I've built and I'm, I'm not a programmer. I did not do any coding one week ago. But now I have creative ideas and I have the way to actually make them with this tool which guides me step by step. Exactly.
44:32 And well, the film industry is all worried about this, but I think, well, look at what it's doing now. It's it's turning out these horrible movies and spending tons of money on them, and they're awful because you have a bunch of studio executives screwing around with the creatives. Now, if you can let the creatives go directly to film, we'll see a lot of terrible things, but we will see things that will not get made in Hollywood and they'll be way better. Cruise, the next version of Netflix will be called Netflix AI and you will say, I want to see a horror movie with DiCaprio where he marries this person. What? And it will be created based on the prompt that you gave it.
45:19 And it will basically create a movie for you. And this is maybe that's going to be possible in two years time, not longer. I mean, I can already now create music. Just, yeah, no, I, I have a friend who has been writing musicals and he's using that for, for, for that. Yeah, that's an interesting idea because often I'll be watching a movie and it'll get to a point and I'll go, oh, this is stupid or I don't like this or whatever. And if I could just go in and go, yeah, don't do that, do something else. Yes, this is. This is redundant or uninteresting to me. Absolutely have this ending instead of that one and have his character in there and that right, that's gonna happen for sure. I mean, if you look at Runway, you give it a picture, which basically the picture is already generated by a prompt as well.
46:06 And then it creates A10 to 20 seconds video based on that picture that you gave it. And it's super realistic. Or, depending on the style that you want, it could be a drawing or whatever you call like bloody hell I mean. So we're, we're feeling somewhat good about the opportunity for AI to not squash human creativity, but actually enhance and, and grow and give us more space to live more creatively and. Well, the, the, the other thing I've thought of many times is the idea that here these companies are constantly, oh, buy our product, buy our product. I don't trust any of them, of course, because they have what I want is my own personal AI guy that knows my particular tastes. And so when I say you know what I would I need a new office chair and it goes.
46:57 I know what you need, just get. This. Shopper. And The thing is, I don't buy a lot of stuff because I'm overwhelmed with the research that's necessary. But if I had the thing that I trusted that was acting in my interest, then I would buy more stuff. Yeah, well, it's happening, Bruce. I mean, this week Google announced Pixel 9, so and the same with AI from Apple, the Apple intelligence smartly named, it's happening. What they're basically are doing is that on the device, they're vectorising all of your data which is on the device and it stays on the device. So it has all this information which it can then use as a way to to do prompting or based on your question, it will inject the contexts which already knows about what's on your phone and it will be able to give personalized, you know, recommendations or whatever that's there. You should put out the the Google Pixel demo. Oh yeah.
47:51 Windows had that new thing they were talking about where it was like basically screenshotting your whole system at. 30 frames a second. Or something, which is terrifying, but at the same time, there has been many times where I'm like, I want to be able to ask a question to the history of my interactions on my computer. Like that's totally a valid use case and I would love to be able to do that. But yeah, there's there's. It has to stay on device. I mean, if for all of a sudden that gets hacked and it gets spread, people will really know what you've done every second of the moment that it created a snapshot. It has to act in in the individual's interest for sure. That's that's what you. Well, the AI should know how to do that, Yeah. It should be able to be like, yeah, maybe we shouldn't. Maybe we should stop recording at this point to be able to be able to make those. Or, or maybe I could just say, hey, there's something wrong with my Internet.
48:44 Can you figure it out and then talk to the provider for me? And yeah, it's it's your own personal assistant. But but going back to your first question, James, when you said like, OK, you have large language rules, you have RAC and then you were talking about tools and agents. There's also the tools are also a very interesting aspect of the whole large language models, because now like there's a talk, I remember well, we selected talk for Devox Belgium about everybody hates date time, right? Playing with daytime and and time zones, etcetera. Well, with a large language model, you can actually ask a question in Java. So you well, first of all, I need to roll back a bit. Last year I had contact with a guy who started Lang Chain 4J and there's Langchain, which is a Python library and his ambition was to create a Java version of that. And he's he's, he's a, he's an amazing developer, but he's not very good in public speaking.
49:47 So we had a lady, Liz Ras, who's a Belgian but lives in Switzerland, who did the presentation at Devox Belgium last year. And since then, Langchain for Jay has just sky rocketed within the Java community. And so that's the Java API. If you want to talk to large language models locally or in the cloud, that's the API you need to use. It's. Like a unified API for talking to either local or cloud. Model, yes, yes, it's open source. It's really lots of contributors and it also supports this aspect of tooling. So what you can do is that you can create like a prompt where you say what is the date time on February 999 at 11:45. You give it a sentence, but you say I don't respect the string back, I respect I expect the date time back. And so you're giving it a text about a certain moment in time, and it will return a date time based on the prompts that it executed using either local or remote models. Bloody hell.
50:55 Yeah, just the way that it has been able to take these very, very not fun things to do and make it so you don't even have to think about it. But so if we move forward even more, we're still in this mindset of, oh, we have a problem to solve. We need to write a program. It seems like we're going to get to the point where, you know, my friends who are writing the bookstore, running the bookstore, they would simply say, oh, here's a new book, Here's a new book, you know, or take a picture of the books that have just came in. OK, now they're in the system. It knows physically where they are. And they don't actually have to write a program.
51:41 They just use the AI for everything. The the language, the programming language for the next couple of decades is the English language because you, you, you just write in English and it produces results based on your prompts. You don't write a code or a Java method to convert the text into a daytime. You give it a prompt with the information and it returns you the object that you are that you want. So a lot of people are predicting that. That's basically. There's been a lot of attempts at these like natural language programming languages. And I think I was seeing some tweets by Grady Buch around this and he's like, the reason why we have programming languages is because often the things that you need to express aren't easily expressible in a natural language, which is very open to interpretation. The reason why we have a more constrained language. And I, I kind of agree with with part of that, that, yeah, there are, there are things that can, that are really hard to express in natural language that are much easier to express in in a programming language.
52:52 But I don't know, maybe, maybe at some point the AI is smart enough that it can figure all that out. Well, it would be, I mean, you're talking about a way to specify something. And yes, spoken language is very flexible and so it doesn't have like type constraints and things like that. But through an iterative process, it would be able to say, you know, you, you would say, oh, no, that's not what I meant to this. And then it would add to the specification and do this, but it would be interactive with the actual customer who's who's using this, the actual end user. And you see the movement of like Open AI last week also announced that they will support Jason even even more strongly. So you can give it a prompt and it will return Jason. So that way you can really map it even more easily. And schema Jason, right, Like it was, yeah. So it wasn't just just like ad hoc Jason, which you know, Jason can certainly be ad hoc.
53:51 It was actually like you provide the schema and then what open AI gives you back is the Jason in that schema. So I'm done here. What the Jason schema is like the type information? Yeah. It's like with XML we used to have as well. It really reminds me a bit of that the. XS. DS. XML. But the beauty. I remember when XML was going to be everything. Yeah, exactly. But the beauty is like with line change four J, you have now these annotations where you, you have an annotation which describes what this method does. And because it's annotated, if you send it the prompt, it might return and say like, well, I don't know how to answer this, but I know that you need to call this method in this class to actually get the answer because the annotation said that this method does, for example, multiplication of matrixes, whatever. I'm just inventing something and that's. The annotation describes the behaviour of the function. Yes.
54:48 And that is included in the prompt. So if you give it a question, it will take that information with it and say, ah, you're asking a multiplication. You're just giving me a methods which does multiplication. So maybe you should call this method. And that's the whole tooling aspect. That's how it works. So you basically give it all the methods that you support. And if the model can't answer it, but it finds the methods that you've given it as a possible answer, it will say call that method. And that's the tooling aspect. And then you have like agents which will not only call the method, it will create a program like a Python program, compile it and run the program for you, but the program that it creates could be something which the model yeah generates based on your request.
55:37 So the the agents are kind of like macros or something. They're they're generating something that then gets used to to. And the tools are basically methods in a class that it might trigger based on the context. And you're using link chain 4 J on like the DevOps application to like power the tag summarization and and other other places as well. Yes. And it's it's beautiful code. It's like really one liners because it's it uses an interface. The interface has an annotation describing that. And it's it's it's beautiful developed. I mean, my hat's off to to the guy who did this, Dimitri. And since then, actually, Red Hat was so impressed of his DevOps, of the DevOps talk about Lang chain for J that they just hired him as a full time employee to work on this full time. But yeah, it's, that's the way.
56:29 If you're doing Java, there's basically a few options. Spring AI has also a prompting library. But I think the enthusiasm and the the yeah is really in the Lang chain for J area for for now at least. Yeah, on the JVM stuff. What else is interesting in this area that we haven't touched on so far? What about artificial general intelligence? What's the story with that? I mean, let's be honest, I mean, we've already passed the Turing test, right? Right. But, but we're still dealing with static models. I mean, we generate the model and it says they're what we need. We're. Just moving the flagpost constantly. Yeah, but we're not at AGI level yet because it can't do this or that. I mean, when, when Turing said, like if you talk to somebody you don't know if it's computer or not, we already passed that.
57:20 Oh yeah. But years ago, what? I want to know. I mean, it seems like so we're basing our models on a whole bunch of stuff off the Internet, and there's a ton of BS on that. And what we need is a system that is more of a science machine where it can say, OK, I need to verify this data and it needs to tell us or it needs to be able to do new experiments, the experiments that we haven't thought of and we can't think of. And it goes, boy, if I knew more about how grass grew, I would be able to answer a whole bunch of questions. So do that. Experiment. I want to see new mathematical and physical, you know, equations being popping out, which we never thought about. We're not there. Of course not, right. I mean, what open the eye says is that we are at, So the, the GPT 4.54 O is basically at the masters level for the moment.
58:14 That's what they're referring to. What they're predicting is that GPT 5 will be at the PhD level intelligence. Now, if it if it is able to know all the PhD thesis and index all of that, there's bound to be possibility. I mean, no human person in the world can know all the thesises that have ever been published. If you have a model which knows this and can grasp it, there's bound to be new discoveries that it all of a sudden links few papers together that we never thought were possible. Well, it's doing that kind of stuff now, able to to say, you're able to say, hey, I need a new material that I don't know, does heat transfer better or whatever. And it could, it can look through all of its corpus and narrow it down and say we'll try these three things rather than a chemist in the laboratory just randomly trying things.
59:08 The biggest question is that have we plateaued with the models knowledge or are we still growing And the majority of the engineers, they're saying it's still growing, it's still going better with every release. So if you just extrapolate that, then AGI is around the corner. I think we will experience that in our lifetime. I guess my question is, it seems like a really different thing when you're saying, OK, well we're we'll run all our machines for two weeks and cost $100 million and create this static thing. And if we need another one, we'll do it again versus something that can say, oh, here's a new piece of information. I will somehow incorporate that into my knowledge. Well, the CTO from from Facebook, Lacun is a French guy. He says that we will not reach AGI with just large language models on its own.
59:58 We need some extra innovation and new Star could be that's missing link. Q Star is an internal project in Open AI where they found. But again, this is hypothetical because I haven't published anything. That's why they are called Open AI. For irony's sake. Yeah, where it actually finds the best routes, but much faster. And there's so many eyeballs on this right now, so many bright minds looking at this, that it's it's bound to happen. And then we're just going to, you know, just think about it. I mean, it's science fiction that we're living it already. Not right now. Even without the AGI, it's already unbelievable. What's it's able to do? Solve the solid-state battery problem?
1:00:45 Yes, go. Yeah, exactly. Yeah, tons. Of things. I'm really excited to be alive. I mean, just imagine what we've already experienced, you know, the Internet, smartphones, you know, now large language models, Java, you know, it's just an exciting time. It's just. Exciting. Maybe by the time I I die, I go, well, yeah, we used to use programming languages to do things, but nobody does that anymore. Possible. It's totally possible. But yeah, it's just, I mean, there's definitely also some downsides here. I mean, if you just look at, have you followed what Grok has done? I mean, they released Grok 2 yesterday and they've partnership with Flux, which is basically a mid journey competitor to create images on text.
1:01:38 And Ellen being Ellen, he just said, well, there's no, there's no filtering, there's no guard rails. So you can say whatever. So you can say like, hey, create me a picture of this person with that person and it will create a realistic picture where you go like what the hell. Yeah, yeah. So like the deep faking thing? Yes. Absolutely. Going to get worse. Oh yeah. But not only pictures, they're like videos as well. There's examples of people who are just speaking like I am now. But you would see Tom Cruise instead, or your father or your brother asking to send over money and you with his voice and you don't know what's going on and go like, bloody hell yeah. Authenticity. We'll definitely need personal AIS to defend ourselves from. Stuff like that.
1:02:26 You know, you know. The arms race of AIS. Yeah, well, I one of the things that I see a great possibility of I, I have a friend who was the city attorney for Las Vegas for 35 years. And one of the things he was trying to solve was the home solve was the homeless problem. And a number of cities have done this and the ones that have been successful effectively required a therapist for each person on like a daily basis, which would just, you know, incredibly expensive. But there are AIS now that people are using as therapists. And as we develop that the, you know, the, the mental health issue that everybody struggles with that, you know, having an AI on your phone that you can say, I'm struggling right now and you're not making an appointment or you're not having to pay for it or anything that I think is going to change the world.
1:03:23 Yeah, but not only that, Bruce, the fact that we now have a universal tutor for $20.00 a month, that's going to change. Education. Yeah, exactly. Which has needed to been disrupted for a long time because it's built on ancient, outdated ideas. Yeah. So anybody with Internet and $20.00 a month to spare has an expert tutor next to him or her and it can learn you whatever you want. That's patient and non judgmental. Sorry. That is patient and non judgmental. Correct. Absolutely. Yeah, Neil Stephenson wrote a book called The Diamond Age and one of my favorites of his and and that's what he he effectively had the idea of a personalized AI for each student who who knew that person and could help them develop in their own way.
1:04:24 Isn't one of the challenges in this space that today the AIS are mostly the models are mostly trained on human generated information and that's important because then you know you have some connection to reality with the human being in the. Middle of the Internet crap, not so much. But isn't there some concern that that as are, as more of the content that is out there that the models are being trained on is actually itself created by AIS that you get like this lossiness that that gets worse as as there's more that that loop becomes happening more? So I don't know if I'm saying that. Right. But they called it synthetic data.
1:05:11 So it's basically generated data by AI. But I think we, we, we needed the Internet as a bootstrap, but now I think it's already beyond that bootstrap. It doesn't from I think it doesn't matter anymore because it has already enough knowledge now that if it if they basically index all the books that are available, all the thesises and so on. It it, I think it has passed that threshold. It has passed that you. Know it needs a connection with the real world so that it can validate its. Data. Well, that's the next point, right? It's the robots. Seriously, if you look at figure, have you looked at figure 02 robot Open AI has invested in that company. So they're merging Open AI Chachi PT with a robot, but the robot has fingers with sensitive touch. And a friend of mine works there actually now and it's basically. For me.
1:06:07 You know him, you vortex you, you know the parlay set he works there. Awesome. Bloody hell. So they're basically merging a robot with Chachi PT together, figure 02. Have a look at YouTube. You're going to like go like bloody hell. So they're next. Wow. Yeah. Well, and. Maybe I'll get to ride my mountain bike more in this future. Yeah, yeah, yes. Wow. Would be the best world, Yes. The The thing is, we're living science fiction. I mean, that's I love science fiction movies and like, you know, Space Odyssey 2001, that's it's there at least to communicate, communication with the robot and you know, and it opened the pods and what is it? Open the pod Bay door, Hal. No, can't do that.
1:06:57 Exactly. We've reached that point to be so, yeah. Wow. Yeah. All right. Well, Stefan, I look forward to seeing you at Devox in a couple months. And yes, thanks for sharing all your knowledge and experience with us around LM. So that was awesome. My pleasure. And it was really fun talking to you guys again. And I remember I've been to Crest Butte once with Java Posse Roundup, which was an amazing experience. Yeah, so. We'll have to get you back here sometime. Would be nice. I, I, I couldn't remember, I couldn't imagine that you could have so much snow on top of each other. Like what was it, 3-4 meters? I've never seen that before. So that was a really nice experience. I get a lot of snow. We do.
1:07:44 Come back sometime. Yeah, right. Thanks, Devin all. Right, see ya. You guys.