Introduction: Free, Private Coding with Gemma 4 & Claude Code
Imagine if you could use Claude code 100% free and private on your own computer. In this video, I'm going to show exactly how to combine the Claude code framework with Google's brand new Gemma 4 model. So, you can code at $0, build as much as you want on your machine with no limitations or rate limits. And work from anywhere with no internet required, and you can set it up in minutes, even if you're a complete beginner.
And if you don't know who I am, my name is Jack Roberts. I built and sold my last AI startup to 60,000 customers, and now I run my very own profitable AI automation business. So, if you haven't already, grab that coffee, and let's dive straight in.
The Case for Local AI: Benefits of Offline Models
Claude is the most powerful model on the planet, the 4.6 family. But, if you run out of tokens, it can stop you dead in your tracks. However, we can use the Claude code framework with another model, which will be 100% local, which means it lives literally on your laptop, on your computer, doesn't exist anywhere on the internet. And you own it, just like we used to with old-fashioned games, DVDs. It is something you physically have on your computer. And this is where Gemma 4 enters the picture. You might be wondering, Jack, why do I care? How does this affect my life? Well, let me tell you why.
First of all, there's 10 reasons. Privacy. It is $0 to run. There's no internet required. There's no rate limits. There's very low latency. You have full control over it. There's no vendor lock-in when you go local. In other words, you don't have to go with one particular provider within the Claude code framework. It's very compliance-friendly. It's always available. And you can experiment with it in an unlimited way.
Understanding the Tradeoffs: Local Gemma vs. Paid Claude
Now, when we're talking about using Claude code, obviously, the best way to think about this is Claude code is as the car, right? It is the framework. It's like the analogy I used in my video last month about how this works. But then, the model itself is the engine. So, we can use a Claude code framework with a completely different model. So, let's use all the things like your plugins and that sort of stuff. Now, obviously, there are tradeoffs.
Now, if you have, you know, $200 a month to buy the Claude Max plan, I think that is unbelievably worth doing because it is an AI employee. Don't compare it to like a subscription like you would do Netflix or your gym. It is like the equivalent of having a 50K salary person for $200 a month. It's incredible. But, if you do want to use this system, there are tradeoffs that you should know about. Obviously, one is cost. So, the more you pay, the better performance you get. In other words, Opus 4.6. Privacy, speed, and crucially, performance. So, for example, you may be of the view like, "Jack, I will be happy with 80% of the performance for 1% of the cost." That might be true of what you personally like to do. And systems like this enable you to do that. And it's something you can even run in open Claude or your own ass systems, if you want to.
Meet Gemma 4: Google's New Open-Source Model
Now, installing Claude code locally and for free won't make any sense unless you understand why we're doing it and why there's so much discussion now about Google's brand new model Gemma 4 and how this changes things with Claude code. So, Gemma 4 is open source, which means that anybody can use it. In addition to that, you can run it locally, which means you don't need to run it on a server.
And there's actually four sizes you can run on your computer based on your device. You can even run this on your mobile phone. You can do the E4B for laptops and tablets, 26B, which is 26 billion parameters on workstations, and then they've even got some larger ones. Coolest use case, I think, is you're flying to Wherever's-ville, that's a real place, believe it or not, and you have no internet connection. I can now ask this model questions on my laptop or any open source model with no internet. It's really, really freaking cool. So good, and you need to learn the skills of how to use any local source model, and it is unbelievably easy to set up. So, it has four sizes you can pick from based on that. And what we're going to do is basically ask Claude code, "Hey, here are my specs. What should I use?" And it will literally inform me about that.
Why the Apache 2.0 License is a Game-Changer
So, there's only eight things you need to know about Gemma 3. Number one, it's the third on Arena AI, so it's very, very powerful. It's built with the same DNA of Gemini 3. It's got four sizes for every device. It's got the Apache 2.0 license, which I don't see enough people talking about. Let me tell you why that's important. So, check this out, for example, okay? The way you used to work before, and I put this to make it easy, is that the models had this Google custom license. That meant that they had a proprietary license with the usage restrictions and terms that Google could update whenever they wanted to. They had these things like vague harmful use, so when you're building on it, you had to be really careful about how it worked. And it was what it created what we call commercial ambiguity. So, lots of enterprise teams would often choose Claude on Mistral instead, purely because of the friction caused by the licensing.
What Apache 2.0 changes is a standard, well-understood open source license that basically says, "Look, use it however you want to. No harmful use carve-outs like you can't be creating atomic bombs and stuff with it. No custom clauses on beauty. It's commercial use. You can modify it freely. You can redistribute the weights, sell access, sell first for clients, fine-tune, and share them." And so, you can see a kind of breakdown here. The Apache 2.0 license is incredible. Just more liberation for everybody to go ahead and use it.
The other thing here is it's got reasoning encoding built into it. A 256K context window. Obviously, not as big as the million from Claude Opus 4.6, but it's still pretty good, especially compared to last year. And these trends are only heading in one direction, and that's towards the stars. It's natively multimodal, which is obviously Gemini's bread and butter. And obviously, 100% private on your computer, doesn't go anywhere else.
Now, if you're going to make an informed decision, it's good to understand how this actually compares to Opus 4.6. Let's have a look at it. So, you can see here the differences of what it actually physically looks like compared to Sonnet 4.6 and Opus 4.6. It isn't quite as powerful, but at the same time, it's not exactly the worst thing in the world. Your performance is going to be lower. The context window is lower, but you can see here, based on these benchmarks, the extent to which you actually trust them, it's up to you. You can see the price there with the tradeoffs that you got. Now, what are the real tradeoffs in sort of language, Jack, that I would really understand? Okay.
So, what you lose when you go from Claude Opus 4.6 to Gemma? Well, raw intelligence, 90.5% to 85.2 on this benchmark. Complex multi-step reasoning. Sustained reasoning change. Instruction precision. Context quality scale. Tool use sophistication. It can still do all those things, but not quite to the same level as Claude. What you gain is a real forever total privacy, no rate limits, no watermarks, works offline. Honest take, 80% of tasks at $0, and the hard stuff, 20% with Claude. So, the idea is that we can use Claude code for the big brain thinking, and then we delegate. For example, we wouldn't ask Albert Einstein to mop our floors. He might be best served on a whiteboard with lots of scribblings to figure out math equations and various physics questions.
Step 1: Installing Ollama and the Gemma 4 Model
Now, let's go ahead and actually install this. And to do this, we're going to be using Ollama, which is this wonderful... You're going to... You won't believe how straightforward it is to get models running on your computer. It's so freaking cool. So, first step is to get, if you like, the actual model running on our computer, then we can fix it into any environment we want to. So, I want you to head over to ollama.com. I'll bring this down so you can have a great look and see what it is. There we go, ollama.com. Then what we're going to do is come here and click on download over here. And we're going to download the Ollama app. Download for Mac OS. Or, if you're on Windows, obviously, download the Windows version for yourself.
So, here's our happy llama, and we bring him over and we drop him in the folder. Wonderful. And then let's open it up. And here he is. We double-click on him, and he will open up wonderfully. And it'll ask us to sign in. So, if we haven't already, we're going to go ahead and create an account. Wonderful. Then once you've created it, you'll see this. And if you go to any model, these are all... Look at these models, guys. Oh my gosh. And you can download them basically onto computers. So, if I say something like, "Hey," it'll ask us to sign in. Well, it should do, if practically speaking, unless we're signed in. If you're not signed in, basically, you need to connect it together. The way that you do this over here is click on sign in, for example, on the top right-hand corner, or create an account. I'm going to go ahead and connect to my Gmail account.
But, if you're not sure which model to use, you can click on the top left into my icon, click on about this Mac, and this will pop up. And all you're going to do is take a screenshot of this, literally, and then you can open up a new terminal in Anti-Gravity, like so. And again, if this looks like Spanish, watch this video on screen. It'll explain everything about Anti-Gravity and how to set this up. Then what we're going to do is come up and we're just going to run. Then we're going to run Claude, and we're going to paste this in, and we're going to say, "I would like to run Gemma 4, the brand new model by Gemini. Based on the specifications of this desktop, which model would you recommend for me to install?" And it'll tell you specifically what to go ahead and install. And then we basically get all the recommendations back, so it shows you how big they are and what it thinks. Now, I think this one here is the best choice, the 27 billion. But, we're going to go ahead and do the E4B. But, what you can actually ask Claude is, "Hey there, dude. Could you give me the command I can enter into my terminal to install this on my computer from Ollama?" Okay. Hit enter, and then it'll give you... You just literally copy and paste. I already know what mine is. I'm going to open up a brand new terminal, and I'm going to enter in this, which is going to be ollama pull Gemma 4 E4B. We hit enter. What this will do is pull the manifest and start to download the whole thing onto our computer, which is really freaking cool. Pulling the manifest, it's just downloading all this all this free model for us.
Step 2: Testing Your Local Gemma Model in Ollama
So, now that's actually complete, you can see it's all done, and we can validate that by actually coming over to the Ollama app. And you can see now, if I click on this button here, I will see Gemma 4 E4B. So, I can ask it a question like, "Hey, who was the tallest man to ever live?" And up, let's see what it comes back with. It's having a little think. Cool. And it's showing me it's thinking, so it's literally breaking down how it approaches it. There you go, Robert Wadlow, 8 ft 11. And this is all running completely locally on your computer. So, whether we are flying overseas and there's no internet or we're deep in a bunker, we can have these conversations now about anything that we want to.
And the cool thing is, it's multimodal. So, what I can do is literally screenshot something. So, say I even screenshot this chat right there, sorry. I can come down, I can click on clipboard, hit enter, throw this in, and be like, "Hey, what is this image about?" And it'll be able to break that down and give us back to us because it's completely multimodal, which is such a cool advantage. And there you go, based on this, it's a record fact sheet, the tallest man alive, Robert Wadlow. Again, this is the multimodality of Gemma, which is just so freaking cool.
Step 3: Integrating Gemma 4 with Claude Code for Free Coding
And so, now you've got the brand new Gemma model downloaded on your computer. The next thing that we need to do then is basically put this within Claude code, so we can run Claude code for free locally at $0.
Now, to do this, I'm going to head and open up Anti-Gravity again. Now, to run Claude, we're going to do the following prompt, which is going to be ollama launch claude. When I come down, I pick Gemma 4 E4B. I will say, in reality, you wouldn't want to go for the 4 billion. You want to get as big as you possibly can. The smaller they are, the more kind of reluctant they are to do some things sometimes. So, ideally, the bigger models are obviously way better, but it's all driven by the capacity of your of your desktop, right? So, now we're in here. I'm going to say, "Hey, what's going on here?"
Now, if yours isn't connected, or you've got your OAuth set up, do {forward slash} log out like so. Come down here, sign out from everything, and what you want to do is connect your API key. Now, you're going to need around $5 to $10 in your console.anthropic.com account. This isn't going to take any money from it. It just needs that so the API key service will actually work. In reality, you're running it from your your local computer, so it don't won't make a big difference. And by difference, I mean you're not going to pay anything for it. You just need to do that, and here's where you go. platform.cloud.google.com. You'll sign in, you'll give it a verification code, and then you literally deposit 10 bucks, and then you can use it for free as much as you want to.
Now, interesting thing, this took it more time. Again, this is a smaller model. I just did it for demo purposes. So, just to test it works, I'm going to write a really simple prompt, which is create a file hello.html in the current directory with a basic HTML page that has a centered heading that says hello world in a dark background. Now, this isn't the fastest model in the world, and it's not the strongest compared to Opus 4.6. It is just the best model on the planet right now. But, for me, the fact that I can be flying on a plane and be coding with Claude code to my heart's content, and obviously I don't install a much bigger model on my laptop, is amazing. That I can just do this, let it run and rip and do whatever I want to. And as you can see, this guy is... it's now literally pulling it up. We're going to allow all edits during the session. And this is freaking crazy. You can even flip through plan mode, accept edits, all this sort of stuff that you would do in normal code. And it's done it. So, accept all the edits on this hello.html, which is awesome. I can say, "Awesome, open this up for me in a local host." And as you can see, I now gave it the prompt create a file hello.html. It wrote it. I said, "Open it up for me local host." And now it's done it. So, I might just say, "Open up one more time." And it literally will just pop it up, and we can physically see hello world. So, it's done it. It's literally coding on your desktop.
Conclusion: Local AI Limits & What's Next
Now, running these incredible models for free on your laptop is one thing. But, the problem is that these models are limited by the size of your laptop and your computer, which means there's going to be a power limit at the top. So, the next thing we need to learn is how we can run powerful models for free that are not limited by your desktop, which we can do by watching this video right here.