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"
Add oMLX oQ variants as build options + README
Browse files
README.md
CHANGED
|
@@ -76,6 +76,51 @@ For image prompting, add `--image /path/to/image.png` to the generation command.
|
|
| 76 |
Use current MLX-VLM documentation for image, audio, video, and chat-template
|
| 77 |
options.
|
| 78 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 79 |
## License
|
| 80 |
|
| 81 |
Gemma 4 is Apache-2.0. This derivative package uses the Apache-2.0 license
|
|
|
|
| 76 |
Use current MLX-VLM documentation for image, audio, video, and chat-template
|
| 77 |
options.
|
| 78 |
|
| 79 |
+
## Quantized variants (oMLX oQ)
|
| 80 |
+
|
| 81 |
+
This FP16 package is the canonical source for building oMLX oQ quantizations
|
| 82 |
+
on Apple Silicon. The build kit is included in this directory:
|
| 83 |
+
|
| 84 |
+
- `build_omlx_variants.py` — builds `oQ4/oQ6/oQ8` and `oQ4e/oQ6e/oQ8e`.
|
| 85 |
+
- `omlx_build_matrix.json` — the variant matrix the script mirrors.
|
| 86 |
+
|
| 87 |
+
### Available options
|
| 88 |
+
|
| 89 |
+
| Variant | Family | oQ level | Notes |
|
| 90 |
+
| --- | --- | --- | --- |
|
| 91 |
+
| `gemma4-e2b-Snowfox-MLX-FP16` | fp16 | — | shipped in this repo |
|
| 92 |
+
| `gemma4-e2b-Snowfox-MLX-oQ4` | oQ | 4 | GGUF `Q4_K_M` analogue |
|
| 93 |
+
| `gemma4-e2b-Snowfox-MLX-oQ6` | oQ | 6 | GGUF `Q6_K` analogue |
|
| 94 |
+
| `gemma4-e2b-Snowfox-MLX-oQ8` | oQ | 8 | near-lossless |
|
| 95 |
+
| `gemma4-e2b-Snowfox-MLX-oQ4e` | oQe | 4 | enhanced (sensitivity-calibrated) |
|
| 96 |
+
| `gemma4-e2b-Snowfox-MLX-oQ6e` | oQe | 6 | enhanced |
|
| 97 |
+
| `gemma4-e2b-Snowfox-MLX-oQ8e` | oQe | 8 | enhanced |
|
| 98 |
+
|
| 99 |
+
The `oQ*` variants are build-to-order on Apple Silicon (see below); only the
|
| 100 |
+
FP16 weights are stored in this repository.
|
| 101 |
+
|
| 102 |
+
```bash
|
| 103 |
+
# On Apple Silicon with the oMLX DMG installed:
|
| 104 |
+
/Applications/oMLX.app/Contents/MacOS/python3 build_omlx_variants.py \
|
| 105 |
+
--source . --output-root .. --no-smoke-test --dry-run
|
| 106 |
+
|
| 107 |
+
# Real run (quantizes + smoke-tests each variant):
|
| 108 |
+
/Applications/oMLX.app/Contents/MacOS/python3 build_omlx_variants.py \
|
| 109 |
+
--source . --output-root ..
|
| 110 |
+
```
|
| 111 |
+
|
| 112 |
+
Produces sibling directories `../gemma4-e2b-Snowfox-MLX-oQ4`, `-oQ6`, `-oQ8`,
|
| 113 |
+
`-oQ4e`, `-oQ6e`, `-oQ8e`. The `oQe` variants are the enhanced (sensitivity-
|
| 114 |
+
calibrated) family; `oQ4`/`oQ6` are the oMLX analogues of GGUF `Q4_K_M`/`Q6_K`.
|
| 115 |
+
|
| 116 |
+
> **Unverified for Gemma 4.** oMLX oQ was originally validated against
|
| 117 |
+
> `qwen3_5` (Hedgehog). Gemma 4 E2B's vision + audio towers have not been
|
| 118 |
+
> exercised through `quantize_oq_streaming`. If it cannot load the full
|
| 119 |
+
> multimodal model, retry with `--text-only` (language backbone only) or check
|
| 120 |
+
> the installed oMLX version's supported architectures. The smoke test uses
|
| 121 |
+
> `mlx_vlm` (not `mlx_lm`) because this is a multimodal model; skip it with
|
| 122 |
+
> `--no-smoke-test` if the installed `mlx-vlm` API differs.
|
| 123 |
+
|
| 124 |
## License
|
| 125 |
|
| 126 |
Gemma 4 is Apache-2.0. This derivative package uses the Apache-2.0 license
|