Gemma 4 E4B
compact multimodal model from Google
2 min readupdated
Gemma 4 E4B is an open multimodal model from Google DeepMind that takes text, images, video, and audio as input and generates text output. While it has 8B total parameters, PLE (Per-Layer Embeddings — separate embedding tables for each layer) brings the active count down to just 4.5B effective parameters, making it lightweight enough to run on laptops and mobile devices. Unlike its larger siblings (26B and 31B), E4B packs a built-in audio encoder, native thinking mode, and system prompt support. It's a solid fit for developers building local assistants, agents, and apps that need to process multiple data types offline without relying on cloud APIs.
Key features
- Full multimodality — handles text, images at any aspect ratio, video (frame sequences), and audio (speech recognition and translation).
- Efficient architecture — 42 layers with hybrid attention (alternating 512-token local windows and global attention) and 4.5B active parameters out of 8B total.
- Thinking mode and function calling — reasons step-by-step before answering (
enable_thinking=True), supports thesystemrole, and offers native function calling for agent workflows. - Long context and multilingual support — up to a 128K token context window, pretrained on 140+ languages with out-of-the-box support for 35+ languages.
- Permissive license — released under the Apache 2.0 license in both base and instruction-tuned (
-it) variants.
What you can do
- Local voice assistant — use the built-in audio encoder for on-device automatic speech recognition (ASR) and speech-to-text translation.
- Document and screen parsing — extract handwritten text, charts, PDFs, and UI elements inside local automation scripts.
- Autonomous tool-using agent — wire up the model via
transformerswith native function calling and system prompts to execute multi-step tasks.
Example
from transformers import AutoProcessor, AutoModelForMultimodalLM
MODEL_ID = "google/gemma-4-E4B-it"
processor = AutoProcessor.from_pretrained(MODEL_ID)
model = AutoModelForMultimodalLM.from_pretrained(MODEL_ID, dtype="auto", device_map="auto")
messages = [{"role": "user", "content": "Write a short joke about saving RAM."}]
inputs = processor.apply_chat_template(messages, tokenize=True, return_dict=True, return_tensors="pt", add_generation_prompt=True).to(model.device)
outputs = model.generate(**inputs, max_new_tokens=256)Read more
DetailsBenchmarks (-it version): MMLU Pro — 69.4%, MMMLU — 76.6%, LiveCodeBench v6 — 52.0%, MATH-Vision — 59.5%, FLEURS (audio, lower is better) — 0.08.
Architecture: 8B total parameters (4.5B effective), ~150M in the vision encoder and ~300M in the audio encoder, 262K token vocabulary.
Optimized for on-device inference on laptops and smartphones, supported in the latest version of
transformers.









Comments