alt.freeweights.gemma / embeddinggemma-2-4bit
From: mlx-community <huggingface.co/mlx-community>Newsgroups: alt.freeweights.gemmaSubject:

embeddinggemma-2-4bit

Date: 2026-11-15Commit: 8ab839eSigned: 2DC28CC7B26A283B ✓

Feature extraction model with 744M parameters. Safetensors weights, 1.13 GB in all. Published by mlx-community under Apache-2.0.

744M params1.13GBembeddinggemma-2-4bitsafetensorspermissive
FactsParams744MSize1.13 GBFormatssafetensorsTaskfeature extractionLicenseApache-2.0From sourcepermissive
$ fw get mlx-community/embeddinggemma-2-4bit
# manifest sha256 aae3cb2f374c… · 1.13 GB · 16 files
$ fw verify ./embeddinggemma-2-4bit mlx-community/embeddinggemma-2-4bit
From sourceHosted (signed)mlx-community/embeddinggemma-2-4bitLast check: 2026-11-15 05:10 UTC

Get help: custom fine-tune or private deploy. We review your setup before we quote.

Quantized of embeddinggemma-2.

Works with

Evaluate with

Overview

Size
1.13 GB
Weights
1.10 GB (safetensors)
Parameters
744M
Formats
safetensors
Task
feature extraction
License
Apache-2.0 (permissive)
Files
16, each with a sha256
Publisher
mlx-community
Added
2026-11-15
Section
alt.freeweights.gemma
Lineage

Original release from the publisher.

Base model: google/embeddinggemma-2

Where these bytes come from
Publisher at the pinned commit→You

Sources are tried in order. A file counts only when its size and sha256 match the manifest. Sources are checked when you ask for them, not on a timer.

Sources
BadgeHostLast checkResult
From sourcehuggingface.co2026-11-15 05:10 UTCpassed

Model card

From the publisher at commit 8ab839e. Shown as plain text with links; images open at the publisher.

mlx-community/embeddinggemma-2-4bit#

MLX conversion of Google EmbeddingGemma 2 in 4-bit affine format, retaining text, image, audio, and video encoders. The model produces normalized 768-dimensional embeddings. See the original model card for intended use, training information, evaluation, and limitations.

Quantization mode: affine, 4 bits, group size 64. The standard MLX-VLM policy quantizes the text encoder and audio projection. The vision and audio towers and vision projection remain BF16.

Weight storage: 1.098 GB (decimal). Source revision: 914f7f89142e33e77833254d9c9b90c3cef7303b. Converted with MLX-VLM revision 3d87e884, from branch pc/embeddinggemma-2, and MLX 0.32.3.

Text embeddings#

Install the implementation revision that includes EmbeddingGemma 2 support:

pip install "git+https://github.com/Blaizzy/mlx-vlm.git@3d87e88402f307efbf68e568971aa887ee7d9ed0"
pip install -U "mlx>=0.32.3" "transformers>=5.18.0"
import mlx.core as mx
from transformers import AutoTokenizer
from mlx_vlm.embedding_loader import load_embedding_model
from mlx_vlm.utils import get_model_path

path = get_model_path("mlx-community/embeddinggemma-2-4bit")
model = load_embedding_model(path)
tokenizer = AutoTokenizer.from_pretrained(path)
inputs = tokenizer([
    "task: search result | query: Which planet is known as the Red Planet?",
    "title: none | text: Mars is known as the Red Planet.",
    "title: none | text: Venus is often called Earth's twin.",
], padding=True, return_tensors="np")
embeddings = model(**{key: mx.array(value) for key, value in inputs.items()}).text_embeds
print(embeddings[:1] @ embeddings[1:].T)

# Optional Matryoshka truncation: use 128, 256, 512, or 768 dimensions.
embeddings = embeddings[:, :256]
embeddings /= mx.linalg.norm(embeddings, axis=-1, keepdims=True)

Apply the appropriate task prefixes from config_sentence_transformers.json. Queries and documents must use the same embedding dimension. Keep non-quantized weights and activations in BF16; do not cast this model to float16.

Multimodal preprocessing#

All modality weights and processor configuration files are included. Image, audio, and video preprocessing requires a Transformers build that exposes EmbeddingGemma2Processor. Validation used the model's supplied upstream Transformers 5.18.0.dev0 build; stock PyPI Transformers 5.18.0 does not yet expose this processor. The text-only example above uses AutoTokenizer and does not require that processor. With a compatible processor build:

from mlx_vlm import load

