A static embedding model for Ukrainian: 64,003 tokens × 256 dimensions, 32.8 MB of FP16 weights (about 35 MB with the tokenizer). It was distilled from BAAI/bge-m3 with Model2Vec and then trained with Tokenlearn. Encoding a text is a table lookup and an average, so it runs on a CPU in about 0.1 ms per query and needs no GPU.
On three Ukrainian retrieval sets it scores 0.07–0.12 nDCG@10 higher than potion-multilingual-128M, with weights one-eighth the size at the same precision. It does not replace BM25 for keyword-style questions; see Results.
from model2vec import StaticModel
model = StaticModel.from_pretrained("SyntaxSpirits/ukr-static-m3-64k")
embeddings = model.encode(["Київ — столиця України.", "Як оформити закордонний паспорт?"])
With sentence-transformers:
from sentence_transformers import SentenceTransformer
model = SentenceTransformer("SyntaxSpirits/ukr-static-m3-64k").float()
embeddings = model.encode(["Київ — столиця України."])
Keep the .float(): the weights are stored in FP16, and without it sentence-transformers returns NaN for inputs
that contain no known tokens, such as an empty string.
Embeddings are L2-normalised, so a dot product is the cosine similarity. Inputs that leave no known tokens, such as an empty string or "!!!", get a zero vector.
Long texts are truncated. Both loaders cut at 512 tokens (set in tokenizer.json). Model2Vec by default also cuts
at 3,584 characters (512 × the median token length of 7) before tokenizing; in the evaluations below this changed
the tokens of no document, for this model or POTION. To embed whole texts with Model2Vec, pass max_length=None to
model.encode; otherwise split long documents into chunks.
nDCG@10 for question → passage retrieval.
| Model | Weights | Belebele uk | WebFAQ uk | UA-SQuAD val |
|---|---|---|---|---|
| ukr-static-m3-64k | 32.8 MB (FP16) | 0.776 | 0.434 | 0.684 |
| potion-multilingual-128M | 512 MB (FP32) | 0.652 | 0.344 | 0.613 |
| static-similarity-mrl-multilingual-v1 | 434 MB (FP32) | 0.617 | 0.352 | – |
| BM25 | – | 0.693 | 0.490 | 0.761 |
| ukr-static-m3-64k + BM25 | – | 0.770 | 0.504 | 0.765 |
| potion-multilingual-128M + BM25 | – | 0.716 | 0.462 | 0.734 |
| BAAI/bge-m3 (teacher) | 2.27 GB (FP32) | 0.937 | – | – |
ukr_Cyrl: 900 questions, 488 passages. WebFAQ ukr test: 6,851 questions, 68,501 answers.
UA-SQuAD val: 5,726 answerable questions, 1,160 paragraphs.s. It was fixed and the model retrained before release. All three sets, UA-SQuAD included, were
evaluated with both builds, and no score differs by more than 0.0015 nDCG@10.datasets library.ukr_Cyrl); only Cyrillic letter sequences were counted. Added to them are the
32,000 BGE-M3 subword tokens most frequent in the same text, so unseen word forms still get vectors, plus a
dedicated unknown token with a zero vector. Whole words get the highest Unigram score, so the tokenizer prefers
them over subword splits. Of the 9,711 documents used for counting, 86 share an 8-word sequence with WebFAQ,
1 with UA-SQuAD and none with Belebele; they were not removed from the counts.MIT (see LICENSE). The model is derived from BAAI/bge-m3 (MIT) and uses its XLM-RoBERTa tokenizer (MIT); their
notices are in NOTICE. Training text came from Ukrainian Wikipedia (CC BY-SA 4.0) and FineWeb-2 (ODC-By 1.0,
also subject to the Common Crawl Terms of Use). Contains information from FineWeb-2, which is made available under
the ODC Attribution License. No training passages are included: the release contains token vectors and a
vocabulary of single words and subword pieces.
Oleksandr Kholodniak (ORCID 0009-0000-1012-7361).
@misc{kholodniak2026ukrstatic,
author = {Kholodniak, Oleksandr},
title = {ukr-static-m3-64k: a static embedding model for Ukrainian retrieval},
year = {2026},
howpublished = {\url{https://huggingface.co/SyntaxSpirits/ukr-static-m3-64k}}
}
BAAI/bge-m3