/ Модель

Характеристики

Размер весов
1,8 ГБ
Лицензия
Apache 2.0
Архитектура
embedding_gemma2 · dense
Базовая модель
embeddinggemma-2
Библиотека
mlx
Опубликована
6 окт 2026

embeddinggemma-2-text-image-440m-mlx-fp32

ЭмбеддингиТекст → embedding

Экспорт EmbeddingGemma 2 для MLX создаёт текстовые и визуальные эмбеддинги для семантического поиска, RAG и поиска по коду.

194скачиваний за 30 дней0лайковвеса обновлены6 окт 2026

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Публичные оценки

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

В подключённых источниках результатов для этой модели пока нет.

Что умеет модель

Описание составлено по карточке модели и метаданным Hugging Face

Это экспорт мультимодальной модели EmbeddingGemma 2 от Google DeepMind для получения эмбеддингов текста и изображений в среде MLX. В сборке сохранены текстовая основа, визуальный энкодер и визуальная проекция; аудиоэнкодер и аудиопроекция удалены. Модель содержит 438 760 448 эффективных параметров, а веса хранятся в FP32 как расширение исходных значений BF16. Это преобразование не добавляет точности, которой не было в исходном чекпойнте.

Модель предназначена для семантического поиска, поиска по коду, RAG и сравнения текстового и визуального содержимого. Для запросов и документов предусмотрены разные префиксы; доступны размерности эмбеддингов 128, 256 и 512. В README проверены текстовые сценарии на английском и корейском, а также обработка изображений и смешанных текстово-изобразительных входов. Экспорт рассчитан на MLX и Apple Silicon; лицензия — Apache-2.0.

Проверки подтверждают загрузку и численное сходство с исходной моделью, но не оценивают качество поиска, скорость или результаты на стандартных бенчмарках. Аудио недоступно, а видеосценарии не проверялись.

Сценарии применения

  • семантический поиск по текстовым документам
  • поиск по коду по запросу на естественном языке
  • поиск по изображениям и текстовым описаниям
  • смешанный поиск по тексту и изображениям
  • сравнение семантической близости текстов и изображений
  • создание эмбеддингов для RAG

Ограничения

Аудиоэнкодер отсутствует, а видеосценарии не проверялись. Проверки не являются оценкой качества поиска, бенчмарком скорости или результатами MTEB.

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

EmbeddingGemma 2 — Text + Image — FP32 — MLX

A modular deployment export of Google DeepMind's EmbeddingGemma 2. Only the text backbone, vision encoder and vision projection are retained; the audio encoder and audio projection are absent. No training, distillation, or quantization was applied.

FP32 weights are a lossless expansion of the upstream BF16 values. This does not recover precision absent from the original trained checkpoint.

PropertyValue
RuntimeMLX
Stored floating-point tensorsFP32 (all tensors checked)
Effective model parameters438,760,448
Weight files1755.12 MB, decimal
InputsText, code, images, text + images
Output768 dimensions; MRL at 512, 256, 128
Context budget8,192 tokens
LicenseApache 2.0

Weight size is not total runtime memory. 270M/440M in repository names are rounded deployment sizes.

Install

pip install "mlx>=0.32.3" "transformers>=5.19.0"
pip install "git+https://github.com/Blaizzy/mlx-vlm.git@3d87e88402f307efbf68e568971aa887ee7d9ed0"

EmbeddingGemma 2 currently requires the pinned MLX-VLM implementation revision above. The MLX package was tested with MLX 0.32.3 and Transformers 5.19.0.

Text and code

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("jayyun98/embeddinggemma-2-text-image-440m-mlx-fp32")
model = load_embedding_model(path)
tokenizer = AutoTokenizer.from_pretrained(path)
inputs = tokenizer([
    "task: search result | query: What causes the northern lights?",
    "title: none | text: Charged particles from the sun cause the northern lights.",
], padding=True, return_tensors="np")
vectors = model(**{key: mx.array(value) for key, value in inputs.items()}).text_embeds
mx.eval(vectors)
print(vectors[:1] @ vectors[1:].T)

# Optional MRL truncation. Normalize after slicing.
vectors = vectors[:, :256]
vectors /= mx.linalg.norm(vectors, axis=-1, keepdims=True)

Use SearchQuery for search queries, CodeRetrieval for code-search queries, and Document for corpus items. For the MLX API, prepend the corresponding literal prefix from config_sentence_transformers.json, as shown above. For titled documents, use title: {title} | text: {content} without another prefix. Use matching dimensions for queries and documents, and normalize after truncation. This FP32 package stores FP32 weights; loading it as BF16 changes runtime precision.

Images and mixed text/image inputs

from PIL import Image
from transformers import AutoProcessor

processor = AutoProcessor.from_pretrained(path)
image = Image.open("photo.jpg").convert("RGB")
inputs = processor(images=[image], return_tensors="np")
image_vector = model(**{key: mx.array(value) for key, value in inputs.items()}).text_embeds
mx.eval(image_vector)

inputs = processor(
    text="A description of this photo. <|image|>",
    images=[image],
    return_tensors="np",
)
mixed_vector = model(**{key: mx.array(value) for key, value in inputs.items()}).text_embeds
mx.eval(mixed_vector)

Verification

Strict native MLX loading and Apple Silicon GPU inference were tested. Cross-runtime arithmetic and BF16 rounding can produce small differences from PyTorch FP32. Checks cover English/Korean search and document text, code queries, and 128/256/512-dimensional normalized vectors. Image-only, mixed text/image, and interleaved two-image inputs were also checked.

FixtureMinimum cosine vs source FP32Maximum absolute difference
search_english_korean1.0000000001.2293458e-07
documents1.0000000001.49011612e-07
code1.0000000001.53668225e-07
image1.0000000001.28522515e-07
mixed_text_image1.0000000001.16415322e-07
interleaved_two_images1.0000000001.63912773e-07

Measurements compare with the pinned full Google checkpoint. They are small numerical and loading checks, not MTEB results, a retrieval-quality evaluation, or a speed benchmark. The original prompts, pooling behavior, tokenizer and processor assets are retained. Processor metadata does not restore the removed encoder weights. This package targets text/image; audio is unavailable and video workflows were not evaluated.

Attribution and license

Original weights and tokenizer/processor assets: Google DeepMind. MLX implementation: MLX-VLM contributors. This is an independent derivative deployment export, not an official Google release. The Apache 2.0 LICENSE and NOTICE are included. See the original model card for training, intended use and limitations.

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм · mlx

Нельзя запустить

MLX-модели работают только на Apple Silicon.

Класс архитектуры
EmbeddingGemma2Model
Ревизия весов
e94cfb0

0 моделей