jc-builds / Gemma-4-E4B-it-GGUF

huggingface.co
Total runs: 154
24-hour runs: -17
7-day runs: -111
30-day runs: -959
Model's Last Updated: May 09 2026
text-generation

Introduction of Gemma-4-E4B-it-GGUF

Model Details of Gemma-4-E4B-it-GGUF

Gemma 4 E4B Instruct — GGUF (iPhone-optimized, text path)

GGUF quantizations of google/gemma-4-E4B-it , built and optimized for on-device inference on iPhone, iPad, and Apple Silicon Macs via llama.cpp or apps that wrap it (e.g. Haplo ).

Built and quantized by jc-builds for the Haplo ecosystem. Original weights © Google, redistributed under the Gemma Terms of Use.

TL;DR

Gemma 4 is Google's 2026 successor to Gemma 3, using the Mix-of-Modality (MoM) pattern from Gemma 3n: a single set of weights with conditional execution paths that yield different effective parameter counts. E4B has ~4B active parameters during a forward pass and ~7B total parameters on disk. The base model is multimodal ( any-to-any — text/vision/audio); this drop ships only the text path for now, since llama.cpp does not yet expose Gemma 4's vision/audio towers via standard chat APIs.

Available quantizations
File Size Bits/weight Recommended use
Gemma-4-E4B-it-Q4_K_M.gguf 5.0 GB 5.66 Default — best size/quality tradeoff for iPhone Pro & iPad
Gemma-4-E4B-it-Q5_K_M.gguf 5.4 GB 6.12 Slightly better quality, ~8% bigger; good for iPad / Mac

Q8_0 was skipped to keep download sizes practical — for near-FP16 quality, run the upstream model directly on a Mac.

Pick Q4_K_M for general use. ~5GB is the largest single-file model that fits comfortably on a 256GB iPhone with other apps installed.

Performance on Apple Silicon

Approximate decode throughput at single-batch greedy decode, 2048-token context, text-only path. Measured with llama-cli .

Device RAM Q4_K_M tok/s Notes
iPhone 15 Pro 8 GB ~14 tok/s 5GB is the largest model practically usable here
iPhone 16 Pro 8 GB ~17 tok/s Recommended phone target
iPad Pro M4 16 GB ~32 tok/s Snappy; consider Q5_K_M for better quality
MacBook Pro M3 16 GB ~58 tok/s Effectively instant

Reference numbers — Gemma 4's MoM architecture has slightly higher per-token cost than a comparable 4B dense model because the conditional execution graph has more branches.

How to use
1. Haplo (iPhone / iPad / Mac)

The model appears automatically in Haplo's model browser on Kuzco-1.2.0+ builds (older builds use the wrong chat template — see "Chat template" below). The download URL for Q4_K_M is:

https://huggingface.co/jc-builds/Gemma-4-E4B-it-GGUF/resolve/main/Gemma-4-E4B-it-Q4_K_M.gguf
2. llama.cpp (CLI)

Requires llama.cpp at commit ≥ f9cd456 (May 7, 2026) for Gemma 4 inference support.

huggingface-cli download jc-builds/Gemma-4-E4B-it-GGUF Gemma-4-E4B-it-Q4_K_M.gguf --local-dir .

./llama-cli \
  -m Gemma-4-E4B-it-Q4_K_M.gguf \
  -p "Explain the difference between Gemma 3n and Gemma 4." \
  -n 512 \
  --temp 0.7 \
  --top-p 0.95
3. Ollama
cat <<'EOF' > Modelfile
FROM ./Gemma-4-E4B-it-Q4_K_M.gguf
PARAMETER temperature 0.7
PARAMETER top_p 0.95
EOF
ollama create gemma4-e4b -f Modelfile
ollama run gemma4-e4b
Chat template

Gemma 4 uses a brand new turn format that is not compatible with Gemma 3's <start_of_turn>...<end_of_turn> . The new format is:

<bos><|turn>system
{system}<turn|>
<|turn>user
{user}<turn|>
<|turn>model
{assistant}<turn|>
<|turn>model

The full template (in chat_template.jinja from the upstream model) also defines <|channel>...<channel|> for thinking/reasoning streams, <|tool>...<tool|> for tool declarations, and <|tool_call>...<tool_call|> / <|tool_response>...<tool_response|> for function calling. The basic chat path above is sufficient for most use cases.

The chat template is preserved in the GGUF metadata, so llama.cpp 's --chat-template flag is not required.

If you are wrapping llama.cpp in your own app, make sure your prompt formatter has a dedicated path for Gemma 4 — Gemma 3's template will produce garbage tokens.

Sampling defaults

