/ Модель

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

Лицензия
Apache 2.0
Базовая модель
embeddinggemma-2
Библиотека
coreml
Опубликована
22 ноя 2026

gemmbeddings-text

ЭмбеддингиТекст → embedding10 профессий
137скачиваний за 30 дней0лайковвеса обновлены26 ноя 2026

Описание модели

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

Core ML-версия Google embeddinggemma-2 создаёт общие эмбеддинги текста, изображений и аудио для локального поиска и сравнения данных на устройствах Apple.

Gemmbeddings (Core ML) — модифицированная версия Google embeddinggemma-2, подготовленная для iOS 18 и macOS 15 и новее. Модель создаёт эмбеддинги текста, изображений и аудио в общем пространстве, чтобы сравнивать и искать данные разных типов. Текстовый энкодер доступен с бюджетами от 64 до 1152 токенов; для длинных текстов предусмотрено окно с перекрытием. Компоненты для текста, изображений и аудио устанавливаются отдельно.

Модель предназначена для локального семантического поиска, поиска по документам и коду, RAG и оценки сходства. Версия для Core ML переписывает вычислительные графы для оборудования Apple; текстовые веса сжаты до 6 бит, таблица токенов хранится в int8, а аудиоэнкодер использует 4-битное сжатие для части слоёв. В проверках авторов эмбеддинги близки к исходной модели, а тесты охватывают, в частности, немецкий и японский текст.

Для использования нужны устройства и операционные системы Apple с поддержкой Core ML, а для применения Swift-библиотеки — соответствующая интеграция. Репозиторий распространяется по лицензии Apache-2.0. Это модель эмбеддингов: она выдаёт векторы для последующего поиска или сравнения и сама не генерирует ответы.

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

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

Ограничения

Модель создаёт эмбеддинги, а не готовые ответы или текст; для её запуска требуются Core ML и iOS 18 или macOS 15 и новее. Описанные показатели точности и скорости получены на ограниченных тестах авторов, включая замеры на M5 Mac.

Публичные бенчмарки

Результаты из открытых лидербордов в сравнении с лидерами каталога

Публичных оценок пока нет

В подключённых источниках результатов этой модели не нашлось. Отсутствие оценки не значит, что модель хуже: её могли просто не проверять.

Источники: Hugging Face Leaderboards, Hugging Face Eval Results, Open LLM v2, MTEB, timm, Open ASR, EvalPlus

Для каких профессий подходит10

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

Также подходит для

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

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

Открыть на Hugging Face

Gemmbeddings (Core ML)

google/embeddinggemma-2 converted to Core ML for iOS 18 / macOS 15 or later: text, images and audio, all embedded into the same space. The three parts install separately, so an app that only needs text downloads only the root folder.

This is a modified version of Google's model: the graphs were rewritten for Apple hardware and some weights are compressed (details below). Against Google's full-precision model, every embedding we test lands at cosine 0.998 or better.

Files

PathWhatSize
GemmbeddingsText.mlpackagetext encoder, Neural Engine, 6-bit weights; one function per size (64, 80, 144, 288, 512, 576, 768, 1152 tokens), weights shared on disk114 MB
embeddings.q8token table: int8 rows [262144, 512], then one fp16 scale per row135 MB
tokenizer.binGemma vocab and merges, raw deflate3.9 MB
vision/GemmbeddingsVision.mlpackageimage encoder, GPU, fp16; one model for 70 / 140 / 280 / 560 / 1120 image tokens305 MB
vision/positions.bf162D position table9.8 MB
audio/GemmbeddingsAudio.mlpackageaudio encoder, Neural Engine, 4-bit feed-forward and 6-bit other weights, clips up to 30 s172 MB
audio/mel.f32mel filter bank for the log-mel features0.1 MB
manifest.json (each folder)functions, input layout, and every file's size and SHA-256
InstallDownloadOn disk after install
Text only253 MB~253 MB
+ images+315 MB+~315 MB
+ audio+173 MB+~173 MB
Everything740 MB~740 MB

