--- 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.