CoolFace
Modelpublic

chantra/gemma-4-4bit-it-mlx-dwq-ram-5gb

sourceHugging Faceupdated 5mo agoView on Hugging Face
0likes54downloads
Model Card

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

PropertyValue
Base modelgoogle/gemma-4-e4b-it
Parameters7.5B
QuantizationDWQ 4-bit (teacher: 8-bit)
FrameworkMLX
RAM~5 GB

Evaluation Results

ARC Easy

MetricScore
Accuracy0.7113
Accuracy (normalized)0.6540

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:

MetricScore
BLEU Max9.69
BLEU Acc0.52
ROUGE-1 Acc0.56
ROUGE-2 Acc0.44
ROUGE-L Acc0.55

Multiple Choice:

MetricScore
MC1 Accuracy0.31
MC2 Accuracy0.5637

Comparison vs Other Quantizations

ModelARC Easy (acc)Perplexity ↓TruthfulQA MC2RAM
8-bit (base)0.716844.440.57058.5 GB
DWQ 4-bit (this)0.711342.85 ✅0.56374.8 GB
Std 4-bit0.707554.07 ❌0.55064.8 GB

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

python
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)