File size: 3,171 Bytes
bfe1dfb
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
---
license: apache-2.0
language:
  - en
pipeline_tag: image-text-to-text
tags:
  - gemma4
  - gguf
  - llama-cpp
  - offline
  - multimodal
  - vision
base_model:
  - google/gemma-4-e2b-it
---

# Gemma4 LLM

**Run Google's Gemma 4 locally with vision.** A fully offline AI chat app powered by Gemma 4 E2B — no cloud, no API keys, no accounts.

## Downloads

| Platform | File | Size |
|----------|------|------|
| **Windows** | [Gemma4-LLM.zip](https://huggingface.co/alphastack1/gemma4-llm/resolve/main/Gemma4-LLM.zip) | 5.05 GB |
| **Android** | [gemma4-llm.apk](https://huggingface.co/alphastack1/gemma4-llm/resolve/main/gemma4-llm.apk) | 4.1 GB |

Both bundles include the model, inference engine, and chat UI. Nothing else to install.

## About

Gemma4 LLM bundles everything needed to run Google's **Gemma 4 E2B** model on your device — the model weights, inference engine, and chat UI are all included.

Gemma 4 E2B is **natively multimodal** — it understands both text and images out of the box. This isn't a bolt-on vision module; image understanding is built into the model architecture.

- **Natively multimodal**: Text and image understanding built into the model
- **Fully offline**: No internet connection required after install
- **GPU accelerated**: Uses CUDA on Windows, CPU on Android (arm64)
- **Stock llama.cpp**: Built on official [ggml-org/llama.cpp](https://github.com/ggml-org/llama.cpp) release b8683

## Model Details

| | |
|---|---|
| **Base model** | [google/gemma-4-e2b-it](https://huggingface.co/google/gemma-4-e2b-it) |
| **Architecture** | Mixture-of-Experts (5.1B total, 2.3B active) |
| **Quantization** | Q4_K_M (GGUF) via [unsloth](https://huggingface.co/unsloth/gemma-4-E2B-it-GGUF) |
| **Model file** | gemma-4-E2B-it-Q4_K_M.gguf (2.96 GB) |
| **Image encoder** | mmproj-F16.gguf (940 MB) — part of Gemma 4's native vision architecture |
| **License** | Apache 2.0 |

## Windows

1. Download and extract `Gemma4-LLM.zip`
2. Double-click `Gemma4-LLM.exe` — a native window opens with the chat UI
3. The model loads automatically on startup

The zip contains the EXE and a `models/` folder side by side. Bundles CUDA runtime for GPU acceleration — falls back to CPU if no GPU is available.

## Android

1. Download `gemma4-llm.apk`
2. Enable "Install from unknown sources" in Settings
3. Install and open — first launch extracts the model (~3 min)

Requirements:
- Android 9+ with arm64 (64-bit) processor
- 8+ GB RAM recommended
- Runs as a foreground service with status notification
- Model is bundled inside the APK (split into chunks, reassembled on first launch)

## Technical Details

- **Inference**: llama.cpp server running locally on port 8080
- **Context length**: 4096 tokens (mobile), 8192 tokens (desktop)
- **KV cache**: q8_0 quantized for reduced memory usage
- **Android**: 4 threads on big cores, WebView UI
- **Windows**: PyWebView (Edge/Chromium), Flask backend

## Credits

- [Google](https://ai.google.dev/gemma) for the Gemma 4 model family
- [ggml-org/llama.cpp](https://github.com/ggml-org/llama.cpp) for the inference engine
- [unsloth](https://huggingface.co/unsloth) for GGUF quantizations