AnankeEmbed-S: an ultra-lightweight, tokenizer-free embedding model
2 min readupdated
AnankeEmbed-S from AMFORGE (AMEFORGE) encodes search queries and documents into numerical vectors for semantic search and reranking. It is built on a compact 6-layer bidirectional Transformer with a hidden dimension of 384, weighing in at just 46.4 MB in ONNX format. Its standout feature is operating directly on raw UTF-8 bytes with no tokenizer (subword vocabulary) at all, making it resilient to typos, emojis, code snippets, and diacritics. It is a great fit for developers building local search engines, RAG pipelines (knowledge-base retrieval), and private indexes under tight memory constraints.
Key features
- Tokenizer-free architecture: takes raw UTF-8 bytes directly (up to 512 bytes) and folds them via 4×4 patches into 128 positions.
- Matryoshka (MRL) support: vectors can be truncated from 256 down to 128 or 64 dimensions with virtually no drop in retrieval quality, cutting vector database storage by up to 4x.
- Minimal footprint: ready for fast CPU and GPU inference via
ananke-embed.onnx(46.4 MB) or a PyTorch checkpoint (46.3 MB). - Supported languages: officially targets English and French, while byte-level input handles arbitrary characters out of the box.
What you can do
- Build fast local semantic search or reranking over technical documentation and code snippets.
- Shrink your vector database index by 4x by passing
dim: 64in requests to theserve.pyHTTP endpoint. - Deploy lightweight search directly on a CPU server or inside an air-gapped environment without heavy dependencies or complex tokenization.
Example
curl -X POST [http://127.0.0.1:8090/embed](http://127.0.0.1:8090/embed) \
-H "Authorization: Bearer $ANANKE_EMBED_KEY" \
-H "Content-Type: application/json" \
-d '{"texts": ["fastapi background tasks"], "role": "query", "dim": 64}'Read more
DetailsRetrieval Benchmarks: at 64 dimensions, MRR = 0.7974, Recall@1 = 0.7350, Recall@10 = 0.9155 (at 256 dimensions, MRR = 0.7966, Recall@10 = 0.9165).
Internal Ananke Search Exam: examen_r1 = 0.70, examen_mrr = 0.791.
Training: 6.71 hours on a single NVIDIA A100-SXM4-80GB (best checkpoint at step 38,000).
Limitations: maximum input length is 512 bytes; trained primarily on English web and technical pairs.










Comments