gemma-4-e2b-it-4bit-textonly
A stripped-down MLX build of Google's Gemma 4 E2B (instruction-tuned), based on mlx-community/gemma-4-e2b-it-4bit, with the vision tower and audio tower weights removed.
Gemma 4 E2B is natively multimodal (text/image/audio), but the vision and audio encoders together account for roughly a quarter of the checkpoint's size while going largely unused in text-only chat deployments. This variant drops both, shrinking the download from 3.55 GB to 2.5 GB (~30% smaller) with no change to the language model's weights or quantization — text generation quality is identical to the source model.
Built for MLX Chat, an iOS app (not yet released) that runs Gemma 4 fully on-device. Apple App Store review flagged the original build's download size, and this app doesn't use image or audio input, so both towers were removed rather than kept unused.
- Source:
mlx-community/gemma-4-e2b-it-4bit - Removed: all
vision_tower.*,embed_vision.*,audio_tower.*,embed_audio.*tensors (1,415 of 2,511 total) - Quantization: unchanged (4-bit affine, language backbone + embeddings, same as source)
config.json:audio_configset tonull;vision_configleft in place structurally (some MLX loaders instantiate the vision module unconditionally) — load withstrict=Falseif your loader errors on the missing vision weights
What this model can't do
No image or audio input. Text-in, text-out only. If you need Gemma 4's multimodal capabilities, use the upstream mlx-community/gemma-4-e2b-it-4bit instead.
Usage
pip install mlx-vlm
python -m mlx_vlm generate \
--model ddalcu/gemma-4-e2b-it-4bit-textonly \
--prompt "Explain what a black hole is in two sentences." \
--max-tokens 80
If your mlx-vlm version raises a shape error while loading, load with
strict=False:
from mlx_vlm import load, generate
model, processor = load("ddalcu/gemma-4-e2b-it-4bit-textonly", strict=False)