Gemma 4 E2B, 4-bit MLX (slim)

A slimmer re-pack of mlx-community/gemma-4-e2b-4bit, a conversion of google/gemma-4-E2B:

  • The audio and vision towers are removed. The model is text-only.
  • All other weights are unchanged.

The weights are 2.63 GB instead of 3.58 GB (โˆ’27%). In Pretype's evals the outputs match the original (details). The license is the upstream one (Apache-2.0).

Made for Pretype, on-device autocomplete for macOS. It is the completion model of Pretype's Gemma E2B 4-bit tier, the default on 16โ€“18 GB Macs.

mlx-lm 0.31.3 rejects the unused key/value projections of the KV-shared layers in strict mode, so load without it:

from huggingface_hub import snapshot_download
from mlx_lm import generate
from mlx_lm.utils import load_model, load_tokenizer
from pathlib import Path
path = Path(snapshot_download("nikimoriOne/gemma-4-e2b-4bit-slim"))
model, _ = load_model(path, strict=False)
tokenizer = load_tokenizer(path)
print(generate(model, tokenizer, prompt="The quick brown fox", max_tokens=20))

Pretype loads it with mlx-swift-lm.

Downloads last month
310
Safetensors
Model size
5B params
Tensor type
U32
ยท
BF16
ยท
MLX
Hardware compatibility
Log In to add your hardware

4-bit

Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for nikimoriOne/gemma-4-e2b-4bit-slim

Quantized
(43)
this model