BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News Gemma 4 12B Enables On-Device, Multimodal Agentic Workflows with an Encoder-free Architecture

Gemma 4 12B Enables On-Device, Multimodal Agentic Workflows with an Encoder-free Architecture

Listen to this article -  0:00

Google says that Gemma 4 12B is "designed to bring agentic, multimodal intelligence directly to your laptop", further noting that the new model can be combined with Google AI Edge to "build and experiment locally, on everyday machines". This integration allows for a wide range of capabilities, from autonomous data processing to generating visual insights and even building webpages or executing tools.

Architecturally, Gemma 4 12B employs a novel unified, multimodal encoder-free architecture, which bypasses the need for separate, multi-stage vision and audio encoders by feeding multimodal data straight into the LLM. This design addresses a recurring inefficiency in traditional multimodal models that rely on separate video and audio encoders as a preliminary processing step, which leads to increased latency and fragmented memory footprints.

Gemma 4 12B solves these issues by utilizing a single decoder-only transformer containing the same advanced decoder structure as the Gemma 4 31B Dense model.

The 35M-parameter vision embedder replaces the 27-layer vision transformer used in other medium Gemma 4 models by projecting raw 48×48 pixel patches directly into the LLM’s hidden space using a single matrix multiplication, while a factorized X–Y coordinate lookup injects spatial positional information during the input stage.

The audio wave projection eliminates the need for a separate audio encoder. Instead, it directly slices 16 kHz audio into 40 ms frames (640 samples) and linearly projects them into the LLM input space.

Furthermore, using the same weights for multimodal inputs simplifies fine-tuning by allowing adapters (such as LoRA) or full tuning to update the entire multimodal loop in one single pass.

Gemma 4 12B can be accessed through the Google AI Edge Gallery showcase app, the Google AI Edge Eloquent on-device, voice dictation app, and LiteRT-LM.

With the Google AI Edge Gallery app, developers can “generate and execute scripts on the fly” and turn natural language instructions into working code. For example, Google demonstrated the model's ability to create a Python program to render a PNG chart comparing the top 10 girl names born in 2024 versus 2025.

As a final note, Genmma 4 12B can be used with existing harnesses like OpenCode using LiteRT-LM's, which can start an OpenAI-compatible server with litert-lm serve, or llama.cpp. The model is available through Hugging Face, Ollama, LM Studio, Google Cloud, and other platforms.

On Reddit, LoveMind_AI wrote "this might actually be one of the most exciting models I've heard about in a long time. The encoder-free model is... wildly cool. Native audio on a 12B model is very exciting". Similarly, Wrong_Mushroom explained that the benefits of being encoder-free is "it allows you to share images, and audio without an extra file. It also means that the models dataset is trained with those in mind. So in theory it should be more accurate".

When it comes to the model's coding ability, while some commenters show doubts about its effectiveness, few writes that he used it "to build a python app with a server and client side. I'm blown away by how nicely it's doing. The context is wild (in a good way). It's one-shotting a ton without making mistakes". Additionally, triynizzles states that "it will be decent on simple tasks but not a replacement for qwen 3.6", explaining that he used it successfully to explain a given code path or fix a logic bug but that likely for "anything more ambiguous it will start to fall apart".

For a deep dive into the model and its architecture, do not miss Maarten Grootendorst analysis.

About the Author

Rate this Article

Adoption
Style

BT