For chat / general output: temperature=0.7 , top_p=0.95 (Google's recommendation for Gemma 4 base chat). For deterministic / structured output: temperature=0.0 , top_p=1.0 .

The GGUF stores the upstream defaults — most clients (llama.cpp, Haplo, Ollama) will use them automatically.

Quantization recipe

Built with llama.cpp at commit f9cd456 (May 7, 2026).

  1. Downloaded google/gemma-4-E4B-it safetensors checkpoint via huggingface-cli .
  2. Patched tokenizer_config.json — converted extra_special_tokens from list-of-strings ( ['<|video|>'] ) to dict ( {'video_token': '<|video|>'} ) to satisfy transformers 4.57.6's tokenizer loader.
  3. Converted to GGUF FP16 via convert_hf_to_gguf.py --outtype f16 . Only the text tower is emitted — vision and audio towers are not preserved in this drop.
  4. Quantized to each target type via llama-quantize :
    llama-quantize Gemma-4-E4B-it-F16.gguf Gemma-4-E4B-it-Q4_K_M.gguf Q4_K_M
    llama-quantize Gemma-4-E4B-it-F16.gguf Gemma-4-E4B-it-Q5_K_M.gguf Q5_K_M
    

No imatrix calibration was used — the weights come from the upstream BF16 directly.

What's missing vs upstream
  • Vision tower — not in this drop. Gemma 4 E4B can natively process images via <|image|> tokens; that path requires an mmproj companion file similar to SmolVLM, which is not yet wired into Haplo.
  • Audio tower — not in this drop. Same reason.
  • Q8_0 — skipped to keep downloads under 6GB.

If you need these, run the upstream model on a Mac via transformers directly.

Original model card

For full architecture, training, and benchmark details, see google/gemma-4-E4B-it .

License

Governed by Google's Gemma Terms of Use (linked above as the "license_link"). The Gemma license permits commercial use, modification, and redistribution, subject to the Use Restrictions in the Gemma Prohibited Use Policy. Read the full terms at https://ai.google.dev/gemma/docs/gemma_4_license before using these weights in production.

Gemma 4 by Google. Used and redistributed under the Gemma Terms of Use.

Acknowledgements
  • Google for the original Gemma 4 weights and the open release.
  • The llama.cpp team for the Gemma 4 converter and inference register that landed May 7, 2026 — without that, this drop would not exist.
  • The Haplo ecosystem this drop is built for.

Runs of jc-builds Gemma-4-E4B-it-GGUF on huggingface.co

154
Total runs
-17
24-hour runs
-60
3-day runs
-111
7-day runs
-959
30-day runs

More Information About Gemma-4-E4B-it-GGUF huggingface.co Model

More Gemma-4-E4B-it-GGUF license Visit here:

https://choosealicense.com/licenses/gemma

Gemma-4-E4B-it-GGUF huggingface.co

Gemma-4-E4B-it-GGUF huggingface.co is an AI model on huggingface.co that provides Gemma-4-E4B-it-GGUF's model effect (), which can be used instantly with this jc-builds Gemma-4-E4B-it-GGUF model. huggingface.co supports a free trial of the Gemma-4-E4B-it-GGUF model, and also provides paid use of the Gemma-4-E4B-it-GGUF. Support call Gemma-4-E4B-it-GGUF model through api, including Node.js, Python, http.

Gemma-4-E4B-it-GGUF huggingface.co Url

https://huggingface.co/jc-builds/Gemma-4-E4B-it-GGUF

jc-builds Gemma-4-E4B-it-GGUF online free

Gemma-4-E4B-it-GGUF huggingface.co is an online trial and call api platform, which integrates Gemma-4-E4B-it-GGUF's modeling effects, including api services, and provides a free online trial of Gemma-4-E4B-it-GGUF, you can try Gemma-4-E4B-it-GGUF online for free by clicking the link below.

jc-builds Gemma-4-E4B-it-GGUF online free url in huggingface.co:

https://huggingface.co/jc-builds/Gemma-4-E4B-it-GGUF

Gemma-4-E4B-it-GGUF install

Gemma-4-E4B-it-GGUF is an open source model from GitHub that offers a free installation service, and any user can find Gemma-4-E4B-it-GGUF on GitHub to install. At the same time, huggingface.co provides the effect of Gemma-4-E4B-it-GGUF install, users can directly use Gemma-4-E4B-it-GGUF installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

Gemma-4-E4B-it-GGUF install url in huggingface.co:

https://huggingface.co/jc-builds/Gemma-4-E4B-it-GGUF

Url of Gemma-4-E4B-it-GGUF

Gemma-4-E4B-it-GGUF huggingface.co Url

Provider of Gemma-4-E4B-it-GGUF huggingface.co

jc-builds
ORGANIZATIONS

Other API from jc-builds

huggingface.co

Total runs: 15
Run Growth: 4
Growth Rate: 26.67%
Updated:July 03 2026