Solutions · Vision · Image Embeddings

Text and images, one vector space.

EmbeddingGemma 2 embeds text, code and images into one vector space, on your hardware. A sentence finds a photo; a photo finds a passage.

One model, two modalities 100+ languages 768-d, Matryoshka Fully offline
Model

embeddinggemma-2

Google DeepMind's embedder built on Gemma 4. The default embedding model in LM-Kit.

Inputs

Text, code and images

Every input lands in the same space, so any one can retrieve any other.

Stores

In-memory, file, Qdrant, pgvector

The same vector stores used by text RAG.

Cross-modal retrieval, without two pipelines.

One model indexes your images and your documents. No captioning step, no second embedder to keep aligned.

01

Text-to-image search

Index photos, query with a sentence in any of 100+ languages. Matches come from meaning, not file names.

02

Image-to-image search

Find visually similar images at scale: near-duplicates, edited variants, products that look alike.

03

Multimodal RAG

Passages, code and images share one index. A text question retrieves the diagram that answers it.

04

Same API as text

The Embedder class takes strings and images alike. One model loaded, one inference engine.

Index images, query with anything.

Three common jobs, one loaded model. Each vector is comparable with every other, whatever its source.

Embed a folder of photos once, then rank them against a plain-language query.

TextToImage.cs
using LMKit.Model;
using LMKit.Embeddings;
using LMKit.Media.Image;

// One model, one vector space for text and images.
using LM model = LM.LoadFromModelID("embeddinggemma-2");
var embedder = new Embedder(model);

// Embed every photo once and keep the vectors.
var index = new List<(string Path, float[] Vector)>();
foreach (string path in Directory.EnumerateFiles("./photos", "*.jpg"))
{
    using var image = ImageBuffer.LoadAsRGB(path);
    index.Add((path, embedder.GetEmbeddings(image)));
}

// Query with a sentence, in any of 100+ languages.
float[] query = embedder.GetEmbeddings("forklift on a warehouse floor");

foreach (var hit in index
    .OrderByDescending(e => Embedder.GetCosineSimilarity(query, e.Vector))
    .Take(5))
{
    Console.WriteLine(hit.Path);
}

EmbeddingGemma 2, at a glance.

Downloaded once from the model catalog, then runs offline on CPU or GPU.

Model ID
embeddinggemma-2, Apache 2.0 license
Inputs
Text, code and images in 100+ languages
Vectors
768 dimensions, truncatable to 512, 256 or 128
Context
8,192 tokens per text input
Images
280 vision tokens each by default, tuned with Configuration.DefaultImageDetail
Download
One 439 MB file; the vision encoder loads with the first image

Where image embeddings belong.

Anywhere a library of pictures needs to be searched, grouped or checked against itself.

Visual search

Product catalogs, stock photos, property listings. Text or image query, same index.

Duplicate detection

Consolidate media libraries. Spot re-uploads, copyright reuse and lightly edited variants.

Multimodal knowledge bases

Diagrams, scans and figures become retrieval targets beside the text around them.

Clustering

Group large image sets without labels; cluster centroids become discovered categories.

Seven pillars, one foundation.

The seven pillars of LM-Kit.NET, plus the local runtime they share. Highlighted card is where you are now.

The foundation

Every capability above runs on this runtime.

Foundation

Local Inference

The runtime all seven pillars sit on. The LM-Kit.NET NuGet ships the complete inference system: open-weight LLMs, vision-language models, embeddings, on-device speech-to-text, OCR and classifiers, accelerated on CPU, AVX2, CUDA 12/13, Vulkan or Metal. One package, zero cloud calls, predictable latency, full data and technology sovereignty.

Explore the foundation

Search pictures by meaning.

Start in 5 minutes Back to Vision hub