Developers · September 16, 2026

Gemma 4 Model Family Introduced

two people drawing on whiteboard
Kaleidico / Unsplash

The Gemma 4 model family has been released by Google, marking a significant advancement in open-weights model ecosystems. This new model family aims to provide high-level capabilities under a permissive Apache 2.0 license, allowing machine learning practitioners to maintain control over their infrastructure and ensure data privacy.

Gemma 4 includes various models, such as the parameter-dense 31B and the structurally complex 26B Mixture of Experts (MoE), in addition to lightweight versions designed for edge computing. A key feature of this model family is its native support for agentic workflows, which enables the generation of structured JSON outputs and the ability to invoke function calls based on system instructions. This transforms the models from simple reasoning engines into practical systems capable of executing workflows and interacting with external APIs locally.

The introduction of tool calling, also known as function calling, represents a critical architectural shift for language models. Traditionally, language models have struggled to provide real-time information, often leading to inaccuracies. Tool calling allows models to evaluate user prompts against a registry of available programmatic tools, format structured requests to trigger external functions, and synthesize responses based on live data.

To facilitate the creation of a local, privacy-first tool calling system, the Ollama inference runner will be paired with the gemma4:e2b model, specifically designed for mobile devices and IoT applications. This model operates effectively with a 2 billion parameter footprint, optimizing system memory and achieving near-zero latency execution while ensuring strict data privacy by functioning entirely offline.

The implementation of the tool calling system will rely on standard Python libraries, avoiding unnecessary complexity while ensuring portability. The initial setup includes the creation of a function to access real-time weather data from the Open-Meteo API, with the function converting city names into geographical coordinates for accurate API requests.

As the system processes user prompts, it constructs JSON payloads for the Ollama API, linking it with the gemma4:e2b model. The system evaluates returned messages to identify tool calls, executes the necessary Python functions, and injects real-time data back into the conversation, enhancing the model's ability to provide accurate responses based on live context.