Instructions to use MichaelAnthony/gemma4-e2b-Snowfox-MLX with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use MichaelAnthony/gemma4-e2b-Snowfox-MLX with MLX:
# Make sure mlx-vlm is installed # pip install --upgrade mlx-vlm from mlx_vlm import load, generate from mlx_vlm.prompt_utils import apply_chat_template from mlx_vlm.utils import load_config # Load the model model, processor = load("MichaelAnthony/gemma4-e2b-Snowfox-MLX") config = load_config("MichaelAnthony/gemma4-e2b-Snowfox-MLX") # Prepare input image = ["http://images.cocodataset.org/val2017/000000039769.jpg"] prompt = "Describe this image." # Apply chat template formatted_prompt = apply_chat_template( processor, config, prompt, num_images=1 ) # Generate output output = generate(model, processor, formatted_prompt, image) print(output) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- Pi
How to use MichaelAnthony/gemma4-e2b-Snowfox-MLX with Pi:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "MichaelAnthony/gemma4-e2b-Snowfox-MLX"
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "mlx-lm": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "MichaelAnthony/gemma4-e2b-Snowfox-MLX" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent
How to use MichaelAnthony/gemma4-e2b-Snowfox-MLX with Hermes Agent:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "MichaelAnthony/gemma4-e2b-Snowfox-MLX"
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default MichaelAnthony/gemma4-e2b-Snowfox-MLX
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use MichaelAnthony/gemma4-e2b-Snowfox-MLX with OpenClaw:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "MichaelAnthony/gemma4-e2b-Snowfox-MLX"
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "MichaelAnthony/gemma4-e2b-Snowfox-MLX" \ --custom-provider-id mlx-lm \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
| base_model: google/gemma-4-E2B-it-qat-q4_0-unquantized | |
| library_name: mlx | |
| pipeline_tag: image-text-to-text | |
| license: apache-2.0 | |
| tags: | |
| - gemma4 | |
| - mlx | |
| - mlx-vlm | |
| - fp16 | |
| - qat-derived | |
| - snowfox | |
| # Gemma 4 E2B SnowFox MLX FP16 | |
| This repository contains exactly **one** MLX variant: the unquantized **FP16** | |
| SnowFox model. It is a genuine MLX safetensors package, not a GGUF file or a | |
| renamed Hugging Face BF16 checkpoint. Four safetensors files make up one model; | |
| the shard split is only for reliable large-file download. | |
| SnowFox is a language-only LoRA merge based on Google's Gemma 4 E2B instruction | |
| QAT-derived checkpoint. The image and audio towers were frozen during fine-tuning | |
| and are retained here, together with the processor and tokenizer needed by | |
| MLX-VLM. | |
| ## Exact lineage | |
| - Base: [`google/gemma-4-E2B-it-qat-q4_0-unquantized`](https://huggingface.co/google/gemma-4-E2B-it-qat-q4_0-unquantized) | |
| - Pinned base revision: `6befbaca7398925921802abd1f277b495b78b738` | |
| - Canonical merged BF16 source SHA-256: `b8fac0ad2cafcb0e7fe29ca6c1deda1389c645751599fe716d4b6f6c0387a2d5` | |
| - Conversion: structurally converted to the MLX-VLM v0.6.13 Gemma 4 tensor contract, then cast from BF16 to FP16 for storage. | |
| - Claim boundary: QAT-derived from the base; SnowFox was not trained in FP16 and the post-LoRA weights were not newly QAT-calibrated. | |
| ## Package contents | |
| - `model-00001-of-00004.safetensors` through `model-00004-of-00004.safetensors`: the one FP16 MLX model. | |
| - `model.safetensors.index.json`: complete shard map. | |
| - `config.json`, `generation_config.json`, `processor_config.json`, tokenizer files, and `chat_template.jinja`: Gemma 4 E2B multimodal support files. | |
| - `mlx_export_manifest.json`: source/output provenance and artifact hashes. | |
| ## Verification performed | |
| The Windows conversion host does not have a compatible MLX runtime, but the | |
| stored model conversion was exhaustively verified before upload: | |
| - 1,951 source tensors mapped to 1,951 MLX tensors with no missing or extra keys. | |
| - All 5,104,298,467 stored values were checked after conversion. | |
| - Every output tensor is finite FP16, has exact BF16-to-FP16 values, and its | |
| safetensors shard declares `format=mlx`. | |
| - The largest absolute stored weight is `900.0`, below FP16's finite limit. | |
| - The full image/audio/projector tensor set is present; Gemma 4 audio convolution | |
| weights use the MLX-VLM axis layout. | |
| **Apple-Silicon MLX-VLM inference has not been run from this Windows/AMD release | |
| host.** Treat this as structurally validated conversion data pending a real | |
| Apple-Silicon text, image, and audio generation smoke test; do not interpret the | |
| SnowFox training validation scores as fresh MLX runtime results. | |
| ## Run on Apple Silicon | |
| Use full MLX-VLM, not text-only MLX-LM, because Gemma 4 E2B includes image and | |
| audio components: | |
| ```bash | |
| python -m pip install "mlx-vlm==0.6.13" | |
| python -m mlx_vlm.generate \ | |
| --model MichaelAnthony/gemma4-e2b-Snowfox-MLX \ | |
| --max-tokens 128 \ | |
| --temperature 0.0 \ | |
| --prompt "Explain what SnowFox is in one sentence." | |
| ``` | |
| For image prompting, add `--image /path/to/image.png` to the generation command. | |
| Use current MLX-VLM documentation for image, audio, video, and chat-template | |
| options. | |
| ## Quantized variants | |
| Standard MLX-VLM affine quantizations of SnowFox are published as separate | |
| repositories and are loadable directly by `mlx_vlm.generate`: | |
| | Variant | Quantization | Size | Notes | | |
| | --- | --- | --- | --- | | |
| | [`gemma4-e2b-Snowfox-MLX-4bit`](https://huggingface.co/MichaelAnthony/gemma4-e2b-Snowfox-MLX-4bit) | 4-bit affine, group 64 | ~3.55 GB | GGUF `Q4_K_M` analogue | | |
| | [`gemma4-e2b-Snowfox-MLX-6bit`](https://huggingface.co/MichaelAnthony/gemma4-e2b-Snowfox-MLX-6bit) | 6-bit affine, group 64 | ~4.71 GB | GGUF `Q6_K` analogue | | |
| These quantize the language backbone (including the large per-layer embeddings) | |
| to 4-bit/6-bit affine while keeping the vision and audio towers dense in FP16, | |
| so they are smaller than a standard Linear-only quantization. | |
| The earlier oMLX oQ ("oQ4/oQ6/oQ8") build-to-order plan was never published; | |
| use the standard 4-bit/6-bit packages above instead. | |
| ## License | |
| Gemma 4 is Apache-2.0. This derivative package uses the Apache-2.0 license | |
| declared by the pinned base model. See [`LICENSE`](LICENSE) and [`NOTICE.md`](NOTICE.md) | |
| for the lineage and modification notice. | |