gemma4_unified

Model type

gemma4_unified

Class

Gemma4UnifiedModel

Task

gemma4-unified

Source

models/gemma4.py

Description

Unified gemma-4-12B (gemma4_unified) multimodal model.

Encoder-free counterpart to :class:Gemma4Model: it shares the gemma4 text decoder and the multimodal-fusion embedding sub-model, but replaces the SigLIP vision tower and Conformer audio tower with the lightweight encoder-free embedders (:class:_Gemma4UnifiedVisionEmbedderModel and

class:

_Gemma4UnifiedAudioEmbedderModel).

Builds a 3- or 4-model package (built by :class:~mobius.tasks.Gemma4UnifiedTask):

Always produced:

  • decoder: gemma4 text decoder taking inputs_embeds (and input_ids for the vision-block bidirectional mask, which it derives internally; dual head_dim, k_eq_v)

  • vision_encoder: raw-patch vision embedder

  • embedding: scaled word embedding + multimodal feature fusion

Added when config.audio is not None:

  • audio_encoder: raw-frame audio embedder

Registered as gemma4_unified.

Usage

mobius build --model <MODEL_ID> output_dir/
from mobius import build

model = build("<MODEL_ID>")