--- base_model: google/gemma-4-E2B-it library_name: transformers license: apache-2.0 pipeline_tag: text-generation tags: - gemma4 - gguf - tool-use - privacy - on-device-ai - lora - unsloth - quantized language: - en datasets: - custom model-index: - name: snowclaw-gemma4-e2b-ft results: - task: type: text-generation name: Tool Use Accuracy metrics: - type: accuracy value: 100 name: Tool Use (7/7) --- # SnowClaw — Fine-tuned Gemma 4 E2B for Privacy-First Tool Use A fine-tuned [Gemma 4 E2B](https://ai.google.dev/gemma) model optimized for **on-device AI tool use** in the SnowClaw desktop agent. Achieves **100% tool use accuracy (7/7)** on our evaluation set. ## Model Details | Property | Value | |----------|-------| | **Base Model** | `google/gemma-4-E2B-it` (Gemma 4 E2B Instruct) | | **Method** | LoRA (rank=64, alpha=64) via [Unsloth](https://github.com/unslothai/unsloth) | | **Training Data** | 2,000 synthetic tool-use examples | | **Epochs** | 15 | | **Final Loss** | 0.040 | | **Hardware** | NVIDIA RTX 3090 (24GB VRAM) | | **Quantization** | Q4_K_M (GGUF) | | **Vision** | Multimodal — includes mmproj for image understanding | ## Files | File | Size | Description | |------|------|-------------| | `gemma-4-e2b-it.Q4_K_M.gguf` | 3.2 GB | Main model (Q4_K_M quantized) | | `gemma-4-e2b-it.BF16-mmproj.gguf` | 942 MB | Vision projector (multimodal image encoder) | | `Modelfile` | 205 B | Ollama registration file | ## Intended Use SnowClaw is a **privacy-first desktop AI agent** that runs entirely on-device. This model is fine-tuned for: - **Tool Use**: Executing system commands, browsing files, managing contacts/calendar - **Code Generation**: Writing and executing Python/AppleScript in a sandboxed environment - **Screenshot Analysis**: Understanding screen content via vision capabilities - **Privacy**: All processing stays local — zero data leaves the device ## How to Use ### With Ollama ```bash # Download the GGUF files, then register with Ollama: ollama create snowclaw -f Modelfile # Run ollama run snowclaw ``` ### With llama.cpp ```bash # Text only ./llama-cli -m gemma-4-e2b-it.Q4_K_M.gguf -p "List files in my Downloads folder" # With vision (multimodal) ./llama-mtmd-cli \ -m gemma-4-e2b-it.Q4_K_M.gguf \ --mmproj gemma-4-e2b-it.BF16-mmproj.gguf ``` ## Training Details ### LoRA Configuration ```json { "r": 64, "lora_alpha": 64, "target_modules": ["q_proj", "k_proj", "v_proj", "o_proj", "gate_proj", "up_proj", "down_proj"], "lora_dropout": 0, "task_type": "CAUSAL_LM" } ``` ### Training Curve | Step | Loss | |------|------| | 10 | 8.147 | | 20 | 1.074 | | 30 | 0.469 | | 100 | 0.099 | | 500 | 0.043 | | 1000 | 0.038 | | 1875 | 0.040 | ### Dataset 2,000 synthetic examples covering: - System tool invocations (file management, process control) - Contact and calendar queries - Device information retrieval - Multi-step task planning - Safety-aware refusals ## Evaluation | Metric | Score | |--------|-------| | Tool Use Accuracy | **7/7 (100%)** | | Correct Tool Selection | **7/7** | | Parameter Extraction | **7/7** | ## Part of SnowClaw SnowClaw is a privacy-first AI agent built for the [Google Gemma Hackathon](https://ai.google.dev/competition). It features: - **On-device inference** via bundled Ollama - **Dual security modes**: Paranoid (fully offline) / Smart Search (local + anonymous SearXNG) - **E2E encrypted** communication between desktop and mobile - **Hardware-aware** model selection (auto-detects CPU/GPU/RAM) ## Author **Kennt Kim** — [Calida Lab](https://calidalab.ai) ## License Apache 2.0 (following Gemma's license terms)