Instructions to use ai-forever/FRIDA-Embeddings-V2-2B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use ai-forever/FRIDA-Embeddings-V2-2B with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("ai-forever/FRIDA-Embeddings-V2-2B") sentences = [ "The weather is lovely today.", "It's so sunny outside!", "He drove to the stadium." ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [3, 3] - Notebooks
- Google Colab
- Kaggle
- FRIDA-Embeddings-V2-2B
- Table of contents
- Model details
- Results
- Usage
- Training
- Latency and storage benchmarks
- MIRACL RU, re-annotated (290,613 documents; 130 mean tokens per document)
- MIRACL RU, re-annotated document-level (160,144 documents; 1,780 mean tokens per document)
- ViDoRe3ComputerScienceRetrieval (1,360 documents; 3,657 mean tokens per document)
- ruViDoRe, sber subset (1,308 documents; 920 mean tokens per document)
- Authors and citation
- Table of contents
FRIDA-Embeddings-V2-2B
Table of contents
FRIDA-Embeddings-V2-2B is a 2B embedding model for semantic retrieval. A single backbone forward pass produces both a dense vector and token-level vectors. This supports dense retrieval, late-interaction (multivector) retrieval, and two-stage retrieval, where dense vectors select candidates and token vectors rerank them.
The model is trained with Matryoshka Representation Learning (MRL), so its vectors can be shortened without retraining. The dense vector can be truncated to 1,024 or 512 dimensions, and the token vectors to 64 or 32 dimensions. The model is also trained with k-means pooling to fixed budgets of 32, 64, 128, 256, and 512 token vectors per document, which reduces storage for long documents.
Model details
| Property | Description |
|---|---|
| Dense representation | 2,048 dimensions, last-token pooling, L2 normalized; Matryoshka truncation to 1,024 and 512 |
| Token representation | 128 dimensions per token, trained bias-free projection, L2 normalized; Matryoshka truncation to 64 and 32 |
| Token pooling | K-means pooling during training, with document budgets of 32, 64, 128, 256, and 512 token vectors per document |
| Context window | 4,096 tokens by default |
| Modalities | Text (passages and full documents), code, and images; the training mix includes visual documents |
| Inference runtimes | Sentence Transformers, vLLM, SGLang |
| License | MIT |
| Supported languages | English and Russian |
Multi-setups
The same model can be used for dense retrieval, late interaction, or a combination of both. Together with Matryoshka Representation Learning (MRL) and hierarchical token pooling, these options let you adapt the retrieval system to its corpus size, storage budget, memory budget, and latency requirements.
Notation:
| Setup | Representation | Description |
|---|---|---|
dense |
[2048] |
One 2,048-dimensional dense vector. |
late |
[n, 128] |
One 128-dimensional vector per token; use all tokens. |
dense_{d} |
[d] |
Truncate the dense representation to its first d components. |
late_{d} |
[n, d] |
Truncate each token vector to its first d components. |
k{x}d{y} |
[x, y] |
Use up to x token vectors, each truncated to its first y components. |
mixed_{k} |
(2048, [n, 128]) |
Retrieve the top k candidates with dense, then rerank them with late. |
mixed_{k}_k{x}d{y} |
(2048, [x, y]) |
Like mixed_{k}, but rerank with k{x}d{y}. |
Examples:
late: Keep all document token vectors in RAM and rank documents with MaxSim.mixed_30: Keep the dense index in RAM and store all document token vectors on disk. Retrieve the top 30 candidates by dense similarity, load their token vectors, rerank them with MaxSim, and return the top 10.mixed_30_k128d128: Likemixed_30, but store at most 128 token vectors per document. This reduces the disk footprint and the amount of data read for reranking.dense: Keep only one vector per document and retrieve the top k using dense similarity.dense_512: Truncate the dense vectors to 512 dimensions (one quarter of the original 2,048 dimensions) to reduce index size.
In the results tables, multivector is the all-token late setup, and mixed_30_d128 corresponds to mixed_30 with 128-dimensional token vectors.
Results
The multivector setup is the strongest configuration of this model and is competitive with models that are several times larger. The dense setup trails the strongest dense model in the tables.
Benchmark configurations
| Benchmark | Original tasks | Changes in this evaluation |
|---|---|---|
| ruViDoRe | ViDoRe final human-annotated set of Russian page images, built in-house | In-house human annotations |
| ViDoRe v3 | ViDoRe v3 retrieval tasks: 8 domains in 6 languages | Original relevance labels |
| Text | MIRACL (English and Russian), Natural Questions, TREC 2021 passages | Re-annotated relevance labels |
| Text, document level | Same queries as Text | Whole documents are the retrieval unit instead of passages |
| Code, human-annotated | CosQA and CodeSearchNet (CSNQuery) | Re-annotated relevance labels; human-annotated subset only |
The text and code scores below use the re-annotated relevance labels.
Benchmark comparison
Parameters are total stored weights, rounded to two significant figures. Results are nDCG@10 for each benchmark. Each score is the mean over that benchmark's tasks, with every task and subset weighted equally. Each model is shown at its final checkpoint, and all rows cover the same tasks and subsets.
Dense
| Model | Parameters | ruViDoRe | ViDoRe v3 (public) | Text | Text, document level | Code, human-annotated | Mean |
|---|---|---|---|---|---|---|---|
| Nemotron-3.5-Embed-8B-BF16 | 8.4B | 0.814 | 0.604 | 0.742 | 0.700 | 0.748 | 0.722 |
| WeMM-Embedding-9B | 9.4B | 0.787 | 0.571 | 0.681 | 0.675 | 0.750 | 0.693 |
| Nemotron-3.5-Embed-1B-BF16 | 1.6B | 0.780 | 0.580 | 0.679 | 0.618 | 0.733 | 0.678 |
| FRIDA-Embeddings-V2-2B | 2.2B | 0.724 | 0.552 | 0.680 | 0.650 | 0.762 | 0.674 |
| Qwen3-VL-Embedding-8B | 8.1B | 0.756 | 0.583 | 0.654 | 0.650 | 0.699 | 0.668 |
| WeMM-Embedding-4B | 5.2B | 0.748 | 0.549 | 0.619 | 0.653 | 0.741 | 0.662 |
| embeddinggemma-2 | 0.74B | 0.599 | 0.442 | 0.686 | 0.666 | 0.700 | 0.619 |
| WeMM-Embedding-2B | 2.7B | 0.713 | 0.528 | 0.500 | 0.592 | 0.725 | 0.612 |
| Qwen3-VL-Embedding-2B | 2.1B | 0.566 | 0.529 | 0.556 | 0.511 | 0.699 | 0.572 |
Multivector
| Model | Parameters | ruViDoRe | ViDoRe v3 (public) | Text | Text, document level | Code, human-annotated | Mean |
|---|---|---|---|---|---|---|---|
| pplx-embed-v2-late-9b | 8.4B | 0.856 | 0.652 | 0.740 | 0.761 | 0.769 | 0.756 |
| FRIDA-Embeddings-V2-2B | 2.2B | 0.818 | 0.620 | 0.751 | 0.745 | 0.755 | 0.738 |
| pplx-embed-v2-late-0.6b | 0.59B | 0.815 | 0.623 | 0.692 | 0.720 | 0.712 | 0.712 |
Mixed
Mixed retrieval first selects the top 30 candidates with the dense embedding, then reranks them using 128-dimensional token vectors. mixed_30_d128 uses all token vectors; the k32 through k512 variants use fixed document token-vector budgets. All rows below are for FRIDA-Embeddings-V2-2B. See the two-stage search implementation.
| Setup | Parameters | ruViDoRe | ViDoRe v3 (public) | Text | Text, document level | Code, human-annotated | Mean |
|---|---|---|---|---|---|---|---|
mixed_30_d128 |
2.2B | 0.803 | 0.610 | 0.742 | 0.726 | 0.762 | 0.729 |
mixed_30_k32d128 |
2.2B | 0.755 | 0.580 | 0.695 | 0.667 | 0.752 | 0.690 |
mixed_30_k64d128 |
2.2B | 0.775 | 0.596 | 0.717 | 0.683 | 0.756 | 0.705 |
mixed_30_k128d128 |
2.2B | 0.788 | 0.602 | 0.734 | 0.694 | 0.761 | 0.716 |
mixed_30_k256d128 |
2.2B | 0.796 | 0.607 | 0.741 | 0.704 | 0.761 | 0.722 |
mixed_30_k512d128 |
2.2B | 0.800 | 0.609 | 0.742 | 0.711 | 0.762 | 0.725 |
The mixed setup improves the five-benchmark mean from 0.674 for dense retrieval to 0.729, while remaining below full multivector retrieval at 0.738.
The model-size plots show the all-token mixed setup (mixed_30_d128); the memory plot includes all five fixed-budget mixed variants.
In the three plots below, higher points have better retrieval scores. The horizontal axis shows storage per document or total model parameters, increasing from left to right.
Usage
Input formatting
For a passage with a title, format its content as title: {title} | text: {text}. For example, title: Semantic search | text: Semantic search retrieves documents by meaning. Untitled passages and plain-text documents use their text directly. Image-only documents contain only the image, without an added text instruction.
Sentence Transformers
For local inference, install Sentence Transformers with python -m pip install "sentence-transformers[image]==6.3.0" and load the model with SentenceTransformer("ai-forever/FRIDA-Embeddings-V2-2B"). Sentence Transformers returns both dense and token embeddings directly. Start with the dense retrieval example or get both outputs in one pass.
On NVIDIA GPUs, Sentence Transformers can use optional kernels for the Qwen3.5 backbone. Install causal-conv1d and flash-linear-attention in the same environment as Sentence Transformers, using builds compatible with your PyTorch and CUDA versions. Restart Python and use the same encode_query or encode_document call. Transformers selects the kernels automatically when it can import them. For high-throughput HTTP serving, see vLLM.
Document length
Model was trained on examples of up to 4,096 tokens. To raise the document limit to 32,768 tokens:
outputs = model.encode_document(
documents,
processing_kwargs={"text": {"max_length": 32_768, "truncation": True}},
)
Joint dense and token embeddings
Pass a string for text, a PIL image for a page, or a dictionary with both text and image for a document that contains both. You can mix all three in one batch. The example uses a local image named page.png.
import torch
from PIL import Image
from sentence_transformers import SentenceTransformer
from sentence_transformers.util import maxsim
model = SentenceTransformer("ai-forever/FRIDA-Embeddings-V2-2B")
queries = model.encode_query(["What is semantic search?"], output_value=None)
page = Image.open("page.png").convert("RGB")
documents = model.encode_document(
[
"title: Semantic search | text: Semantic search retrieves documents by meaning.",
page,
{"text": "Notes on semantic search", "image": page},
],
output_value=None,
)
print(documents)
# Abbreviated output (tensor values and additional fields omitted):
# [
# {
# 'sentence_embedding': tensor([...]),
# 'multivector_embeddings': tensor([[...], ..., [...]]),
# 'attention_mask': tensor([1, ..., 1, 0, ...]),
# ...
# },
# ...
# ]
# Dense similarity.
query_dense = torch.stack([query["sentence_embedding"] for query in queries])
document_dense = torch.stack([document["sentence_embedding"] for document in documents])
dense_scores = model.similarity(query_dense, document_dense)
print(dense_scores)
# Late-interaction similarity: remove padding before computing MaxSim.
query_tokens = queries[0]["multivector_embeddings"][queries[0]["attention_mask"].bool()]
document_tokens = [document["multivector_embeddings"][document["attention_mask"].bool()] for document in documents]
maxsim_scores = maxsim([query_tokens], document_tokens)
print(maxsim_scores)
Each item includes sentence_embedding with shape [2048], multivector_embeddings with shape [sequence_length, 128], and attention_mask with shape [sequence_length]. Use the attention mask to remove padded token vectors. encode() returns dense embeddings by default; output_value=None returns both heads.
Dense embeddings
Standard encoding returns one dense vector per input:
from sentence_transformers import SentenceTransformer
model = SentenceTransformer("ai-forever/FRIDA-Embeddings-V2-2B")
queries = model.encode_query(["What is semantic search?"])
documents = model.encode_document(
[
"title: Semantic search | text: Semantic search retrieves documents by meaning.",
"title: Apple pie | text: A recipe for apple pie.",
]
)
scores = model.similarity(queries, documents)
print(queries.shape, documents.shape, scores.shape)
print(scores)
Hierarchical token pooling
Extract the token vectors with output_value=None, remove padding, and apply hierarchical pooling to reduce the number of document token vectors. This example uses the standalone Sentence Transformers hierarchical pooler as an inference option.
from sentence_transformers import SentenceTransformer
from sentence_transformers.multi_vector_encoder.modules import HierarchicalTokenPooling
model = SentenceTransformer("ai-forever/FRIDA-Embeddings-V2-2B", device="cuda")
pooler = HierarchicalTokenPooling(pool_factor=2) # Keep roughly half of the document token vectors.
documents = [
"title: France | text: Paris is the capital of France.",
"title: Mars | text: Mars is known as the Red Planet.",
]
features = model.encode_document(documents, output_value=None)
token_embeddings = [item["multivector_embeddings"][item["attention_mask"].bool()] for item in features]
pooled_embeddings = [pooler.pool_one(tokens) for tokens in token_embeddings]
for original, pooled in zip(token_embeddings, pooled_embeddings):
print(f"Token embeddings: {tuple(original.shape)} -> {tuple(pooled.shape)}")
The model is trained with k-means pooling to fixed budgets of 32, 64, 128, 256, and 512 token vectors per document.
The dense vectors remain available in each item's sentence_embedding field. Pooling changes the token representation, so evaluate retrieval quality and storage requirements for the pooling setting you choose.
Model configuration for vLLM and SGLang
Load the released checkpoint directly. Both integrations register its Qwen3.5 backbone and embedding heads under the architecture name Qwen35JointEmbedding. Use the architecture override shown for your engine below.
Use add_generation_prompt=True for both queries and documents. When preparing raw strings or token IDs for input, apply the checkpointโs chat template and keep the complete suffix, including the final two newlines after </think>.
Run each engine in a Linux environment with a supported accelerator. Keep prefix caching disabled for joint vLLM serving so that the token head can return vectors for the entire input. The SGLang settings are described separately below. The context lengths in the examples are illustrative values, not the model's maximum length.
vLLM
For multivector retrieval with vLLM, we recommend
task: pluginonPOST /pooling. It returns the dense vector and one 128-dimensional vector per token in a single forward pass. For high-throughput indexing, request the FRIDA binary response withAccept: application/vnd.frida.embeddings.v1. Usetask: embedfor dense-only inference.
Joint dense and multivector serving
To serve the model with vLLM, follow the integration setup in the FRIDA repository.
VLLM_PLUGINS=frida_embeddings_v2 vllm serve ai-forever/FRIDA-Embeddings-V2-2B \
--runner pooling --dtype float16 --max-model-len 4096 --no-enable-prefix-caching \
--hf-overrides '{"architectures":["Qwen35JointEmbedding"]}'
The vLLM plugin frida_embeddings_v2 supports FRIDA-Embeddings-V2-2B. It uses the Qwen3.5 backbone for last-token dense pooling and loads the checkpointโs trained projection for token vectors. VLLM_PLUGINS enables the plugin and its HTTP endpoint. The architecture override selects the FRIDA model implementation.
Request both heads:
curl http://localhost:8000/pooling \
-H 'Content-Type: application/json' \
-d '{"model":"ai-forever/FRIDA-Embeddings-V2-2B","task":"plugin","messages":[{"role":"user","content":"What is semantic search?"}],"add_generation_prompt":true}'
{"data": [{"dense": [...], "multivector": [[...], ..., [...]]}], ...}
The example above returns JSON. To use the recommended binary format, send the same payload with the FRIDA media type and decode the FP32 token vectors with the plugin client:
import requests
from inference_plugins_vllm.wire import MEDIA_TYPE, decode
response = requests.post(
"http://localhost:8000/pooling",
json={
"model": "ai-forever/FRIDA-Embeddings-V2-2B",
"task": "plugin",
"messages": [{"role": "user", "content": "What is semantic search?"}],
"add_generation_prompt": True,
},
headers={"Accept": MEDIA_TYPE},
timeout=60,
)
response.raise_for_status()
item = decode(response.content)["data"][0]
dense = item["dense"] # [2048]
multivector = item["colbert"] # [token_count, 128]
The JSON response exposes the token matrix as multivector. The FRIDA binary v1 decoder exposes it as colbert.
The same server supports these JSON outputs:
task |
Output per input |
|---|---|
embed |
response["data"][i]["data"]: [2048] dense vector |
token_embed |
response["data"][i]["data"]: [token_count, 128] matrix |
plugin |
response["data"][i]["dense"] and response["data"][i]["multivector"] |
For offline joint inference, configure standard LLM for token embeddings and use encode_joint:
from inference_plugins_vllm.offline import encode_joint
from vllm import LLM
from vllm.config import PoolerConfig
llm = LLM(
model="ai-forever/FRIDA-Embeddings-V2-2B",
runner="pooling",
hf_overrides={"architectures": ["Qwen35JointEmbedding"]},
pooler_config=PoolerConfig(task="token_embed"),
enable_prefix_caching=False,
max_model_len=4096,
)
def text_prompt(text):
return llm.get_tokenizer().apply_chat_template(
[{"role": "user", "content": text}], tokenize=False, add_generation_prompt=True
)
heads = encode_joint(llm, [text_prompt("What is semantic search?")])
print(heads)
# [{'dense': [...], 'multivector': [[...], ..., [...]]}]
# Token-only output on the same token-embedding instance:
tokens = llm.encode(
[text_prompt("title: Semantic search | text: Search retrieves documents by meaning.")], pooling_task="token_embed"
)
print(tokens[0].outputs.data.shape) # torch.Size([token_count, 128])
Offline task selection follows stock vLLM and applies per LLM instance. For dense-only inference, initialize with PoolerConfig(task="embed") and call llm.embed(...). The optional offline data.input envelope requires io_processor_plugin="frida_embeddings_v2" and pooling_task="plugin". Offline data accepts only input, and chat conversations must first be formatted into native prompts.
Image inputs
Use native messages for an image conversation. Each HTTP request represents one conversation, so send separate requests for separate conversations.
curl http://localhost:8000/pooling \
-H 'Content-Type: application/json' \
-d '{
"model": "ai-forever/FRIDA-Embeddings-V2-2B",
"task": "plugin",
"add_generation_prompt": true,
"messages": [{"role": "user", "content": [
{"type": "image_url", "image_url": {"url": "https://example.com/page.png"}}
]}]
}'
Replace the image URL with your document URL or a data:image/png;base64,... URL containing base64-encoded PNG bytes. The server applies the saved chat template and processor. Images require the full vision/language model and processor, and their patches must fit within the context limit. Qwen3.5 does not support audio input. Offline mixed batches use native prompt dictionaries with formatted image placeholders and multi_modal_data, rather than conversation lists or bare PIL objects.
To send a local PNG as a base64 data URL and receive both heads:
import base64
from pathlib import Path
import requests
encoded_image = base64.b64encode(Path("page.png").read_bytes()).decode("ascii")
payload = {
"model": "ai-forever/FRIDA-Embeddings-V2-2B",
"task": "plugin",
"add_generation_prompt": True,
"messages": [
{
"role": "user",
"content": [
{"type": "image_url", "image_url": {"url": f"data:image/png;base64,{encoded_image}"}},
],
}
],
}
response = requests.post("http://localhost:8000/pooling", json=payload, timeout=300)
response.raise_for_status()
result = response.json()
item = result["data"][0]
print(len(item["dense"])) # 2048
print(len(item["multivector"]), len(item["multivector"][0])) # token_count, 128
For offline image encoding, use the token-embedding llm instance from the offline example above, format the image placeholder, and attach the PIL image through native multi_modal_data:
from PIL import Image
image = Image.open("page.png").convert("RGB")
formatted = llm.get_tokenizer().apply_chat_template(
[
{
"role": "user",
"content": [
{"type": "image"},
],
}
],
tokenize=False,
add_generation_prompt=True,
)
heads = encode_joint(llm, [{"prompt": formatted, "multi_modal_data": {"image": image}}])
print(heads) # [{'dense': [...], 'multivector': [[...], ..., [...]]}]
Base64 embedding responses
All three /pooling tasks support encoding_format: base64. For joint output, each head includes its shape, dtype, and byte order. This self-contained client requests both heads and decodes the multivectors without a local vLLM installation:
import base64
import numpy as np
import requests
payload = {
"model": "ai-forever/FRIDA-Embeddings-V2-2B",
"task": "plugin",
"messages": [{"role": "user", "content": "title: France | text: Paris is the capital of France."}],
"add_generation_prompt": True,
"encoding_format": "base64",
"embed_dtype": "float32",
"endianness": "little",
}
response = requests.post("http://localhost:8000/pooling", json=payload, timeout=300)
response.raise_for_status()
result = response.json()
for item in result["data"]:
head = item["multivector"]
raw = base64.b64decode(head["data"], validate=True)
vectors = np.frombuffer(raw, dtype="<f4").reshape(head["shape"])
print(vectors.shape) # (token_count, 128)
dense_head = item["dense"]
dense = np.frombuffer(base64.b64decode(dense_head["data"], validate=True), dtype="<f4").reshape(dense_head["shape"])
print(dense.shape) # (2048,)
Abbreviated base64 output for one combined head:
{"data": "...", "shape": [12, 128], "embed_dtype": "float32", "endianness": "little"}
If your client needs only the token matrix in the native vLLM response schema, use task: token_embed with encoding_format: base64. The response stores the base64 string in response["data"][i]["data"], which you can decode with np.frombuffer(raw, dtype="<f4").reshape(-1, 128). The dtype and byte order must match the request. Float16 transfer is also available with embed_dtype: float16 and dtype="<f2", at some cost in precision. Base64 reduces response size compared with JSON float arrays. Input remains JSON.
Binary embedding responses
The same server also supports encoding_format: bytes or bytes_only. bytes returns application/octet-stream with a JSON metadata response header that describes tensor shapes, dtype, byte order, and byte offsets. Combined payloads concatenate dense and then multivector bytes for each input. bytes_only omits the metadata, so the caller must already know the shapes and offsets.
To request bytes, replace encoding_format in the base64 client with bytes and read the response as follows (keep embed_dtype: float32 and endianness: little):
import json
payload["encoding_format"] = "bytes"
response = requests.post("http://localhost:8000/pooling", json=payload, timeout=300)
response.raise_for_status()
metadata = json.loads(response.headers["metadata"])
body = response.content
for part in metadata["data"]:
values = np.frombuffer(body[part["start"] : part["end"]], dtype="<f4").reshape(part["shape"])
print(part["input_index"], part["head"], values.shape)
Dense-only requests on the same server
Send task: embed to the running joint server to receive one normalized 2,048-dimensional vector per input:
curl http://localhost:8000/pooling \
-H 'Content-Type: application/json' \
-d '{"model":"ai-forever/FRIDA-Embeddings-V2-2B","task":"embed","messages":[{"role":"user","content":"What is semantic search?"}],"add_generation_prompt":true}'
The vector is returned in response["data"][0]["data"].
SGLang
To serve the model with SGLang, follow the integration setup in the FRIDA repository.
Start the server with the supplied launcher, which returns both output heads:
SGLANG_EXTERNAL_MODEL_PACKAGE=inference_plugins_sglang.models \
python -m inference_plugins_sglang.serve \
--model-path ai-forever/FRIDA-Embeddings-V2-2B --is-embedding \
--json-model-override-args '{"architectures":["Qwen35JointEmbedding"]}' \
--disable-radix-cache --chunked-prefill-size -1 --context-length 512 --port 30000
Run this client in another terminal, using the same model repository as the server:
import requests
import torch
from transformers import AutoTokenizer
model_id = "ai-forever/FRIDA-Embeddings-V2-2B"
tokenizer = AutoTokenizer.from_pretrained(model_id)
prompt = tokenizer.apply_chat_template(
[{"role": "user", "content": "What is semantic search?"}],
tokenize=False,
add_generation_prompt=True,
)
input_ids = tokenizer([prompt], add_special_tokens=False)["input_ids"]
response = requests.post(
"http://localhost:30000/encode",
json={
"input_ids": input_ids,
"return_pooled_hidden_states": True,
},
timeout=300,
)
response.raise_for_status()
results = response.json()
if isinstance(results, dict):
results = [results]
for result in results:
dense = torch.nn.functional.normalize(torch.tensor(result["pooled_hidden_state"]), dim=0)
multivector = torch.tensor(result["embedding"])
print({"dense": dense.tolist(), "multivector": multivector.tolist()})
The server returns token vectors as embedding and an unnormalized last-token state as pooled_hidden_state. The client normalizes the dense vector and uses the same contract for tokenization.
Training
The model is built on Qwen3.5-2B, fine-tuned with LoRA, and uses a learned projection for its token vectors. The training data covers text, code, and visual documents. The release uses WiSE-FT weight interpolation and retains the trained token projection.
Latency and storage benchmarks
The tables below report CPU index-search measurements and retrieval quality for four tasks. The RAM and disk columns estimate FP16 vector payloads in MiB and GiB using the corpus sizes and mean token counts shown below. For fixed-budget setups they use the full budget per document. These estimates exclude index metadata. nDCG@10 is reported on a 0โ100 scale here; the comparison tables above use 0โ1. For mixed setups, the two times are dense candidate search and token-vector reranking, respectively:
MIRACL RU (re-annotated): short text passages, medium scaleMIRACL RU document-level (re-annotated): long text documents, medium scaleViDoRe3ComputerScienceRetrieval: high-resolution images, small scale- ruViDoRe, sber subset: medium-resolution images, small scale
Measurement details
- Search phase only, no model inference
- brute force search is performed, no ANN
- Intel(R) Xeon(R) Gold 6238 CPU @ 2.10GHz
- torch==2.13.0,
torch.set_num_threads(8) - fp16
- one query per measurement
- 15 tokens per query for multi-vector setups
- token counts use the Qwen3.5 tokenizer
RAM holds the index representations scanned during search. Representations used only for reranking are stored on disk, and only a small candidate subset is loaded into RAM for each query.
MIRACL RU, re-annotated (290,613 documents; 130 mean tokens per document)
| Setup | RAM | Disk | Time | nDCG@10 |
|---|---|---|---|---|
dense |
1.11 GiB | 0 MiB | 47.3 ms ยฑ 4.05 ms | 59.57 |
late |
9.01 GiB | 0 MiB | 3.79 s ยฑ 25.5 ms | 68.77 |
mixed_30 |
1.11 GiB | 9.01 GiB | 53.2 ms ยฑ 8.24 ms; 509 ยตs ยฑ 2 ยตs | 68.16 |
MIRACL RU, re-annotated document-level (160,144 documents; 1,780 mean tokens per document)
| Setup | RAM | Disk | Time | nDCG@10 |
|---|---|---|---|---|
dense |
625.6 MiB | 0 MiB | 26.8 ms ยฑ 0.550 ms | 60.72 |
late |
67.96 GiB | 0 MiB | 31.4 s ยฑ 5.92 s | 71.99 |
k128d128 |
4.89 GiB | 0 MiB | 2.35 s ยฑ 322 ms | 66.14 |
mixed_30 |
625.6 MiB | 67.96 GiB | 26.7 ms ยฑ 0.321 ms; 4.83 ms ยฑ 21 ยตs | 69.55 |
mixed_30_k128d128 |
625.6 MiB | 4.89 GiB | 26.2 ms ยฑ 849 ยตs; 478 ยตs ยฑ 21 ยตs | 65.33 |
ViDoRe3ComputerScienceRetrieval (1,360 documents; 3,657 mean tokens per document)
| Setup | RAM | Disk | Time | nDCG@10 |
|---|---|---|---|---|
dense |
5.31 MiB | 0 MiB | 118 ยตs ยฑ 0.595 ยตs | 72.31 |
late |
1.19 GiB | 0 MiB | 483 ms ยฑ 80.0 ms | 78.24 |
k128d128 |
42.5 MiB | 0 MiB | 17.2 ms ยฑ 205 ยตs | 78.03 |
mixed_30 |
5.31 MiB | 1.19 GiB | 124 ยตs ยฑ 2 ยตs; 10.3 ms ยฑ 751 ยตs | 77.73 |
mixed_30_k128d128 |
5.31 MiB | 42.5 MiB | 112 ยตs ยฑ 7 ยตs; 455 ยตs ยฑ 6 ยตs | 77.43 |
ruViDoRe, sber subset (1,308 documents; 920 mean tokens per document)
| Setup | RAM | Disk | Time | nDCG@10 |
|---|---|---|---|---|
dense |
5.11 MiB | 0 MiB | 234 ยตs ยฑ 2.00 ยตs | 59.54 |
late |
293.8 MiB | 0 MiB | 108 ms ยฑ 754 ยตs | 68.86 |
k128d128 |
40.9 MiB | 0 MiB | 16.5 ms ยฑ 177 ยตs | 68.16 |
mixed_30 |
5.11 MiB | 293.8 MiB | 114 ยตs ยฑ 1 ยตs; 2.54 ms ยฑ 33 ยตs | 68.41 |
mixed_30_k128d128 |
5.11 MiB | 40.9 MiB | 106 ยตs ยฑ 6 ยตs; 470 ยตs ยฑ 13 ยตs | 66.22 |
Mixed retrieval is close to late interaction in quality while keeping search latency close to dense retrieval on these measurements, at the expense of storing token vectors and reading candidates for reranking. Late interaction can become expensive even on modest corpora: search exceeded 100 ms in one benchmark, and its memory requirement reached tens of gigabytes for a larger document corpus. Those vectors must be kept in RAM or on a GPU for this brute-force setup.
Authors and citation
- Downloads last month
- 9