The Swift library compiles each package on device and then deletes it, so the disk cost is about the download size.

Accuracy

Cosine similarity of the final embedding against sentence-transformers running Google's model in fp32, measured through the Swift library on an M5 Mac:

InputCasesWorst cosine
Text (queries, documents, code search, German, Japanese with emoji, a 966-token document)110.9981
Images (photo, scanned invoice, tall, wide, tiny; every detail level)160.9982
Text with an image in it10.9983
Audio (speech clips of 4, 6 and 12 s)30.9985
Text with an audio clip in it10.9983

Retrieval benchmarks, one text per call at 512 tokens on the Neural Engine:

SciFact NDCG@10STS-B Spearman
Google's model, fp16 Core ML conversion (FluidInference)0.85430.8750
This release0.84900.8741
This release with the 16-bit token table instead of 8-bit0.85160.8741

The SciFact gap between the 8- and 16-bit tables comes from 3 of 300 queries in which two neighbouring results swap places; a lossier 6-bit table scored 0.8514, higher than 8-bit, so differences this small are within tie-breaking noise.

Why the quality holds

Every compression step was checked against the fp32 original, and anything that measurably hurt retrieval was left out.

  • Text encoder, 6-bit lookup tables per 16 output channels (k-means). Worst text embedding 0.998 against fp32. 4-bit was tried and rejected: embeddings fell to 0.92–0.97 and SciFact to 0.826.

  • fp16 everywhere without overflow. The activation range of every normalization input was measured on real text, images and audio, and scaled so squares stay far below fp16's limit (for images the largest is 12,248 of 65,504) and the smallest values stay above fp16's normal range.

  • Token table, int8 with a scale per row. Each of the 262,144 rows gets its own scale, so rare and common tokens keep the same relative precision (about 1% error per value). Every embedding stays at cosine ≥ 0.99984 to the 16-bit table; STS-B is unchanged. 4-bit rows were rejected (0.997).

  • Tokenizer. The binary file holds exactly the vocab and merge order of Google's tokenizer.json; token ids are identical on every test text.

  • Image encoder kept at fp16. On the GPU, compressed weights save download size but not memory (an int8 build doubled memory) and 6-bit tables broke individual image tokens (cosine 0.47), so it ships uncompressed. Images are resized with exact antialiased bicubic matching Google's preprocessing, and the token budget is picked from the image's pixel count so detail is not thrown away.

  • Audio encoder, 4 bits only where it is safe. The feed-forward layers tolerate 4 bits; attention, convolutions and projections stay at 6 bits. Against fp32, with the same text encoder:

    Audio weightsSizeSpeechSilenceToneNoise
    6-bit everywhere213 MB0.99990–0.999980.998700.999640.99904
    4-bit feed-forward, 6-bit rest (this release)173 MB0.99983–0.999970.998680.999460.99878
    4-bit everywhere (rejected)149 MB0.99912–0.999710.970820.991950.99655

    The log-mel features computed in Swift match Google's feature extractor within 0.0008.

Speed (M5 Mac, through the Swift library)

Time
Search query (64 tokens)2.5 ms
512-token document25 ms
Image at 70 / 280 / 1120 tokens25 / 107 / 720 ms
30 s audio clip113 ms (about 110 ms per clip in batches)

Changes from the previous version

The previous revision (05268f234afb1fa843177168786b924bcfab4774) held a text-only model with 2 sizes, a bf16 token table and the JSON tokenizer. This version adds images and audio, six more text sizes (including a bidirectional 512-token sliding window for texts over 513 tokens), the int8 token table and the binary tokenizer. Code written for the previous revision cannot read this one.

License

Apache 2.0, the same as the original model (see LICENSE). EmbeddingGemma 2 is by Google DeepMind.

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

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

GPU в ailist

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

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

CoreML-модели работают только на устройствах Apple.

Ревизия весов
2611b78

0 моделей