/ Модель

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

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

embeddinggemma-2-text-270m-mlx-bf16

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

Текстовая версия EmbeddingGemma 2 в формате MLX создаёт эмбеддинги текста и кода для семантического поиска и RAG.

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

Бенчмарки

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

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

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

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

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

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

jayyun98 опубликовал экспорт текстовой части EmbeddingGemma 2 от Google DeepMind для запуска в MLX. Модель содержит около 271 млн параметров; сохранена исходная точность BF16. Это плотная модель эмбеддингов, предназначенная для представления текстов и кода векторами для поиска и сравнения. Для запросов и документов используются специальные префиксы, а размеры векторов можно выбирать из поддерживаемых конфигураций 128, 256 и 512 измерений.

Модель подходит для семантического поиска по текстам и коду, извлечения документов и сценариев RAG. В экспорт включены только текстовые веса: энкодеры изображений и аудио удалены, поэтому обработка изображений, аудио и видео недоступна. Проверки загрузки и численного сходства с исходным чекпойнтом проводились на Apple Silicon, но оценок качества поиска или производительности нет. Для работы требуется совместимая реализация MLX-VLM; лицензия — Apache-2.0.

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

  • семантический поиск по англоязычным и корейским документам
  • поиск фрагментов кода по текстовому запросу
  • создание векторного индекса документов для RAG
  • сравнение сходства текстовых запросов и документов

Ограничения

Обработка изображений, аудио и видео недоступна, поскольку соответствующие энкодеры удалены. Проверки не являются оценкой качества поиска или скорости; для MLX требуется совместимая реализация MLX-VLM, а FP16 не рекомендуется.

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

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

Открыть на Hugging Face

EmbeddingGemma 2 — Text Only — BF16 — MLX

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

Retained weights preserve the upstream BF16 precision.

PropertyValue
RuntimeMLX
Stored floating-point tensorsBF16 (all tensors checked)
Effective model parameters271,002,624
Weight files542.06 MB, decimal
InputsText and code
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-270m-mlx-bf16")
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. Do not cast this model to FP16; use BF16 or FP32 inference.

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.

FixtureMinimum cosine vs source FP32Maximum absolute difference
search_english_korean0.9999683300.000979403965
documents0.9999565820.00113807619
code0.9999648000.000997241586

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. Image, audio and video encoders are unavailable.

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
Ревизия весов
186ecf2

0 моделей