mavis-ai/Gemma4-E2B-MLX-Q4

This repository contains an MLX-ready Q4 distribution of Google's Gemma 4 E2B instruction-tuned model, prepared for local inference on Apple Silicon Macs.

This is not a newly fine-tuned model. It is a quantized MLX redistribution converted from Google's official Gemma 4 E2B instruction-tuned checkpoint. No structural modifications or additional training have been applied to the model architecture.

Important Notice

This repository is hosted primarily as a dedicated engine source for the R.E.V.I.S. application ecosystem. You are free to download and use this model package for your own local MLX projects or workflows, subject to the Apache License 2.0 and Google's Gemma terms.

For the original model card, architecture details, intended usage, limitations, and evaluation information, refer to the official upstream model:

Quantization

This package follows the quantization boundaries used by Google's official Gemma 4 QAT Q4 GGUF release, adapted for a regular Q4 build:

  • Source checkpoint: google/gemma-4-E2B-it
  • Default language tensor quantization: MLX affine Q4
  • Token embeddings: MLX affine Q6
  • Per-layer token embeddings: MLX affine Q6
  • Per-layer model projection: BF16
  • Audio, vision, and multimodal projection components: BF16
  • Group size: 64
  • Mode: affine

In practical terms, this is not a plain "quantize every linear layer to Q4" package. The embedding tables are intentionally kept at higher precision, and the audio / vision side of the model is not aggressively quantized. This keeps the MLX package closer to the official Google QAT Q4 tensor policy while still reducing local storage and memory requirements.

Optimized for R.E.V.I.S. (Local Cognitive OS)

We host and test this model package to serve as a compact local reasoning and judgment engine for R.E.V.I.S.

R.E.V.I.S. is a 100% local Cognitive OS for Multi-Agentic AI. It transforms your Mac devices into a distributed Agentic Swarm via zero-config Wi-Fi clustering, allowing you to run heavy AI workloads like recursive web research, dynamic RAG generation, and multi-step logic without killing single-machine performance.

If you are interested in pushing the limits of local AI and open-weight models, check out our project.

Usage

Install or update the MLX runtime you use for Gemma 4 / multimodal models:

pip install -U mlx mlx-lm mlx-vlm huggingface_hub hf_xet

Download the model:

hf download mavis-ai/Gemma4-E2B-MLX-Q4 \
  --local-dir ~/Models/mlx/Gemma4-E2B-MLX-Q4

Run a quick text generation test:

python -m mlx_vlm.generate \
  --model ~/Models/mlx/Gemma4-E2B-MLX-Q4 \
  --max-tokens 256 \
  --temperature 0.0 \
  --prompt "Say OK."

Usage Notes

Gemma 4 E2B is the smallest model in this branch and is suited for fast local RAG support, routing, lightweight judgment, and repeated agentic tasks.

For heavier judgment, long-document inspection, or stronger second-opinion reasoning, the larger Gemma 4 variants may be more appropriate if your Mac has enough unified memory.

License

This repository redistributes a quantized derivative of Google's Gemma 4 E2B instruction-tuned release, which is distributed by Google under the Apache License 2.0.

This derivative is likewise distributed under the Apache License 2.0. A copy of the license is included in the LICENSE file in this repository, and can also be found at https://www.apache.org/licenses/LICENSE-2.0.

Modification Notice

Compared with the official Google source checkpoint, this repository applies the following packaging modification:

The source checkpoint was converted to MLX format and quantized with a mixed Q4/Q6/BF16 policy for local MLX inference.

No fine-tuning, additional training, or architecture-level modification has been applied.

Downloads last month
25
Safetensors
Model size
1B params
Tensor type
BF16
·
U32
·
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 mavis-ai/Gemma4-E2B-MLX-Q4

Quantized
(294)
this model