explaingit

quixiai/embeddinggemma.c

Analysis updated 2026-05-18

24CAudience · developerComplexity · 2/5Setup · easy

TLDR

A fast C server that turns text into embedding vectors using the EmbeddingGemma 300M model. It runs on CPUs and accelerators, serves an OpenAI-compatible API, and benchmarks faster than llama.cpp.

Mindmap

mindmap
  root((repo))
    What it does
      Text to embeddings
      OpenAI-compatible API
      Matryoshka dimensions
    Tech stack
      C language
      Apple Metal
      NVIDIA CUDA
      AMD ROCm
    Use cases
      Semantic search
      Document similarity
      RAG pipelines
    Audience
      Developers
      Researchers
      Vibe coders
    Performance
      Faster than llama.cpp
      Tiny CPU binary
      Multi-platform

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Build semantic search over documents by embedding queries and comparing vectors.

USE CASE 2

Power a RAG pipeline by generating embeddings for retrieval from a knowledge base.

USE CASE 3

Compare text similarity for deduplication or clustering tasks using an OpenAI-compatible API.

USE CASE 4

Experiment with reduced-dimension embeddings to save storage while keeping search fast.

What is it built with?

CApple MetalNVIDIA CUDAAMD ROCmIntel XPU SYCL

How does it compare?

quixiai/embeddinggemma.coutaouss/1337_piscine_2025sander110419/lightroom-cc-on-linux
Stars242424
LanguageCCC
Setup difficultyeasyeasyhard
Complexity2/51/55/5
Audiencedevelopergeneralgeneral

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 5min

Run the executable and the model auto-downloads on first launch, the server starts listening on port 42666 with no extra config needed.

In plain English

This repository is a small, specialized server for generating embeddings from a specific model called EmbeddingGemma 300M. Embeddings are lists of numbers that capture the meaning of text, letting software compare passages by similarity. The server is written in C and runs on a wide range of hardware: standard CPUs, Apple Metal, NVIDIA CUDA, AMD ROCm, and Intel XPU SYCL. Each platform gets its own native executable, and the CPU version is roughly 100 kilobytes in size. The creators describe performance as the core selling point. The README benchmarks the project against llama.cpp, a well-known inference tool. On an Apple M5 Max, using identical model files and settings, this server produced embeddings faster in every tested scenario, with an average speedup of 1.25x and peaks reaching 2.01x. The benchmarks cover combinations of token counts and concurrency levels. The repository links to its methodology and raw results, and a command is provided so others can reproduce the comparison. Setup is straightforward. Running the executable starts the server, and the model downloads automatically on first launch to a cache directory. The server listens on port 42666 and exposes an HTTP API. Users send text to an endpoint and receive a list of floating-point numbers back. There is also an OpenAI-compatible endpoint, which means existing tools and SDKs built for OpenAI's API can talk to this server with minimal changes. The server supports Matryoshka embeddings, meaning you can request outputs at 768, 512, 256, or 128 dimensions. Lower dimensions trade some accuracy for smaller storage and faster comparison. Text is embedded exactly as provided, so the README points users to specific prompt prefixes for search queries and documents. An installer script detects the host platform and picks the right backend automatically, falling back to CPU if a specialized accelerator is not available. Performance tables list absolute throughput numbers across several hardware configurations. For example, on an AMD Instinct MI300X the server reaches 206,011 input tokens per second for 2,048-token requests, and a packed batch of 72 single-token requests hits 26,014 requests per second. The README notes that a fair cross-project comparison against other inference servers is planned for a future publication.

Copy-paste prompts

Prompt 1
I have the embeddinggemma.c server running on localhost:42666. Write a Python script using the OpenAI SDK that sends a list of passages to the embeddings endpoint and prints the first 10 numbers of each resulting vector.
Prompt 2
Help me set up semantic search: I want to embed 50 documents with embeddinggemma.c at 256 dimensions, store the vectors in a NumPy array, and then find the top 3 most similar documents for a given query string. Generate the code.
Prompt 3
Write a curl command that sends text to the embeddinggemma.c server on port 42666 and saves the returned embedding vector to a JSON file. Include the request to use 512 dimensions.
Prompt 4
I'm building a RAG chatbot. Show me how to configure the OpenAI Python SDK to point at my local embeddinggemma.c server instead of OpenAI's API, and use it to embed a batch of text chunks for retrieval.

Frequently asked questions

What is embeddinggemma.c?

A fast C server that turns text into embedding vectors using the EmbeddingGemma 300M model. It runs on CPUs and accelerators, serves an OpenAI-compatible API, and benchmarks faster than llama.cpp.

What language is embeddinggemma.c written in?

Mainly C. The stack also includes C, Apple Metal, NVIDIA CUDA.

How hard is embeddinggemma.c to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is embeddinggemma.c for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.