Views
No views yet
/pooling.jinaai/jina-embeddings-v4-vllm-retrieval with three things baked in, so serving needs
no extra flags or side files:multi_vector_projector (128×2048 + bias), with the retrieval LoRA merged in — this head
is not present in the upstream vLLM checkpoint;architectures: ["JinaV4MultiVector"] in config.json;chat_template.json) and a max_pixels ceiling in
preprocessor_config.json.Requires thejina-v4-vllm-pluginin your vLLM image — it registers theJinaV4MultiVectormodel that applies the projection in-engine. Without the plugin this checkpoint will not load (the architecture is unknown to stock vLLM). Plugin + full docs: https://github.com/Mazyod/jina-embeddings-v4-vllm-plugin
1# 1) install the plugin into your vLLM image/env — --no-deps so pip never re-resolves vLLM/torch
2pip install --no-deps jina-v4-vllm-plugin==0.1.1
3
4# 2) serve — no --hf-overrides, no --chat-template, no projector env var (all baked in)
5vllm serve Mazyod/jina-embeddings-v4-vllm-mv \
6 --runner pooling --pooler-config.task token_embed \
7 --served-model-name jina-v4/pooling/pooling returns the [n, 128] matrix (L2-normalized). /v1/embeddings only returns a single
pooled vector, so use /pooling for multi-vector / late interaction.1import base64, requests, numpy as np
2B = "http://localhost:8000"
3
4# text (prefix queries "Query: ", passages "Passage: ")
5t = requests.post(f"{B}/pooling", json={"model": "jina-v4", "input": ["Query: hello world"]}).json()
6text_mv = np.array(t["data"][0]["data"]) # [n, 128]
7
8# image (chat-style messages)
9b64 = base64.b64encode(open("page.png", "rb").read()).decode()
10msg = [{"role": "user", "content": [
11 {"type": "image_url", "image_url": {"url": f"data:image/png;base64,{b64}"}},
12 {"type": "text", "text": "Describe the image."}]}]
13i = requests.post(f"{B}/pooling", json={"model": "jina-v4", "messages": msg}).json()
14image_mv = np.array(i["data"][0]["data"]) # [m, 128]
15
16def maxsim(q, d): # ColBERT late interaction (vectors are L2-normalized)
17 return float((q @ d.T).max(axis=1).sum())max_pixels is baked to 3,211,264 (≈ up to ~4096 image tokens). Raise/lower it per request with
--mm-processor-kwargs '{"max_pixels": N}', or re-bake. Keep image-token counts within your
--max-model-len.docs/VALIDATION.md in the plugin repo.jinaai/jina-embeddings-v4-vllm-retrieval
(Jina Embeddings v4), which is itself derived from
Qwen/Qwen2.5-VL-3B. It is governed by the
Qwen Research License and redistributed here under those terms (see license_link). The
multi_vector_projector was extracted from jinaai/jina-embeddings-v4
with the retrieval adapter merged. All credit for the model to Jina AI and the Qwen team; this repo
only repackages their public weights for drop-in vLLM serving.