44 2 weeks ago

Turkish-first multimodal embeddings (text, images, audio) from Magibu AI, built on EmbeddingGemma 2: 768-d vectors, 8K context.

vision embedding audio 270m 440m 570m 740m
ollama pull alibayram/embeddingmagibu2:570m

Details

2 weeks ago

52ff802b9984 · 1.2GB

{ "architectures": [ "EmbeddingGemma2Model" ], "audio_config": { "_name_or_path": "", "architectures
{ "__version__": { "pytorch": "2.14.1+cu130", "sentence_transformers": "6.1.0", "transformers": "5.1
[ { "idx": 0, "name": "0", "path": "", "type": "sentence_transformers.base.modules.transformer.Trans
{ "audio_ms_per_token": 40, "audio_seq_length": 280, "feature_extractor": { "dither": 0.0, "feature_
{ "transformer_task": "feature-extraction", "modality_config": { "text": { "method": "forward", "met
{"version": "1.0", "truncation": null, "padding": null, "added_tokens": [{"id": 0, "content": "<pad>
{ "audio_token": "<|audio|>", "backend": "tokenizers", "boa_token": "<|audio>", "boi_token": "<|imag
{ "num_ctx": 8192 }
1165 tensors

Readme

embeddingmagibu2

Turkish-first multimodal embeddings: text, images and audio in one 768-dimensional space.

A multilingual, multimodal embedding model from Magibu AI Research, built on Google’s EmbeddingGemma 2 with a Turkish tokenizer (Altus) and Turkish-focused distillation, retrieval and multimodal training. Release: v1.

  • Turkish retrieval (10-task mini-suite, nDCG@10): 0.5815 vs 0.5706 for the teacher; English NanoBEIR: 0.6456 vs 0.6338
  • Turkish text→image Recall@1: Flickr8k-TR 77.4% (teacher 73.8%), XM3600-TR 81.8% (teacher 79.8%)
  • 1.80 tokens per Turkish word (original Gemma tokenizer: 2.41), 8,192-token context

Tags

Load only the modalities you need. All tags share the same text model, so their text vectors are interchangeable.

Tag Inputs Size (GGUF / MLX)
270m Text 0.30 GB / 0.56 GB
440m Text, image 0.67 GB / 0.89 GB
570m Text, audio 0.92 GB / 1.17 GB
740m, latest Text, image, audio 1.29 GB / 1.50 GB
ollama pull alibayram/embeddingmagibu2          # text, image, audio
ollama pull alibayram/embeddingmagibu2:270m     # text only

Usage

Ollama does not add prompts: prepend them to the text yourself.

Use Prefix
Search query task: search result \| query:
Document title: none \| text: (or title: {title} \| text:)
Sentence similarity (both sides) task: sentence similarity \| query:
Question answering query task: question answering \| query:
Classification / clustering task: classification \| query: / task: clustering \| query:
import ollama

q = ollama.embed(model="alibayram/embeddingmagibu2:270m",
                 input=["task: search result | query: Türkiye'nin başkenti neresidir?"])
d = ollama.embed(model="alibayram/embeddingmagibu2:270m",
                 input=["title: none | text: Ankara, Türkiye'nin başkentidir.",
                        "title: none | text: İstanbul, Türkiye'nin en kalabalık şehridir."])
scores = [sum(a * b for a, b in zip(q.embeddings[0], v)) for v in d.embeddings]  # vectors are L2-normalized

Images and audio go without a prompt; use the query prompt for the text matched to them.

import base64, requests

def embed(inputs, model="alibayram/embeddingmagibu2"):
    r = requests.post("http://localhost:11434/api/embed", json={"model": model, "input": inputs})
    return r.json()["embeddings"]

text = embed(["task: search result | query: Karda koşan bir köpek"])
image = embed([{"image": base64.b64encode(open("photo.jpg", "rb").read()).decode()}])
speech = embed([{"audio": base64.b64encode(open("clip.wav", "rb").read()).decode()}])  # 16 kHz mono WAV

Ollama’s API does not accept video; use the Hugging Face model for video.

Builds

Every tag holds two builds and Ollama picks one for your machine:

  • MLX (Apple Silicon): BF16 safetensors. Matches the PyTorch model on text, images and audio.
  • GGUF (llama.cpp, other platforms): Q8_0 text model + BF16 vision and/or audio projector. Text and audio match; images are less precise.

Checked against the PyTorch model (FP32) on the same inputs, 30 items each (Turkish MS MARCO queries/documents, Flickr8k-TR images with Turkish captions, FLEURS Turkish speech with transcripts), for every tag:

PyTorch MLX GGUF
Text cosine to PyTorch (min) 0.9997 0.9996
Image cosine to PyTorch (mean / min) 0.999 / 0.998 0.94 / 0.89
Audio cosine to PyTorch (mean) 1.000 0.998
Caption → image Recall@1 1.00 1.00 0.93
Speech → transcript Recall@1 0.87 0.87 0.87

The GGUF image gap comes from llama.cpp’s image path: Google’s own embeddinggemma-2 GGUF gives the same 0.94 on these images. GGUF files: gguf/ in magibu/embeddingmagibu2.

Notes

  • All scores are our own development evaluations at 768 dimensions, with known data-overlap limitations; see the model card for the full tables and evaluation details.
  • Known weakness: XM3600-TR image→text Recall@1 drops to 66.4% (teacher 79.4%) because of caption hubness. Some Turkish tasks (NFCorpus-TR, SciFact-TR, SQuAD-TR, STS22-tr) stay slightly below the teacher.
  • Do not reuse an index built with the teacher or embeddingmagibu-200m: re-embed your corpus.

Links