Google's Gemma 4 model received five significant architectural improvements without retraining: a critical tool calling parser fix that prevents malformed output from breaking under long context, a vision token budget control mechanism that compresses images into soft tokens for efficient processing, flash attention for chat template optimization, reduced model laziness, and Hopper-specific optimizations. These updates demonstrate how model performance can be enhanced through architectural refinements rather than parameter increases, with the tool calling fix alone being sufficient to make the model viable for production agentic workflows.
Deep Dive
Prerequisite Knowledge
- No data available.
Where to go next
- No data available.
Deep Dive
Gemma 4 Just Got a Massive Update (Tested Live Locally)
Added:Gemmafour is a sweetheart, a darling.
Gemmafour, Google's open multimodal family, five sizes up to 256k context.
We covered this on release thoroughly.
Today's not about the model. It's about what just got fixed under the hood.
Five things changed this week just like few hours ago.
Green dot on this HTML means I'm testing it live right now. Shortly, tool calling and vision.
Hollow dot means it's Google's claim, not something I have verified myself.
Flash attention for chat template, reduced laziness, all Hopper specific or unbenchmarked. So, I'm not going to pretend I tested them all, but look, if you are using that architecture, I'm more than sure you are going to enjoy these enhancements. This is Fahad Mirza, and I welcome you to the channel.
So, for the purpose of this video, we are going to use this Ubuntu. This is my GPU card, Nvidia H100, the Hopper architecture.
Fresh Ubuntu box. I'm going to serve vLLM.
And this model, let me quickly run that.
So, this is a serve command. This enables the Gemmafour tool parser, the [clears throat] reasoning parser, and a custom chat template vLLM ships specifically for this model. While it serves, let's talk what exactly has happened in detail without boring you much. So, here is actual breakdown. Google shipped five fixes just few hours ago, all on the same weights, no retrain, no new checkpoint. Two of them I'm testing live today, the tool calling parser, which had a real bug where malformed output would break under long context. You also mentioned it under my videos when we covered them last time.
And the vision token budget, which controls how much detail Gemma pulls out of an image. The other three, flash attention for chat template smoothing, reduce laziness, I'm leaving as Google's claim, not mine. Flash attention for specifically only runs on Hopper GPUs.
So, if you are on anything older, that one doesn't really apply to you at all.
I'm using the Hopper, but the compilation and build of flash attention for takes long time, and I really don't have that much time today.
But, I will definitely talk a bit more about it.
Look at this. This is the E4 benchmark chart from Google's own materials, agentic and tool calling benchmarks BFCL, and few others. You can see that airline jumped almost eight points, telecom over six. These are Google's numbers, not something I ran myself, but they line up with what we are about to test live.
And the second one, this image, I mean, is the one the official announcement straight [clears throat] from Google, and that is what looks quite promising.
So, that is what we are going to test, but while it downloads the model, let me show you something very interesting.
So, this is the model being downloaded.
So, look at this vision token budget.
So, here is what is happening here, and this is a hugging face demo.
You tell Gemma how many tokens you want to spend on an image. That's your budget. So, for example, if I just say 70, you see this is the image it has just spent 70. Uh and you can see it landed on 384 by 384 pixel using just 64 actual tokens. Similarly, let me Sorry, let me click on 140.
And it has improved, and this is how many tokens it has used. So, this algorithm takes your original photo and shrinks it down to fit that budget, chops it into smaller patches, then squishes group of these patches together into what's called as soft tokens.
That's a compressed version of the model actually reads. Lower budget like this, faster and cheaper, but less detail.
Let's say if I just bump it to up to 1120.
And you can see that you get way more detail, which is better for OCR or reading fine text.
I'll just scroll through.
And this is the budget.
Original, and then this is what it looks like.
You see?
So, this is the improvement they have done, and I think this is real economical, real good stuff.
And while the model is served now, I just wanted to show you something very interesting which I also didn't know before.
It is actually using flash attention for. I thought maybe I would have to recompile it, but that is not the case.
Um so, FA4 or flash attention for is real and active on our H100.
And I think this is quite good. Okay, let's now go and test it out.
Model is being served, and let me show you the VRAM consumption at the moment.
So, with KV cache it is using just over 77 gig of VRAM.
So, for the testing, I'm using this script. This does two things. First, it checks if Gemma correctly hands off a weather question as a structured tool call, not just text. That is what was happening earlier in the previous version of the model.
And then, this script feeds a fake result back and checks if the model actually uses it to answer, proving the fix holds across a real two-step exchange. And this is the whole code I'm going to use. Okay, so now let me go back to the terminal and run this.
And there you go, very quick, very fast.
As you can see, the fix is working. Turn one, content is empty, but tool {underscore} calls is populated. It correctly extracted get weather with Sydney as a structured call, not leaked as text. Turn two, we fed it a fake weather result, and it used that data to write a real answer. Clear, 21 degrees.
That's a bug from the Hermes um thread, but they have patched it without any Hermes. Hermes is still lagging, by the way. But VLLM is working with the new model, and fixes are in. And I think now you can use tool call without any problem.
So, that's it. That is uh what I wanted to cover, and honestly, with flash attention for support and a real tool calling fix, and this much control over vision tokens, I'm surprised Google didn't just call this Gemini 4.1. It's more than a patch note, but that's the kind of the point, I guess. Same weights, same download, real improvements underneath.
If you're running Gemini 4 in any agentic setup, the tool calling fix alone is worth pulling today. And I know for a fact that lot of people, especially in the West, are using these Gemini 4 models, where they really don't want to go with any non-Western model, and they were really struggling to get these tool calling work with real-world use cases. I think this is a huge blessing for them.
Um but, of course, the only uh problem here is that, especially with the flash attention, you have to go with the hopper, which is expensive, I know.
But if you are serving this 31 billion parameter model in production, you really don't have any other option but to go with the 80 GB GPU card which I just showed you. Let me know in the comments if you are already using it and if you are looking to upgrade it very keen to know about your use case.
Also, if you want to help out the channel, please become a member by either just going to this front page of the channel and becoming a member from this link or checking out the first pinned comment. Thank you for all the support.
Related Videos

Expanding Stikbot thumbnails
leopoldshorts
2K views•2023-09-24

Digital Discrimination: Cognitive Bias in Machine Learning
redmonktechevents2974
4K views•2019-12-18

Evolutionary Approach to Clustering by Ujjwal Maulik
ICTStalks
279 views•2019-06-26

Rose Yu "Learning from Large-Scale Spatiotemporal Data"
networkscienceinstitute
2K views•2019-03-04

Stanford Seminar - Generalization through Task Representations with Foundation Models
stanfordonline
4K views•2025-07-14

Satellite-Based Wheat Yield Forecasting using GEE & Transformer Neural Network
gisrsinstitute
634 views•2025-06-15

Paradigm Shifts in Data Processing for the Generative AI Era: Robert Nishihara of Anyscale & Ray.io
GradientFlow
2K views•2025-01-02

How to Build Your Own GenAI-Based Knowledge Management System
2150GmbH
360 views•2025-06-03
Trending

Gremlin Arrives… While Dorothy May Takes Another Step Forward
The-moons
10K views•2026-07-23

Playstation NO DISC/NO BUY Fight Is Over...
DavidJaffeGames
4K views•2026-07-23

Americans Confused in Australia for 17 Minutes Straight
IWrocker
17K views•2026-07-23

FURIOUS Raskin CORNERS DOJ over Trump DARK PAST!!!!
MeidasTouch
237K views•2026-07-23