---
title: "Welcome Gemma 4: Frontier multimodal intelligence on device"
description: "Google DeepMind's Gemma 4 is an Apache 2-licensed multimodal model family in five sizes: E2B, E4B, a 12B encoder-free Unified model, a 31B dense model and a 26B MoE with 4B active parameters."
url: "https://swe.quest/articles/welcome-gemma-4-frontier-multimodal-intelligence-on-device-0f273ea2e465623b"
canonical: "https://huggingface.co/blog/gemma4"
source: "Hugging Face"
published: "2026-04-02"
difficulty: "medium"
kind: "Release"
reading_minutes: 36
tags: ["llms","inference","computer-vision","model-training"]
---

# Welcome Gemma 4: Frontier multimodal intelligence on device

A post on [Hugging Face](https://swe.quest/sources/hugging-face.md), published 2026-04-02, 36 min read, Release. Original: [https://huggingface.co/blog/gemma4](https://huggingface.co/blog/gemma4)

## Summary

Google DeepMind's Gemma 4 is an Apache 2-licensed multimodal model family in five sizes: E2B, E4B, a 12B encoder-free Unified model, a 31B dense model and a 26B MoE with 4B active parameters. The models take text, image, video and in some sizes audio, with context windows up to 256K. The architecture combines alternating sliding-window and global attention, dual RoPE configurations, Per-Layer Embeddings that feed a small per-layer residual signal, and a shared KV cache in which the final layers reuse earlier layers' key/value tensors to save memory and compute. Practical guidance covers modality ordering in prompts (images before text, audio after), native JSON bounding-box output on a 1000x1000 grid, and running or fine-tuning the models with transformers, llama.cpp, MLX, transformers.js, Mistral.rs and TRL.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [LLMs](https://swe.quest/tags/llms.md) (AI & ML)
- [Inference & serving](https://swe.quest/tags/inference.md) (AI & ML)
- [Computer vision](https://swe.quest/tags/computer-vision.md) (AI & ML)
- [Model training](https://swe.quest/tags/model-training.md) (AI & ML)

## Prerequisites

- transformer architecture basics ([easy posts on System design](https://swe.quest/tags/system-design.md?difficulty=easy))
- Hugging Face transformers

## Keywords

Gemma 4, Hugging Face transformers, llama.cpp, MLX, Per-Layer Embeddings, TRL, Google DeepMind

## Related posts

- [Gemma 3n fully available in the open-source ecosystem!](https://swe.quest/articles/gemma-3n-fully-available-in-the-open-source-ecosystem-6d60bf60e354184a.md): Hugging Face · 2025-06-26 · Medium · 9 min read · LLMs, Inference & serving, Computer vision, Speech & audio, Python
  Gemma 3n, Google's natively multimodal on-device model accepting text, image, audio and video, now runs in transformers, timm, MLX, llama.cpp (text only), Transformers.js/ONNX and Ollama.
- [Welcome Gemma 3: Google's all new multimodal, multilingual, long context open LLM](https://swe.quest/articles/welcome-gemma-3-google-s-all-new-multimodal-multilingual-long-context-open-llm-9610089c9e0bc05e.md): Hugging Face · 2025-03-12 · Medium · 13 min read · LLMs, Inference & serving, Computer vision, Python
  Gemma 3 is Google's open-weight model family in 1B, 4B, 12B and 27B sizes, with 128k context (32k for 1B), image input via a SigLIP encoder on the 4B and larger models, and support for 140+ languages.
- [PaliGemma – Google's Cutting-Edge Open Vision Language Model](https://swe.quest/articles/paligemma-google-s-cutting-edge-open-vision-language-model-eb2d13e0b9bcd3ec.md): Hugging Face · 2024-05-14 · Medium · 11 min read · Computer vision, LLMs, Model training, Inference & serving, Python
  PaliGemma is Google's open vision-language model family that pairs a SigLIP-So400m image encoder with a Gemma-2B text decoder through a linear projector.
- [Meta is back with Muse Glimmer: local, agentic, multimodal, and open source](https://swe.quest/articles/meta-is-back-with-muse-glimmer-local-agentic-multimodal-and-open-source-d709b4cd1d1af827.md): Hugging Face · 2026-08-10 · Medium · 18 min read · LLMs, Inference & serving, Computer vision, AI agents, Open source
  Muse Glimmer is Meta's new open-source (Apache 2.0) 30B dense multimodal model, distilled from Muse and built for local agentic use cases such as coding, document analysis and personal assistants.
- [Welcome Gemma - Google’s new open LLM](https://swe.quest/articles/welcome-gemma-google-s-new-open-llm-a7d68dd269473a81.md): Hugging Face · 2024-02-21 · Medium · 9 min read · LLMs, Inference & serving, Model training, Python
  Google's Gemma open LLM family ships in 2B and 7B sizes, each with base and instruction-tuned variants and an 8K context.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
