Skip to main content

Model guide

Gemma 4 E4B Instruct

Gemma 4 E4B gives you a larger effective-parameter model than E2B while retaining text, image and audio-input capabilities. Compare the two on your intended modality rather than a generic chat prompt. The E4B name is not the full storage size, and local audio support must be checked separately from image support.

8BMultimodal131,072 token contextView the model card →

At a glance

Parameters
8B
Accepts
Text · Image · Audio
Returns
Text
Published context limit
131,072 tokens
Model format
safetensors · GGUF
Software and download hosts
Ollama · MLX. Follow the exact setup below; this list does not establish support for every format, input type or software version.
Suggested compression
Q4_K_M
Model-weight download
Q4_K_M weights · 5.34 GBlmstudio-community (community conversion)gemma-4-E4B-it-Q4_K_M.gguf
Media companion download
mmproj-gemma-4-E4B-it-BF16.gguf · 0.99 GB. Both downloads total 6.33 GB.
Languages
35+ supported languages; pre-trained on 140+ languages
License
Apache 2.0

Will it fit?

Gemma 4 E4B Instruct · Q4_K_M download. Fit depends on your computer, the app you run it in and the conversation length you need. Audio processing and media companion files need additional memory.

Check on your computer

Best for

  • Compare E4B with E2B on the same notice image. Keep the model that reads your actual signs at an acceptable wait.

Choose something else when

  • Budget a 5.34 GB weight file before any projector or image processing.

Using image input

Image setup: follow the image check.

Using audio

Use a client that supports this exact model's audio pipeline and the matching media companion when required. A text-only chat does not use speech. Measure peak memory for your audio workload.

First setup

Check a representative task

Use the same image as E2B for a like-for-like visual comparison; keep the native audio example separate.

Setup for this check: Open llama.cpp image setup and start the server with the matching projector.

Test image

In the llama.cpp vision session, attach this image and paste the question below. Keep the answer key out of the prompt. Crop to the table if you cannot save the image.

Which entrance should a visitor use on the closure day? State the day as well. Do not invent opening hours.

Check the result: South entrance on Tuesday; no opening hours are provided.

The image attachment and matching image-processing components must actually be loaded. A text-only run, or an answer inferred from pasted text, does not pass the image check. This small fixture does not establish accuracy on scans, complex charts or real documents.

For audio, use the publisher's Transformers workflow with google/gemma-4-E4B-it. This downloads native weights, not the smaller GGUF listed on this page; dtype and device allocation change memory needs. Install python -m pip install -U transformers torch torchvision librosa accelerate. Use a Transformers release containing AutoModelForMultimodalLM and Gemma 4 support; update it if either is unavailable.

Record a short non-sensitive WAV saying “The meeting starts at ten thirty” as meeting.wav beside example.py. Save and run:

from transformers import AutoProcessor, AutoModelForMultimodalLM
repo = "google/gemma-4-E4B-it"
processor = AutoProcessor.from_pretrained(repo)
model = AutoModelForMultimodalLM.from_pretrained(repo, dtype="auto", device_map="auto")
messages = [{"role": "user", "content": [
    {"type": "text", "text": "Transcribe this English speech into English text."},
    {"type": "audio", "audio": "meeting.wav"}
]}]
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=512)
print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:], skip_special_tokens=True))

Run python example.py. Check that the transcription preserves 10:30; output is text, not spoken audio. Keep audio below the publisher's 30-second limit. An allocation error means this native workflow needs more memory or a different supported allocation.

For an image check in the same program, replace messages with the following, using a local photo meeting.png of a note reading Meeting 10:30:

messages = [{"role": "user", "content": [
    {"type": "image", "url": "meeting.png"},
    {"type": "text", "text": "What meeting time is written here?"}
]}]

Keep image content before text, rerun the input-processing and generation lines, and check the answer against the photo. An interrupted response is not a completed answer.

Other models for this task