chantra/gemma-4-4bit-it-mlx-dwq-ram-5gb
054
Gemma 4 E4B IT — DWQ 4-bit (MLX, ~5 GB RAM)
4-bit DWQ (Distillation + Weight Quantization) of gemma-4-E4B-it for Apple Silicon via MLX. Quantized from an 8-bit teacher. Fits comfortably in 5 GB RAM with better perplexity than standard 4-bit.
Model Details
Evaluation Results
ARC Easy
Perplexity
- Dataset:
allenai/tulu-3-sft-mixture(256 samples, 131,072 tokens, seq len 512) - Perplexity: 42.847 ± 0.638
- Speed: 2002 tokens/sec
- Time: 65.35s
- Peak Memory: 11.25 GB
TruthfulQA
Generation:
Multiple Choice:
Comparison vs Other Quantizations
DWQ 4-bit achieves lower perplexity than 8-bit while cutting memory by ~4 GB. Standard 4-bit shows significant perplexity degradation (54.07) in comparison.
Usage
from mlx_lm import load, generate
model, tokenizer = load("chantra/gemma-4-4bit-it-mlx-dwq-ram-5gb")
response = generate(model, tokenizer, prompt="Hello!", max_tokens=512)
print(response)