Skip to content
Other

EmbeddingGemma 2 18L

компактная модель для эмбеддингов и классификации

2 min readupdated

Эта модель представляет собой уменьшенную и ускоренную 18-слойную версию EmbeddingGemma 2, оптимизированную для генерации текстовых эмбеддингов (векторных представлений текста) и классификации решений в экосистеме kiln. Авторы сократили размер англоязычного словаря до 20 000 токенов и удалили наименее значимые слои внимания методом дистилляции (переноса знаний от большой модели). Модель весит всего 62.67 МБ (в квантовании Q4_0), работает до 27% быстрее на CPU и до 24% быстрее на GPU по сравнению с базовым вариантом. Разработка пригодится разработчикам локальных ИИ-приложений, систем поиска и классификации текстов на устройствах.

Ключевые особенности

  • Минимальный размер: вес файла снижен до 62.67 МБ (на 62.6% меньше оригинала).
  • Высокая скорость: ускорение на 27% на CPU и ~24% на GPU (около 11.1 мс на процессорах Apple M4 Pro).
  • Оптимизированная архитектура: сокращение количества слоев с 24 до 18 с сохранением точности на уровне ~73.8% в бенчмарках.
  • Англоязычная ориентация: словарь сокращен до 20 000 токенов для эффективной работы с английским языком.

Что можно сделать

  • Генерация эмбеддингов: получать векторные представления текста для семантического поиска и анализа с помощью утилиты kiln-cli.
  • Классификация текста: применять модель для задач определения категорий и принятия решений в локальных пайплайнах.
  • Интеграция в локальные приложения: запускать быструю обработку текста на клиентских устройствах с минимальным потреблением ресурсов.
  • Тестирование в интерфейсе: запускать интерактивную песочницу принятия решений (Decision Playground UI) из репозитория kiln.

Пример

Пример генерации эмбеддинга текста через командную строку с использованием утилиты kiln-cli:

./build/host/kiln-cli \
  -m models/eg2-18L-en20k-Q4_0-imat.gguf \
  --embed "I lost my debit card and need to freeze my account"
Подробнее• Точность на бенчмарках (AG News, SST-2, Banking77, Yelp): средняя точность 73.78% (для Q4_0) при сохранении сильных результатов оригинала.
• Требования к железу: чрезвычайно низкие требования к памяти и процессору благодаря квантованию Q4_0 и размеру файлов до 72.2 МБ.
• Ограничения: предназначена для английского языка (неанглоязычные тексты обрабатываются через UTF-8 байты) и не подходит для мультимодальных задач с изображениями.
• Детали обучения: дистилляция против замороженной 24-слойной модели в течение 10 эпох на 20 000 английских текстах.
Discuss Telegram 0 209

Will it run?

Runs in GGUF Q4_K

The most precise of the ready quantised files fits.

  • GGUF Q4_Kweights 0.1 GB · ready files0.6 GB
  • GGUF Q4_0weights 0.1 GB · ready files0.6 GB

What to get for this model

Massed ComputeOpen Massed Compute

Your own GPU: GGUF Q4_K — from RTX 2060

Massed Compute hourly prices, November 2026. The discounted price applies with the coupon at checkout.

Estimate: weights plus working memory. Long videos, high resolutions and long contexts need more.

Run it on Massed Compute

The script downloads the model to the rented machine. How to run it is in the model card.

  1. 1. Rent a machine with a fitting GPU

    Open Massed Compute
  2. 2. Paste the script into the machine's terminal

    Connect over SSH (the Massed Compute panel shows the command) or open a terminal on the machine's desktop.

    HF_TOKEN / CIVITAI_TOKENThe script starts with token lines: paste yours between the quotes. The Hugging Face token is for gated models, the Civitai one for Civitai models.

    # ryuma007/embeddinggemma-2-18L-en20k-GGUF
    mkdir -p ~/models
    curl -LsSf https://astral.sh/uv/install.sh | sh
    source "$HOME/.local/bin/env"
    uv tool install "huggingface_hub[cli]"
    hf download ryuma007/embeddinggemma-2-18L-en20k-GGUF --local-dir ~/models/embeddinggemma-2-18L-en20k-GGUF
    # The model is in ~/models. How to run it is in the model card (link above).
  3. 3. Use it

    The model is in ~/models. How to run it is in the model card (link above).

Stop the machine in the panel when you are done: it bills by the minute while it runs.

How to speed it up

Picked for this model type. Choose your hardware above to see what fits you exactly.

  • FlashAttention 44.0.0b42from December 2, 2026new release

    fastest exact attention on B200

    Kernels for Blackwell (beta). Exact attention without quantisation — fine for everything, LLMs included.

    How to enable: pip install flash-attn-4; vLLM and SGLang pick it up themselves.

    Earlier generations (2)
    • FlashAttention 3 — The Hopper (H100/H200) version with FP8.
    • FlashAttention 2 — The standard for RTX 30/40/50 and A100: exact attention without the memory cost of long contexts.
  • torch.compile2.15.0from October 28, 2026

    10–30% for free

    Compiles the model for your GPU. Slower first run, faster afterwards.

    How to enable: model = torch.compile(model); in ComfyUI the TorchCompileModel node.

Model family

New posts about versions of embeddinggemma-2-18L-en20k-GGUF (quants, finetunes, LoRAs) will show up under the bell.

No known relatives of this model yet. All derivatives on Hugging Face

About the model

ryuma007/embeddinggemma-2-18L-en20k-GGUF
Author
ryuma007
Category
Other
Released
Posted

On NeyroLearn

Hugging Face

2090

Ask AI about this model

Answered by Gemini 4 · the chat is kept only in this tab

Comments