synrag / README.md
AlexFromSynlabs's picture
synrag models: Synapse v2 encoder and reranker v1, model card, license, checksums
61f79d4 verified
|
Raw History Blame Contribute Delete
6.09 kB
---
license: other
license_name: synrag-community-license
license_link: LICENSE.md
library_name: synrag
pipeline_tag: sentence-similarity
language:
- multilingual
- en
- ru
- uk
- kk
- uz
- ky
- tg
- az
- tr
- de
- es
- fr
- ar
- fa
- ur
- hi
- zh
tags:
- retrieval
- embeddings
- rag
- reranker
- cpu
- rust
- multilingual
- knowledge-distillation
- mcp
---
# synrag models β€” Synapse encoder and contextual reranker
The model files used by **[synrag](https://github.com/Synlabs-ai/synrag)**: CPU-native search and context for AI agents β€”
hybrid retrieval, multilingual embeddings, document parsing and compact, cited LLM context in one 3 MB binary. No GPU.
| File | What | Size |
|---|---|---:|
| `synapse-v2.synm` | **Synapse v2** β€” multilingual text encoder, 21.3M parameters, 256-d vectors | 86 MB |
| `rerank-v1.synr` | **Reranker v1** β€” contextual reranker over Synapse token states, 65.8K parameters | 0.26 MB |
> These are **not** PyTorch / safetensors checkpoints. They are synrag's own binary formats and are loaded by the synrag
> engine (Linux x86-64), its Python SDK and its MCP server. The code, releases and documentation live on
> [GitHub](https://github.com/Synlabs-ai/synrag).
**Links:** [GitHub](https://github.com/Synlabs-ai/synrag) Β· [Website & docs](https://ai.synlabs.pro) Β·
[Benchmarks](https://github.com/Synlabs-ai/synrag/blob/main/BENCHMARKS.md) Β· [PyPI `synrag`](https://pypi.org/project/synrag/) Β·
[PyPI `synrag-mcp`](https://pypi.org/project/synrag-mcp/) Β· MCP Registry: `io.github.Synlabs-ai/synrag`
## Quick start
The installer fetches the engine and these models (SHA-256 verified) β€” you do not need to download them by hand:
```bash
curl -fsSL https://ai.synlabs.pro/install.sh | sh # binary β†’ ~/.local/bin, models β†’ ~/.synrag/models
M=~/.synrag/models
synrag index ./docs -o docs.syn --student $M/synapse.synm
synrag search docs.syn "how do refunds work" -k 5 --student $M/synapse.synm
synrag serve docs.syn --student $M/synapse.synm --rerank $M/rerank.synr --port 7878
```
Or straight from this repository:
```bash
pip install -U huggingface_hub
hf download Synlabs-ai/synrag synapse-v2.synm rerank-v1.synr --local-dir ~/.synrag/models
cd ~/.synrag/models && mv synapse-v2.synm synapse.synm && mv rerank-v1.synr rerank.synr # names the SDK / MCP server look for
```
Python SDK (`pip install synrag`) and MCP server for agents (`uvx synrag-mcp`) find the installed engine and the model by
themselves. See the [README on GitHub](https://github.com/Synlabs-ai/synrag#readme) for the HTTP API, Docker and the SDK.
## Models
**Synapse v2** is a convolutional encoder: own BPE tokenizer (80K tokens, all scripts), token embeddings of width 256,
convolution with a Β±8-token receptive field and a global gate, mean pooling to a 256-d vector. About 5K multiplications per
token β€” 2,000–20,000Γ— fewer than a small transformer β€” so it embeds **~51,600 documents/s on 6 CPU cores**. It was distilled
from [EmbeddingGemma](https://huggingface.co/google/embeddinggemma-2) on multilingual data. Synapse is built to be
**fused with BM25** inside synrag; on its own it is weaker than transformer embedding models.
**Reranker v1** reorders the top 30 hits by late interaction (MaxSim) over Synapse's per-token states, with a small learned
head (65.8K parameters) distilled from the same teacher on BM25 candidate lists. Cost: ~11.5 ms CPU per query.
## Evaluation
nDCG@10 on public **test** splits, one machine for every system (AMD Ryzen 5 7500F, 6 cores; transformer models on an
RTX 5060 Ti). synrag's settings were chosen on train/dev only. Our own measurements β€” scripts and every table in
[BENCHMARKS.md](https://github.com/Synlabs-ai/synrag/blob/main/BENCHMARKS.md).
| System | Hardware | BEIR (SciFact, NFCorpus, FiQA) | MLQA (5 languages) | Belebele (14 languages) |
|---|---|---:|---:|---:|
| **synrag + Synapse + reranker** | CPU | 0.455 | **0.664** | **0.874** |
| Elasticsearch BM25 | CPU | 0.424 | 0.585 | 0.791 |
| Tantivy + Model2Vec (Rust) | CPU | 0.430 | 0.644 | 0.815 |
| multilingual-e5-small | GPU | 0.430 | 0.624 | β€” |
| bge-small-en-v1.5 | GPU | 0.478 | 0.224 | β€” |
| EmbeddingGemma | GPU | **0.503** | 0.658 | 0.852 |
| Elasticsearch + embedding model | GPU | 0.455–0.474 | 0.641–0.657 | 0.843–0.853 |
Speed: FiQA (57.6K documents) is searchable **1.6 s** after start on 6 cores (embedding models: 60–282 s on a GPU,
16 min–1.7 h on the same CPU); 8.8M MS MARCO passages index in 2.4 min on one server, 7–10 ms per query.
**Where it loses (honestly):**
- English: bge-small and EmbeddingGemma on a GPU are ahead by 0.02–0.05 nDCG; on independent English sets (SciDocs,
ArguAna, TREC-COVID, Quora) Elasticsearch + model hybrids lead by 0.02–0.04, and on ArguAna Synapse slightly hurts BM25.
- Large languages (Hindi, Persian, Russian, Arabic, Turkish, German): EmbeddingGemma is better. synrag's multilingual lead
comes mostly from low-resource languages (Kazakh, Uzbek, Kyrgyz, Tajik).
- Cross-lingual search (question and documents in different languages) is weak.
- Synapse alone (without BM25) is on par with Model2Vec and below transformer embedding models.
## Intended use
Retrieval and context building for RAG and AI agents on ordinary servers and laptops without a GPU: company documents, wikis,
support knowledge bases, code and multilingual collections, including languages that large embedding models cover poorly.
Not intended as a general-purpose sentence embedding model outside synrag, and not for decisions about people.
## License
The models (and the synrag engine) are licensed under the **synrag Community License** β€” free, including commercial use and
production, up to 1M chunks per organization; larger deployments, Enterprise features, OEM redistribution and hosted search
services need a paid license. Full text: [LICENSE.md](LICENSE.md); pricing: [ai.synlabs.pro/pricing](https://ai.synlabs.pro/pricing/).
The Python SDK, MCP server and examples on GitHub are Apache-2.0.
Β© 2026 SYNLABS MCHJ Β· [ai.synlabs.pro](https://ai.synlabs.pro)