Gemma 4: 31B — Google's Local Model Just Got Hard to Ignore
Google released its new family of local AI models, Gemma 4.
It needs to be said that a large company like Google, which releases open-source local models, is a good thing. Not enough of these companies continue to develop and release these types of AI models for local use. It's one of the most important tools for using an AI model to ensure data security and privacy. Google designed Gemma 4 specifically for edge devices like desktops, laptops, and even mobile phones.
My first dive into Google's local models was Gemma 3. It was a good model that I used in some workflows depending on my needs.
Gemma 4 is an upgrade.
My tests and usage have all been specifically with the Gemma 4: 31B model. After the download finished, I asked all models the same initial question: "What can you do?” Gemma 4's output was nicely organized, with an initial short summary, followed by a list of categories and subcategories for what it can assist with. It looks to be quite versatile, but to keep it short, Gemma considers itself a digital assistant, researcher, and creative collaborator.
While I'm not a real developer, I still like to test coding with local models by asking it to create a simple browser game.
I started with a simple prompt: "I want to create a web-based game like Mario Bro’s, but features a white lion as the main character. Before we start, ask me any questions that you need answered in order to get the best outcome."
Gemma came back with several questions about gameplay and mechanics, art and visuals, level design, technical preferences, and audio. In each subject, it gave me several questions, which made me really consider what was needed for something as simple as a browser-based game. In the past, I've used the same type of prompt but haven't received as many questions or as much detail.
This was a great start, and it told me that Gemma 4 has been trained in a way that includes details that we might be forgetting.
I did my best to answer the questions Gemma asked. One of them involved the art, which was about where I was going to provide it. I ended up asking Gemma to do its best to give me placeholders if it couldn't generate them for me. In the past, the models would, for the most part, create something that may have looked somewhat lion-like. This made me question if Gemma 4 could do that.
Gemma 4 went to work.
It started with a response about how it will use specifically colored blocks for certain items: a white block for the lion, red for the enemies, and pink for the steak power-ups. From there, it wrote the game's code.
Once it was completed, Gemma gave me instructions on how to run the code. This is a good addition for those who don't know how to run HTML. It also provided me with instructions on how to replace the colored blocks when I was ready. That was something I didn't expect, but I liked it a lot. I placed the code into a file named "index.html", saved it, then launched it in my browser.
It loaded the game with a dark gray background and only some text about the lion's health and status.
Nothing else... Oof, this is a rough start.
Sometimes AI can stumble; it's not perfect, so little things like these can be expected. I went back to Gemma 4 and explained the issue. After a short time, I had some new code to test out. It also gave me steps to retrieve logs if the issue persisted, which was unexpected but in a good way. I put the new code into a fresh HTML document and launched it in my browser.
It works!
My white block lion could jump, move forward, move backward, and defeat the red block enemies when you jumped on their heads. As I moved forward in the world, I came across pink steak blocks that made my lion a larger white block upon contact. In fact, I realized in that moment that the lion's "Status" went from "Little Lion" to "Big Lion!” That one cracked me up as soon as I saw it. I wasn't expecting it at all.
Now that a decent amount of context has been used, it was time to push it to the limit.
I really wanted to see if the Gemma 4 model could do something with the characters’ looks to make it more like what they were supposed to be. That was the next task that I put on the model. It made the lion look like a ghost, but I understood why. When I say “white lion,” it thinks of all-white and wouldn't include grays for subtle details. The enemies and the steak were good enough to my liking, though. This is 8-bit art, so I'm not expecting a Picasso here either.
After telling Gemma that I wanted some grays in the lion's look so you could get a little more detail to make it look like a lion, it came back with something I was happy enough with.
With each iteration and change, Gemma 4 kept delivering. It seemed able to adapt and keep up without issues.
Eventually, little things would come up. The look would stay consistent, but if I asked for the power-up to do one thing, another factor involving the power-up wouldn't remain consistent. For example, the lion would become invincible, rather than taking two hits to be defeated. If I tried to correct this, it would only make the lion grow, but it would still take only one hit to be defeated.
While this happened, it wouldn't be as bad as before, making it seem as if I could eventually reach the state I wanted the game to achieve.
This is a testament to the progress of local models over the past year. Context lengths are larger and more reliable. Models can handle larger context lengths better than before.
Gemma 4: 31B has impressed me more than I expected with its capabilities, and has made its way onto my short list of models for a couple of projects and workflows. The more I use it, the more I find myself preferring it over others.
Google has delivered a functional model that appears flexible enough for a wide range of uses, from chatbots and agents to your imagination.
Don't take my word for it, though. Try the Gemma 4 models for yourself. While you're at it, let me know your thoughts in the comments.