model, processor = load("mlx-community/embeddinggemma-2-4bit")
inputs = processor(images=[image], return_tensors="np")  # image is a PIL image
embedding = model(**{key: mx.array(value) for key, value in inputs.items()}).text_embeds

Conversion checks#

This low-bit variant shows measurable embedding drift. For applications where embedding fidelity matters, compare against BF16 or 8-bit on your own retrieval data.

All checked outputs were finite, unit-normalized, and had 768 dimensions. The text retrieval smoke test ranked the Mars passage above Venus. Checks cover six multilingual text inputs and synthetic image, audio, two-frame video, and text+image inputs; they are numerical smoke checks, not MTEB or a retrieval-quality benchmark. Cosine and absolute errors compare against the original checkpoint running in PyTorch FP32.

InputMinimum cosine vs FP32Maximum absolute error
audio0.9744350.037149
image0.9903860.016959
text0.9808770.022356
text_image0.9864360.019337
video0.9861460.021160

The full measurements, including truncated-vector comparisons, are in validation.json.

Reproduce conversion#

Using the implementation and compatible processor environment described above:

python -m mlx_vlm convert --hf-path google/embeddinggemma-2 --revision 914f7f89142e33e77833254d9c9b90c3cef7303b --mlx-path embeddinggemma-2-4bit --dtype bfloat16 -q --q-mode affine --q-bits 4 --q-group-size 64

The source model declares Apache-2.0 licensing. This conversion preserves that license and attribution to Google.

Files

16 files · 1.13 GBWeights 1.10 GB (safetensors). Sizes and sha256 from the signed manifest.
Hide all 16 files with their sha256
FileSizesha256
.gitattributes1.57 KB34448b82c17d60fec9b65b1f093c115ddbaadc04beb1b0140b6bfed2e012a930
1_Pooling/config.json90 B8759bdf7c77efc7df7723f64856a593c8943b71ee38baf2a88771fbaf78438f9
2_Normalize/config.json97 Bcdb09dfca347a56aa2d691744e38d5ad3c7cbc2834e7181272b9a15328b82524
README.md4.79 KBc664cd7b90974c1618e67f263518e27367ae26d9bdb7a08d3a45d776647dff11
chat_template.jinja1.02 KB4b852efc0b9960283e735363331e6f325b33bc74bdbaa076f595bc4e9b94d85e
config.json5.46 KB1de4f0de47333d33fc3aa06811193e47908e269021a428a6076ecc23df704ed7
config_sentence_transformers.json1.56 KB031e56a498d33c349ab489a21885bcfe25b4fcba841149dc99e1e90d4a7c28f5
model.safetensors1.10 GBc02e89e903650186b79b4aad7fd4bdccaeb07a91f6046487ad0bd209e7d4b0c0
model.safetensors.index.json154 KB509e6538c51bf3eb1ef6672261f100258356d77660da530dde1096c184e68d59
modules.json413 B3d02572a0455b832de67fb8e63a54981bc7e8b46e337c95e917bd8122a533bfd
preprocessor_config.json511 Bea2ae257e901064abdd98dceb19f2b0da06af600bed15e0f99f5c85c37ee9d78
processor_config.json1.79 KB168f6a08522f3ce5dea596d94d003af2fd691742d4f41fe1f9d8cce76bfbf69c
sentence_bert_config.json747 Bb1bcd9f2dce3ae863b359e87d0710b5dbc3314a59ecb4e2f97c7778fc8e4b228
tokenizer.json32.2 MB4d777ef5bdc1aa36227abdfb77c3e49e7b9c892d16e1b6bda41c393504828be4
tokenizer_config.json1.60 KB17bd5d6e9364ca49a534e1502076593317c298d4a663623091ed45388f004874
validation.json2.41 KB3efbee1b54c0dc00924ffb4fe1025030003f2162fb82ab042092a7762f22780b
VersionsEach time the pinned upstream commit or file list changed in this repo. Newest first.
Upstream commitDateContents
8ab839e127 pinned now2026-11-15 05:10 UTC16 files · 1.13 GB

Use it

