Downloads · 30 days
31
2% of all-time downloads
jorch/gemma-4-e4b-it-lm-4bit
gemma-4-e4b-it-lm-4bit is a text generation model from jorch. Use it when you need the model to write or continue text. It is set up for mlx. The card lists the license as apache-2.0.
Text-only extraction of Google's Gemma 4 E4B instruction-tuned model, converted to MLX format with 4-bit quantization.
Downloads · 30 days
31
2% of all-time downloads
All-time downloads
1.6K
Public
Parameters
7.5B
4.3 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors4.2 GB · 99%
How the weights are stored.
U327.5B · 100%
From the Hugging Face model README
Text-only extraction of Google's Gemma 4 E4B instruction-tuned model, converted to MLX format with 4-bit quantization.
This is the language model component only (no vision/audio towers), suitable for text chat on Apple Silicon devices including iPhones (8 GB RAM) and Macs.
| Spec | Value |
|---|---|
| Base model | google/gemma-4-e4b-it |
| Architecture | Gemma 4 with Per-Layer Embeddings (PLE) |
| Parameters | 8B total, 4.5B active |
| Hidden size | 2560 |
| Layers | 42 |
| Attention heads | 8 (2 KV heads) |
| Vocab size | 262,144 |
| Context window | 128K tokens |
| Quantization | 4-bit affine (group size 64) |
| Download size | 3.9 GB |
| License | Apache 2.0 |
Converted from google/gemma-4-e4b-it using mlx-lm with Gemma 4 support from ml-explore/mlx-lm PR #1095:
python -m mlx_lm convert --hf-path google/gemma-4-e4b-it -q --q-bits 4 --mlx-path ./gemma-4-e4b-it-lm-4bit
from mlx_lm import load, generate
model, tokenizer = load("jorch/gemma-4-e4b-it-lm-4bit")
response = generate(model, tokenizer, prompt="What is machine learning?", verbose=True, max_tokens=512)
Requires Gemma 4 text model support in mlx-swift-lm:
import MLXLLM
import MLXLMCommon
let configuration = ModelConfiguration(id: "jorch/gemma-4-e4b-it-lm-4bit")
let container = try await LLMModelFactory.shared.loadContainer(configuration: configuration)
The mlx-community/gemma-4-e4b-it-4bit model was converted with mlx-vlm and includes vision/audio towers. That conversion is missing critical text model weights (norm, per_layer_projection_norm, per_layer_model_projection), making it incompatible with text-only LLM loaders.
This conversion uses mlx-lm which properly extracts and preserves all text model weight keys.
| E2B | E4B | |
|---|---|---|
| Active params | 2.3B | 4.5B |
| Download | 2.5 GB | 3.9 GB |
| Quality | Good for everyday chat | Noticeably better reasoning |
| Speed | Faster | Slightly slower |
| iPhone 8 GB | Comfortable | Fits with headroom |
This model powers SoloAI — a privacy-first iOS chat app that runs Gemma 4 entirely on-device.