LogiShell store Open app

Store › model › Embeddings

Sakura-Gemma4-E2B-EmbeddingGemma2-DualMode-GGUF

by webmp3 · source Hugging Face · updated 2026-10-08

gemma3.4 GB~5 GB RAMsource aliveunlabeled

Sakura Gemma 4 E2B DualMode — Generation + 768d Embeddings — Q5KM GGUF

Add to LogiShell Open in the web IDE

The button opens LogiShell with this card; nothing installs from a link by itself. Inside the app the install goes through lsh models install hf:webmp3/Sakura-Gemma4-E2B-EmbeddingGemma2-DualMode-GGUF and its progress lives in the Resource Center.

Source and license

Numbers

Numbers as of 2026-11-17 21:19 UTC, from the source API.

Summary

Summary not ready yet: the numbers are here, the text is not. It is written by the collector through the LogiShell model facade when a provider key is present.

Reviews

No reviews yet. Reviews are written inside LogiShell: open this card in the app.

Files

filequantsize
Gemma4-E2B-it-Q5_K_M.ggufQ5_K_M3.4 GB
Sakura-Gemma4-E2B-DualMode-Q5_K_M.ggufQ5_K_M3.4 GB

From the source README

Sakura Gemma 4 E2B DualMode — Generation + 768d Embeddings — Q5_K_M GGUF

> Research prototype. Community model. Not official from Google.

In 30 seconds

  • What: one Gemma 4 E2B-it model that can chat *and* produce 768-dimensional search vectors for RAG, so you do not need a second embedding model next to it.
  • How: the same backbone is used in two modes. *Generate* is the normal Gemma 4. *Embed* switches to bidirectional attention with a tiny adapter (+7 MB) and a 768d head.
  • One file: `Sakura-Gemma4-E2B-DualMode-Q5_K_M.gguf` holds backbone, adapter, head and metadata.
  • Checked: generation is bitwise identical to plain Gemma 4; switching modes leaks no state (36 switches, 0 differences); retrieval keeps 71-79 % of the teacher's MRR on external benchmarks.
  • Catch: it needs a small llama.cpp patch (provided); stock llama.cpp cannot load this file.

This is the GGUF version of `webmp3/Sakura-Gemma4-E2B-EmbeddingGemma2-DualMode` (Phase 3 / v0.2). EmbeddingGemma 2 (`google/embeddinggemma-2`) was used only as the teacher during training; it is not in this file and not needed at runtime. The retrieval is EmbeddingGemma-2-*distilled*, not index-compatible with EmbeddingGemma 2 vectors.

| Mode | What runs |
| :--- | :--- |
| GENERATE | the original Gemma 4 E2B-it causal path and LM head (the embed adapter is not part of this graph) |
| EMBED | same backbone + bidirectional attention + embedding-only LoRA (`q_proj`/`o_proj`, layers 15-33, rank 16) + 768d projection + mean pooling + L2 normalization |

> [!IMPORTANT]
> A small llama.cpp patch is required. Stock llama.cpp cannot load `Sakura-Gemma4-E2B-DualMode-Q5_K_M.gguf` (unmodified llama.cpp `b86d2f0`: `done_getting_tensors: wrong number of tensors; expected 678, got 601`; the plain base file loads fi…

Source: https://huggingface.co/webmp3/Sakura-Gemma4-E2B-EmbeddingGemma2-DualMode-GGUF

Card id model:hf:webmp3/Sakura-Gemma4-E2B-EmbeddingGemma2-DualMode-GGUF · collected 2026-11-17 21:19 UTC · JSON