$ fw get mlx-community/embeddinggemma-2-4bit
# manifest sha256 aae3cb2f374c… · 1.13 GB · 16 files
$ fw verify ./embeddinggemma-2-4bit mlx-community/embeddinggemma-2-4bit
fw.pyChecks the signature and every sha256, tries each source in order, resumes.
$ python3 fw.py get https://freeweights.allternit.com/manifests/mlx-community/embeddinggemma-2-4bit.json --dir ./embeddinggemma-2-4bit $ python3 fw.py verify ./embeddinggemma-2-4bit ./mlx-community__embeddinggemma-2-4bit.json
hfThe Hugging Face CLI with one setting. Same repo id.
$ HF_ENDPOINT=https://freeweights.allternit.com hf download mlx-community/embeddinggemma-2-4bit --revision 8ab839e127cb8cb305edd71fb7a02c82f2d49ab3 --local-dir ./embeddinggemma-2-4bit
transformersLoad the weights in Python.
import os os.environ["HF_ENDPOINT"] = "https://freeweights.allternit.com" from transformers import AutoModel, AutoTokenizer tok = AutoTokenizer.from_pretrained("mlx-community/embeddinggemma-2-4bit", revision="8ab839e127cb8cb305edd71fb7a02c82f2d49ab3") model = AutoModel.from_pretrained("mlx-community/embeddinggemma-2-4bit", revision="8ab839e127cb8cb305edd71fb7a02c82f2d49ab3", device_map="auto")
sentence-transformersEmbed text with sentence-transformers.
import os os.environ["HF_ENDPOINT"] = "https://freeweights.allternit.com" from sentence_transformers import SentenceTransformer model = SentenceTransformer("mlx-community/embeddinggemma-2-4bit", revision="8ab839e127cb8cb305edd71fb7a02c82f2d49ab3") vectors = model.encode(["Hello"])

License

Name
Apache License 2.0
Id
Apache-2.0
Class
Permissive
Redistribution
yes
Listing
Hosted (signed)
Decided
License as declared by the publisher. No person read it. 2026-11-15
Text in
README.md
Text sha256
c664cd7b90974c1618e67f263518e27367ae26d9bdb7a08d3a45d776647dff11
Terms gate
No extra terms beyond the license.

Read the license text

Licenses are checked against the license table. A custom license passes only after a person reads it.

Provenance

From: mlx-community <huggingface.co/mlx-community>Newsgroups: alt.freeweights.gemmaSubject: embeddinggemma-2-4bitDate: 2026-11-15Commit: 8ab839eSigned: 2DC28CC7B26A283B ✓
Upstream
mlx-community/embeddinggemma-2-4bit
Pinned commit
8ab839e127cb8cb305edd71fb7a02c82f2d49ab3
Manifest
embeddinggemma-2-4bit.json · .minisig
Manifest sha256
aae3cb2f374c59103c3e0b3b230ceebc52342583191fdc4b19742f59034e1238
Signature
minisign, Ed25519, key 2DC28CC7B26A283B
Created
2026-11-15 05:10 UTC
Generator
freeweights-manifest/0.1.0
Takedowns
None.

How to verify

$ curl -O https://freeweights.allternit.com/manifests/mlx-community/embeddinggemma-2-4bit.json $ curl -O https://freeweights.allternit.com/manifests/mlx-community/embeddinggemma-2-4bit.json.minisig $ minisign -Vm embeddinggemma-2-4bit.json -P RWQ7KGqyx4zCLXtUFOqvfv8L3g+8fpKJ1FsuxPyOYMF+4KufbUxKq1Oq $ shasum -a 256 <file> # compare with the Files tab

A manifest whose signature fails must be rejected. A file whose size or sha256 does not match must be discarded. Verify a download

Model tree

Parent

google/embeddinggemma-2 · this model is a quantization of it

No model in the catalog names this one as its parent.

Get it
Download
$ HF_ENDPOINT=https://freeweights.allternit.com hf download mlx-community/embeddinggemma-2-4bit
Open in Freeweights Studio

Pull, verify and run it in the Allternit app on Desktop, web or phone.

Signed manifest
minisign, key 2DC28CC7B26A283B. embeddinggemma-2-4bit.json. Provenance. Takedown history: none.
From: laion <huggingface.co/laion>Subject: Alexandria-Gemma-4-12B-it-Ornith9-Summaries-LoRA-r128
From: laion <huggingface.co/laion>Subject: Alexandria-Gemma-4-12B-it-Ornith9-Summaries-LoRA-r64
From: laion <huggingface.co/laion>Subject: Alexandria-Gemma-4-12B-it-Qwen27-Knowledge-Units-LoRA-r128
From: laion <huggingface.co/laion>Subject: Alexandria-Gemma-4-12B-it-Qwen27-Summaries-LoRA-r128
From: laion <huggingface.co/laion>Subject: Alexandria-Gemma-4-12B-it-Qwen27-Summaries-LoRA-r64
From: laion <huggingface.co/laion>Subject: Alexandria-Gemma-4-E4B-it-Qwen27-Knowledge-Units-LoRA-r128