Image-Text-to-Text
Transformers
Safetensors
gemma4
snowfox
qat-derived
multimodal
text-generation
conversational
Instructions to use MichaelAnthony/gemma4-e2b-Snowfox-hf with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use MichaelAnthony/gemma4-e2b-Snowfox-hf with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="MichaelAnthony/gemma4-e2b-Snowfox-hf") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("MichaelAnthony/gemma4-e2b-Snowfox-hf") model = AutoModelForMultimodalLM.from_pretrained("MichaelAnthony/gemma4-e2b-Snowfox-hf", device_map="auto") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = processor.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use MichaelAnthony/gemma4-e2b-Snowfox-hf with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "MichaelAnthony/gemma4-e2b-Snowfox-hf" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "MichaelAnthony/gemma4-e2b-Snowfox-hf", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/MichaelAnthony/gemma4-e2b-Snowfox-hf
- SGLang
How to use MichaelAnthony/gemma4-e2b-Snowfox-hf with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "MichaelAnthony/gemma4-e2b-Snowfox-hf" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "MichaelAnthony/gemma4-e2b-Snowfox-hf", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "MichaelAnthony/gemma4-e2b-Snowfox-hf" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "MichaelAnthony/gemma4-e2b-Snowfox-hf", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }' - Docker Model Runner
How to use MichaelAnthony/gemma4-e2b-Snowfox-hf with Docker Model Runner:
docker model run hf.co/MichaelAnthony/gemma4-e2b-Snowfox-hf
| base_model: google/gemma-4-E2B-it-qat-q4_0-unquantized | |
| library_name: transformers | |
| pipeline_tag: image-text-to-text | |
| license: apache-2.0 | |
| tags: | |
| - gemma4 | |
| - snowfox | |
| - qat-derived | |
| - safetensors | |
| - transformers | |
| - multimodal | |
| - text-generation | |
| # Gemma 4 E2B SnowFox (canonical BF16 source) | |
| This is the **canonical merged BF16 Transformers checkpoint** of SnowFox — a | |
| language-only LoRA merge built on Google's Gemma 4 E2B instruction QAT-derived | |
| model. Every SnowFox distribution (MLX FP16, MLX 4-bit, MLX 6-bit, GGUF) is | |
| derived from this repository, so this is the package to use for full-precision | |
| Transformers inference or as the source for your own exports. | |
| SnowFox is trained by **Michael Anthony Falabella**. | |
| ## What SnowFox is | |
| SnowFox is a language-only LoRA merge: the **image and audio towers were frozen** | |
| during fine-tuning and are retained unchanged from the base model. Only the | |
| language backbone received the SnowFox LoRA adaptation. The base is Google's | |
| QAT-derived `q4_0-unquantized` checkpoint, which carries clipping parameters on | |
| the multimodal towers that are preserved here. | |
| ## Model size | |
| | Property | Value | | |
| |---|---| | |
| | Total parameters | ~5.1B (with per-layer embeddings) | | |
| | Effective parameters | ~2.3B | | |
| | Weights format | BF16 | | |
| | Checkpoint size | ~10.2 GB (`model.safetensors`) | | |
| > Note: Hugging Face's model page may report a smaller "params" figure for the | |
| > quantized MLX derivatives of this model. That is a display artifact — those | |
| > repos store weights as *packed* `uint32` words (8× 4-bit / 5× 6-bit values per | |
| > word) and HF counts each packed word as one parameter. The true count is | |
| > unchanged (~5.1B total / ~2.3B effective). | |
| ## 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` | |
| - Method: LoRA fine-tune (language-only), merged into the base model | |
| - Claim boundary: QAT-derived from the base; SnowFox's post-LoRA weights were | |
| not newly QAT-calibrated. | |
| ## Quick start | |
| ```python | |
| from transformers import AutoModelForCausalLM, AutoProcessor | |
| model_id = "MichaelAnthony/gemma4-e2b-Snowfox-hf" | |
| processor = AutoProcessor.from_pretrained(model_id) | |
| model = AutoModelForCausalLM.from_pretrained( | |
| model_id, | |
| torch_dtype="auto", | |
| device_map="auto", | |
| ) | |
| ``` | |
| ## Derivative packages | |
| | Package | Format | Notes | | |
| |---|---|---| | |
| | [`gemma4-e2b-Snowfox-MLX`](https://huggingface.co/MichaelAnthony/gemma4-e2b-Snowfox-MLX) | MLX FP16 | `mlx-vlm` ready | | |
| | [`gemma4-e2b-Snowfox-MLX-4bit`](https://huggingface.co/MichaelAnthony/gemma4-e2b-Snowfox-MLX-4bit) | MLX 4-bit affine | ~3.55 GB | | |
| | [`gemma4-e2b-Snowfox-MLX-6bit`](https://huggingface.co/MichaelAnthony/gemma4-e2b-Snowfox-MLX-6bit) | MLX 6-bit affine | ~4.71 GB | | |
| | [`gemma4-e2b-Snowfox-GGUF`](https://huggingface.co/MichaelAnthony/gemma4-e2b-Snowfox-GGUF) | GGUF | llama.cpp / Ollama | | |
| ## 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. | |