Instructions to use Clickbook/ClickBook-Gemma-4-E2B-multi-IQ4_XS with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use Clickbook/ClickBook-Gemma-4-E2B-multi-IQ4_XS with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf Clickbook/ClickBook-Gemma-4-E2B-multi-IQ4_XS:IQ4_XS # Run inference directly in the terminal: llama cli -hf Clickbook/ClickBook-Gemma-4-E2B-multi-IQ4_XS:IQ4_XS
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf Clickbook/ClickBook-Gemma-4-E2B-multi-IQ4_XS:IQ4_XS # Run inference directly in the terminal: llama cli -hf Clickbook/ClickBook-Gemma-4-E2B-multi-IQ4_XS:IQ4_XS
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf Clickbook/ClickBook-Gemma-4-E2B-multi-IQ4_XS:IQ4_XS # Run inference directly in the terminal: ./llama-cli -hf Clickbook/ClickBook-Gemma-4-E2B-multi-IQ4_XS:IQ4_XS
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf Clickbook/ClickBook-Gemma-4-E2B-multi-IQ4_XS:IQ4_XS # Run inference directly in the terminal: ./build/bin/llama-cli -hf Clickbook/ClickBook-Gemma-4-E2B-multi-IQ4_XS:IQ4_XS
Use Docker
docker model run hf.co/Clickbook/ClickBook-Gemma-4-E2B-multi-IQ4_XS:IQ4_XS
- LM Studio
- Jan
- vLLM
How to use Clickbook/ClickBook-Gemma-4-E2B-multi-IQ4_XS with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Clickbook/ClickBook-Gemma-4-E2B-multi-IQ4_XS" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Clickbook/ClickBook-Gemma-4-E2B-multi-IQ4_XS", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Clickbook/ClickBook-Gemma-4-E2B-multi-IQ4_XS:IQ4_XS
- Ollama
How to use Clickbook/ClickBook-Gemma-4-E2B-multi-IQ4_XS with Ollama:
ollama run hf.co/Clickbook/ClickBook-Gemma-4-E2B-multi-IQ4_XS:IQ4_XS
- Unsloth Studio
How to use Clickbook/ClickBook-Gemma-4-E2B-multi-IQ4_XS with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for Clickbook/ClickBook-Gemma-4-E2B-multi-IQ4_XS to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for Clickbook/ClickBook-Gemma-4-E2B-multi-IQ4_XS to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for Clickbook/ClickBook-Gemma-4-E2B-multi-IQ4_XS to start chatting
- Pi
How to use Clickbook/ClickBook-Gemma-4-E2B-multi-IQ4_XS with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Clickbook/ClickBook-Gemma-4-E2B-multi-IQ4_XS:IQ4_XS
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "Clickbook/ClickBook-Gemma-4-E2B-multi-IQ4_XS:IQ4_XS" } ] } } }Run Pi
# Start Pi in your project directory: pi
- OpenClaw new
How to use Clickbook/ClickBook-Gemma-4-E2B-multi-IQ4_XS with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Clickbook/ClickBook-Gemma-4-E2B-multi-IQ4_XS:IQ4_XS
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 "Clickbook/ClickBook-Gemma-4-E2B-multi-IQ4_XS:IQ4_XS" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
- Docker Model Runner
How to use Clickbook/ClickBook-Gemma-4-E2B-multi-IQ4_XS with Docker Model Runner:
docker model run hf.co/Clickbook/ClickBook-Gemma-4-E2B-multi-IQ4_XS:IQ4_XS
- Lemonade
How to use Clickbook/ClickBook-Gemma-4-E2B-multi-IQ4_XS with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull Clickbook/ClickBook-Gemma-4-E2B-multi-IQ4_XS:IQ4_XS
Run and chat with the model
lemonade run user.ClickBook-Gemma-4-E2B-multi-IQ4_XS-IQ4_XS
List all available models
lemonade list
- Hermes Agent
How to use Clickbook/ClickBook-Gemma-4-E2B-multi-IQ4_XS with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Clickbook/ClickBook-Gemma-4-E2B-multi-IQ4_XS:IQ4_XS
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 Clickbook/ClickBook-Gemma-4-E2B-multi-IQ4_XS:IQ4_XS
Run Hermes
hermes
- Atomic Chat
File size: 7,436 Bytes
fb42270 f750838 fb42270 f750838 fb42270 f750838 fb42270 f750838 fb42270 | 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 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 | ---
license: apache-2.0
license_link: https://ai.google.dev/gemma/docs/gemma_4_license
base_model: google/gemma-4-E2B-it
library_name: gguf
pipeline_tag: text-generation
tags:
- gguf
- llama.cpp
- on-device
- mobile
- vocabulary-pruned
- quantized
language:
- en
- de
- ar
- fr
- es
- it
- pt
- nl
- pl
- tr
- ru
- zh
- ja
- ko
- hi
- ta
- th
- he
---
# ClickBook Gemma 4 E2B — multilingual, vocabulary-pruned, IQ4_XS
An on-device reading assistant model. A reader taps a word in a book; the model
explains it in the sense that sentence gives it, writes fresh examples, translates
the word, and translates the passage.
**1.844 GB**, built to fit a 1.85 GB application budget on iOS and Android.
## What was changed from the base model
1. **Vocabulary pruned from 262,144 to 231,955 tokens.** Scripts not served by the
product were removed: Bengali, Gurmukhi, Gujarati, Oriya, Telugu, Kannada,
Malayalam, Sinhala, Lao, Tibetan, Myanmar, Georgian, Ethiopic, Cherokee and
others. Latin, Cyrillic, Arabic, CJK, Hangul, Devanagari, Tamil, Thai, Greek
and Hebrew are retained.
This matters more than it would in most architectures: Gemma 4 carries
per-layer embeddings, so a vocabulary token costs **10,496 parameters** — about
3.49 KB in this quantisation. Vocabulary is roughly a third of the file.
2. **Quantised to IQ4_XS** with **Q2_K token embeddings**, guided by an importance
matrix computed over 1,538 calibration chunks.
Embedding tensors are deliberately left out of imatrix guidance because they
cannot benefit from it — embedding lookups are gather operations, not matrix
multiplications, so `llama-imatrix` never observes them.
## Files
| file | purpose |
|---|---|
| `ClickBook-Gemma-4-E2B-multi-IQ4_XS.gguf` | the model |
| `prompts.json` | every prompt, per language, with placeholders and token caps |
| `MOBILE-INTEGRATION.md` | integration guide for client developers |
## Usage
```bash
llama-server -m ClickBook-Gemma-4-E2B-multi-IQ4_XS.gguf -c 2048 -ngl 99 --jinja
```
```jsonc
{
"messages": [{ "role": "user", "content": "<prompt from prompts.json>" }],
"temperature": 0.1, "top_k": 40, "top_p": 0.9, "repeat_penalty": 1.05,
"max_tokens": 111,
"chat_template_kwargs": { "enable_thinking": false }
}
```
### `enable_thinking: false` is required
Without it the model reasons before answering, spends the entire token budget in
`reasoning_content`, and returns **empty `content` with `finish_reason: "length"`**.
That is indistinguishable from a broken model or an unsupported language. If you
want reasoning, raise every cap to 1000 first.
## Language support
Support is uneven and the model card should be believed over the language tag list
above, which cannot express degrees.
| languages | reading | answering | evidence |
|---|:--:|:--:|---|
| English, German, Arabic | yes | yes | 90-item benchmark, two seeds |
| French, Portuguese, Spanish, Italian, Russian, Dutch, Polish, Turkish | yes | not yet | 183 items each on an earlier build, 69–86 |
| Chinese, Japanese, Korean, Hindi, Thai, Hebrew | yes | yes | smoke-tested, 4/4 tabs pass |
| Tamil | yes | **no** | passage translation into Tamil is corrupted |
| Greek | **no** | **no** | output mixes scripts and invents words |
**Greek is broken. Do not enable it.** Only 1,511 Greek tokens survived the prune,
which is not enough for coherent generation; output splices Cyrillic letters and
German words into Greek text.
**Tamil should be read but not written to.** Translating a passage into Tamil
produced Han, Kana and Hangul characters spliced into Tamil script.
The six smoke-tested languages passed every automated check and read two
deliberately hard idiomatic taps each correctly — 手が空いた, 발이 넓다, हाथ धोना,
ใจดี, יד חמה. That is a handful of sentences, not a benchmark. Treat them as beta.
## Evaluation
Measured on a 90-item held-out set of tapped words in English, German and Arabic,
graded 0–100 by an LLM judge against a rubric containing a reference sense. Same
prompts, sampler and seed throughout; the only variable is the model file.
| build | vocabulary | size | score | failures |
|---|---:|---:|---:|---:|
| same weights at **f16** | 231,955 | 8.676 GB | 80.5 | 12 |
| **this model** | 231,955 | **1.844 GB** | **79.2** | 15 |
| narrower prune, 11 languages | 180,850 | 1.666 GB | 79.0 | 15 |
| **unpruned vocabulary**, same quantisation | 262,144 | 1.950 GB | **63.6** | 23 |
Three things this shows.
**Quantisation is nearly free.** IQ4_XS with Q2_K embeddings costs **1.3 points**
against the same weights at f16, for a **4.7× smaller file** — 8.676 GB to 1.844 GB.
**Restoring seven scripts is free.** Going from 180,850 to 231,955 tokens — adding
CJK, Hangul, Devanagari, Tamil, Thai, Greek and Hebrew — moved the score by 0.2 and
the failure count not at all.
**Pruning is not only a size optimisation, it is a quality one.** The unpruned
262,144-token vocabulary, built with an identical recipe and imatrix, scores
**15.6 points lower** and fails 23 items instead of 15. The regression is worst on
the *easiest* third of the set (91.5 → 70.8). A plausible mechanism is that at
Q2_K precision the embedding table and output distribution spend capacity on tens
of thousands of tokens the model never needs, at the expense of the tokens it
does. The measurement is single-seed and reported as measured; the explanation is
a hypothesis.
### Packaging note for mobile
The file compresses by only 3% (ratio 0.970) — quantised weights are close to
incompressible, so download size is effectively file size. Google Play's asset
pack limit is 1.5 GB per pack, which this model exceeds, so Android delivery needs
**two asset packs** concatenated on device. Every smaller variant above exceeds it
too, so splitting is unavoidable regardless of which build is chosen.
## Limitations
- **Not a chat model.** It is tuned for four narrow tasks driven by the supplied
prompts. General conversation is out of scope.
- The hardest word senses remain hard: polysemous common words (*bank*, *charge*,
*Schloss*) are where the 15 failures concentrate.
- No on-device dictionary is bundled. An external sense resource was measured at
+12.7 points on the same benchmark but is not included here.
- Quality in the newly-restored scripts is established by smoke tests only.
## License and provenance
**Apache License 2.0**, matching the licence declared by the base model,
[`google/gemma-4-E2B-it`](https://huggingface.co/google/gemma-4-E2B-it).
Google additionally publishes a
[Gemma 4 license page](https://ai.google.dev/gemma/docs/gemma_4_license), linked
from the upstream model card; consult it directly for anything the Apache 2.0
grant does not answer.
### Modifications from the base model
Apache 2.0 requires derivative works to state their changes. Two were made, both
described in full above:
1. **Vocabulary pruned** from 262,144 to 231,955 tokens, removing scripts the
product does not serve.
2. **Quantised** to IQ4_XS with Q2_K token embeddings, guided by an importance
matrix.
No weights were fine-tuned, distilled or otherwise retrained. Model architecture
and all non-vocabulary tensors are the base model's, requantised.
Gemma is a trademark of Google LLC. This is an independent derivative, not
endorsed by or affiliated with Google.
|