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
- Source: https://huggingface.co/webmp3/Sakura-Gemma4-E2B-EmbeddingGemma2-DualMode-GGUF
- License: gemma (restricted license: terms at the source apply)
- Requirements: about 5 GB of RAM, 3.4 GB on disk (estimate: suggested file size × 1.15 + 0.5 GB; a real measurement comes with lsh models). Runs with llama.cpp.
- Tags:
ggufgemmagemma-4embeddinggemmaembeddinggemma-2embeddingsretrievaldense-retrievaldual-moderagquantizedfeature-extractionendeendpoints_compatibleconversational
Numbers
- 2,021 downloads on Hugging Face
- 2 likes
- license gemma
- 3.4 GB for Gemma4-E2B-it-Q5_K_M.gguf
- 5,857 stars on google-deepmind/gemma
- 342 open issues and PRs
- last release v4.0.1 on 2026-05-20
- 455,385 npm downloads a week for node-llama-cpp
- latest node-llama-cpp@3.22.3
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
| file | quant | size |
|---|---|---|
Gemma4-E2B-it-Q5_K_M.gguf | Q5_K_M | 3.4 GB |
Sakura-Gemma4-E2B-DualMode-Q5_K_M.gguf | Q5_K_M | 3.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