Instructions to use kyr0/Winzling-Embed-a8m-64k with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use kyr0/Winzling-Embed-a8m-64k with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("kyr0/Winzling-Embed-a8m-64k") sentences = [ "Das ist eine glückliche Person", "Das ist ein glücklicher Hund", "Das ist eine sehr glückliche Person", "Heute ist ein sonniger Tag" ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [4, 4] - Notebooks
- Google Colab
- Kaggle
- Winzling-Embed-a8m-64k
- Highlights
- What the name means
- Model details
- Model lineage
- Supported languages
- Quick start
- ONNX details
- Weight-space edits of the default UINT4 file
- Vocabulary trimming
- MTEB regression benchmark
- Other languages
- Historic results (original UINT4 file)
- Upstream Bekko results
- Intended uses
- Not intended for
- Fine-tuning
- Matryoshka dimensions
- Long-context behavior
- Reproducing the transformation
- Reproducibility and provenance
- Files
- Limitations
- License
- Citation
- Acknowledgements
- Highlights
Winzling-Embed-a8m-64k
| Runtime file | Uncompressed | Brotli, level 11 |
|---|---|---|
onnx/model_uint4.onnx |
30.46 MB | 27.94 MB |
tokenizer.json |
9.29 MB | 0.86 MB |
tokenizer_config.json |
2.45 kB | 0.41 kB |
| Client transfer size | 39.76 MB | 28.81 MB |
A 30.46 MB UINT4 ONNX German/English/Russian text-embedding model, 27.94 MB as Brotli, derived from hotchpotch/bekko-embedding-v1-a8m.
Winzling-Embed-a8m-64k keeps Bekko a8m's complete 4-layer, 384-dimensional encoder while shrinking its multilingual vocabulary from 256,000 to 65,536 tokens selected for German (de), English (en) and Russian (ru). The transformer is then exported with block-wise asymmetric UINT4 weights; the token embedding table remains row-wise INT8.
The default onnx/model_uint4.onnx is an edit of the original UINT4 export with the same graph. Its 4-bit weights were re-quantized with GPTQ, and its float32 block scales were then trained to follow a stronger teacher model. Only stored quantization parameters differ; see Weight-space edits of the default UINT4 file.
The ONNX graph is 30.46 MB on disk, 27.94 MB with Brotli level 11 and 28.08 MB with zstd -19, while retaining the original model's 7,671,168 active transformer parameters. A client such as defuss-vectorsearch downloads the graph and both tokenizer files: 39.76 MB, or 28.81 MB when a server sends their Brotli files (see Using the Brotli artifacts). It needs no GPU: in the defuss-vectorsearch benchmark it embeds a query in 6.6 ms in Node.js (native ONNX Runtime) and in 21 ms in Chromium with WebAssembly, on one thread (medians on an Apple M5 Max, 2026-11-08).
VERIFIED (2026-11-07 and 2026-11-08). Nano and MTEB use the frozen benchmark data and metrics of eval/ and the scripts in reproduce/. belebele-tiny-20 is the 20-language benchmark of defuss-vectorsearch; Other languages describes how its rows were measured:
| Benchmark, nDCG@10 unless noted | Original UINT4 file | Default UINT4 file | FP32 |
|---|---|---|---|
| 23 Nano retrieval tasks, macro | 0.6172 | 0.6260 | 0.6233 |
| Nano, German (15 tasks) | 0.5662 | 0.5767 | 0.5718 |
| Nano, English (6 tasks) | 0.6619 | 0.6681 | 0.6700 |
| Nano, Russian (2 tasks) | 0.8649 | 0.8699 | 0.8694 |
| Limited 10-task MTEB subset, German, English and Russian only, mean main score | 71.478 | 72.006 | not measured |
| belebele-tiny-20, German, English, Russian (150 questions) | 0.8764 | 0.8802 | not measured |
| belebele-tiny-20, French, Indonesian, Dutch, Italian, Portuguese, Spanish (300) | 0.7829 | 0.7791 | not measured |
| belebele-tiny-20, the other 11 languages (550) | 0.3061 | 0.3140 | not measured |
| belebele-tiny-20, all 20 languages (1,000) | 0.5347 | 0.5385 | not measured |
Bold marks the best score in each row. Significance was tested for the Nano total, MTEB and belebele-tiny-20. On the Nano test half the default gains 0.0075 nDCG@10 [95% CI +0.0003, +0.0148], and on MTEB it is ahead on 7 of 10 tasks (one-sided sign-flip test, p = 0.036). On belebele-tiny-20 no group's difference is significant; Other languages gives the confidence intervals and every language. The other 11 languages are Polish, Turkish, Vietnamese, Arabic, Urdu, Hindi, Bengali, Thai, Chinese, Japanese and Korean. Nano is 23 task-language pairs: 17 NanoBEIR tasks from lightonai/nanobeir-multilingual (13 German, 4 English; that source has no Russian), plus NanoMIRACL and a 200-query task derived from FineWeb2-IR, each in German, English and Russian. The per-language Nano rows average the full query sets of the per-task table and were not tested separately.
None of these numbers is an official full MMTEB Multilingual v2 score. The MTEB figure is the mean of the limited 10-task MTEB subset documented in this model card, evaluated only on language subsets whose languages are all German, English or Russian. The upstream Bekko model reports 56.7 Mean(Task) on the official 131-task MMTEB Multilingual v2 benchmark; the two aggregates are not directly comparable. The original file's earlier scores (54.979 and related) came from a different protocol and are kept under Historic results.
Highlights
- 30.46 MB runtime ONNX graph
- 28.08 MB as
onnx/model_uint4.onnx.zstwith Zstandard level 19 - 27.94 MB as
onnx/model_uint4.onnx.brwith Brotli level 11 - 28.81 MB for the graph and both tokenizer files with Brotli level 11, down from 39.76 MB
- 32,836,992 total parameters, down from 105,975,168
- 7,671,168 active transformer parameters remain unchanged
- 65,536-token vocabulary specialized for
de,en,ru - 4-layer mmBERT / ModernBERT-style encoder
- 384-dimensional sentence embeddings
- Mean pooling
- Cosine similarity
- Up to 8,192 input tokens inherited from Bekko
- No query/document prefixes
- Transformer MatMul weights: asymmetric UINT4, block size 32, GPTQ codes with teacher-distilled block scales
- Token embedding table: row-wise INT8
- Cosine to the trimmed FP32 model on 1,200 held-out web documents:
- mean: 0.985353
- worst: 0.966591
- 23 Nano retrieval tasks, macro nDCG@10: 0.6260 (original UINT4 file 0.6172, FP32 0.6233)
- Limited 10-task MTEB subset, German, English and Russian only: 72.006 (original UINT4 file 71.478)
- belebele-tiny-20, all 20 languages, nDCG@10: 0.5385 (original UINT4 file 0.5347; see Other languages)
What the name means
Winzling is German for a tiny little thing.
Embed: dense text embedding modela8m: inherited Bekko configuration with ~8M active transformer parameters64k: 65,536-token vocabulary size
64k does not refer to context length or embedding dimension.
Model details
| Property | Value |
|---|---|
| Base model | hotchpotch/bekko-embedding-v1-a8m |
| Architecture | mmBERT / ModernBERT-style encoder |
| Transformer layers | 4 |
| Hidden / embedding dimension | 384 |
| Active transformer parameters | 7,671,168 |
| Original total parameters | 105,975,168 |
| Trimmed total parameters | 32,836,992 |
| Parameter reduction | 69.0% |
| Original vocabulary | 256,000 |
| Trimmed vocabulary | 65,536 |
| Languages | German, English, Russian |
| Maximum sequence length | 8,192 tokens |
| Pooling | Mean pooling |
| Similarity | Cosine |
| Query/document prefixes | None |
| Transformer ONNX quantization | Asymmetric UINT4 MatMulNBits, block size 32 |
| Default UINT4 weights | GPTQ codes, teacher-distilled block scales |
| Token embedding quantization | Row-wise INT8 |
| UINT4 ONNX size | 30.46 MB |
| Zstd-19 size | 28.08 MB (original UINT4 file: 27.64 MB) |
| Brotli-11 size | 27.94 MB (original UINT4 file: 27.50 MB) |
Checkpoint storage (model.safetensors) |
bfloat16, run in float32 ("FP32" in this card) |
| License | MIT |
The parameter accounting is particularly simple:
Original token table:
256,000 × 384 = 98,304,000 parameters
Trimmed token table:
65,536 × 384 = 25,165,824 parameters
Transformer / active parameters:
7,671,168 parameters
Trimmed total:
25,165,824 + 7,671,168 = 32,836,992 parameters
The encoder itself is not pruned. The size reduction comes almost entirely from removing vocabulary rows that are unnecessary for the selected language set.
Model lineage
flowchart TD
A["mmBERT-small"] -->|structural pruning| B["hotchpotch/mmBERT-L4H384-pruned"]
B -->|embedding training| C["hotchpotch/bekko-embedding-v1-a8m"]
C -->|"vocabulary trimming: de, en, ru, 65,536 tokens"| D["Winzling-Embed-a8m-64k, model.safetensors"]
D -->|"INT8 token embeddings, round-to-nearest UINT4 weights"| E["onnx/model_uint4_original.onnx"]
E -->|"GPTQ codes, block scales fitted to FP32"| F["onnx/model_uint4_gptq.onnx"]
F -->|"block scales distilled from a ColBERT teacher"| G["onnx/model_uint4.onnx, the default"]
Vocabulary trimming and the original export train nothing. The last two steps change only stored quantization parameters of the ONNX file, and two of their three stages train the block scales by gradient descent; see Weight-space edits of the default UINT4 file. model.safetensors is the unchanged trimmed checkpoint and contains none of these edits.
Supported languages
This release is intentionally specialized for:
| ISO 639-1 | Language |
|---|---|
de |
German |
en |
English |
ru |
Russian |
The tokenizer retains the required fallback machinery, so text in other scripts/languages may still tokenize and produce an embedding. That does not make those languages supported. Semantic quality outside de, en, and ru has not been validated and should not be assumed. Other languages reports 50 questions per language for the 17 languages outside de, en and ru; a sample that small shows tendencies, not support.
If broader multilingual coverage is required, use the original Bekko model or build a Winzling variant with the desired language set and a correspondingly larger vocabulary.
Quick start
TypeScript and JavaScript
defuss-vectorsearch uses onnx/model_uint4.onnx as its embedder since version 0.3.1. It pins this repository to a commit, checks every file's SHA-256 and caches the files. It runs in browsers with ONNX Runtime Web (device: "wasm" or "webgpu") and in Node.js and Bun ("wasm", or native ONNX Runtime with device: "cpu"):
npm install defuss-vectorsearch # or: bun add defuss-vectorsearch
npm install onnxruntime-node@1.21.0 # only for device: "cpu" in Node.js or Bun
import { buildTurboQuantIndex, createWinzlingEmbedder, searchTurboQuantIndex } from "defuss-vectorsearch/browser.js";
const embedder = createWinzlingEmbedder(); // one ONNX Runtime session, reused for every call
const documents = ["The cat sleeps on the sofa.", "Die Börse schloss heute im Plus.", "Кошка спит на диване."];
const index = buildTurboQuantIndex(await embedder.embedDocuments(documents)); // 4-bit codes, 256 B per vector
const hits = searchTurboQuantIndex(index, await embedder.embedQuery("A sleeping cat on a couch."), 2);
console.log(hits.map((hit) => documents[hit.index])); // both cat sentences
In Node.js and Bun, import createWinzlingEmbedder from defuss-vectorsearch/onnx.js and the TurboQuant functions from defuss-vectorsearch/turboquant.js. createColbertReranker({ model: "1.5m" }) from the same package adds a 3.83 MB MoEdernColBERT reranker. Its rerankHits reorders the top 25 dense hits by fusing both rankings; in the defuss-vectorsearch benchmark this lifts R@1 over its nine target languages from 66.2 to 78.7 (2026-11-08). The defuss-vectorsearch README covers it.
ONNX / CPU
Install Sentence Transformers with its ONNX dependencies:
pip install "sentence-transformers[onnx]"
When the model repository is available locally, run from its root:
from sentence_transformers import SentenceTransformer
model = SentenceTransformer(
".",
backend="onnx",
model_kwargs={
"file_name": "onnx/model_uint4.onnx",
"provider": "CPUExecutionProvider",
},
)
texts = [
"Das ist ein deutscher Beispielsatz.",
"This is an English example sentence.",
"Это пример предложения на русском языке.",
]
embeddings = model.encode(
texts,
normalize_embeddings=True,
)
print(embeddings.shape)
# (3, 384)
similarities = model.similarity(embeddings, embeddings)
print(similarities)
For direct Hub loading, replace "." with this repository's full Hub model ID.
FP32 / PyTorch
The trimmed FP32 checkpoint remains useful for fine-tuning or for measuring quantization deltas:
from sentence_transformers import SentenceTransformer
model = SentenceTransformer(".")
embeddings = model.encode(
[
"Ein kurzer deutscher Text.",
"A short English text.",
"Короткий русский текст.",
],
normalize_embeddings=True,
)
Using the Zstandard artifact
onnx/model_uint4.onnx.zst is a storage/distribution artifact. ONNX Runtime does not consume the .zst file directly.
Decompress it first:
zstd -d -k onnx/model_uint4.onnx.zst
This recreates:
onnx/model_uint4.onnx
while retaining the compressed file.
Using the Brotli artifacts
Each runtime file has a Brotli copy next to it: onnx/model_uint4.onnx.br, tokenizer.json.br and tokenizer_config.json.br. They were compressed at quality 11 with a 24-bit window (brotli -q 11 -w 24), the largest window that standard Brotli decoders accept. The graph's copy is 27,942,930 bytes, 0.5% smaller than the .zst. Inference needs the decompressed files.
Decompress them with the Brotli command-line tool:
brotli -d -k onnx/model_uint4.onnx.br tokenizer.json.br tokenizer_config.json.br
A web server can instead send each copy unchanged under the plain file name with the header Content-Encoding: br, for the browser to decompress. VERIFIED (2026-11-09): headless Chromium 140 fetched all three that way and received byte-identical files, SHA-256 b07e0e6f5ba1b65a8f7c988c967572d55d166b32ab8d9c1508b5b550511b8218 for the 30,464,606-byte graph.
ONNX details
The ONNX model is intentionally mixed precision:
Token embedding table
The 65,536 × 384 token table is stored using row-wise INT8 quantization.
This table dominates the remaining model size even after vocabulary trimming:
65,536 × 384 = 25,165,824 embedding parameters
Transformer weights
Transformer matrix multiplications are quantized using ONNX Runtime's MatMulNBits representation:
- 4-bit unsigned weights
- asymmetric quantization
- block size 32
- weight-only quantization; activations are not UINT4
This is why calling the model simply "INT4 everywhere" would be inaccurate. It is a UINT4 transformer + INT8 token-table model.
Quantization preservation
VERIFIED (2026-11-08, reproduce/fidelity.py): cosine between UINT4 and FP32 embeddings of 1,200 held-out FineWeb and FineWeb-2 documents, 400 each in German, English and Russian, used neither for calibration nor for training:
| File | Mean cosine | Worst cosine |
|---|---|---|
onnx/model_uint4_original.onnx, round-to-nearest |
0.962200 | 0.888380 |
onnx/model_uint4_gptq.onnx, GPTQ and scale refinement |
0.993273 | 0.983474 |
onnx/model_uint4.onnx, the default |
0.985353 | 0.966591 |
The default file sits further from FP32 than the GPTQ file by design: its scales were trained to rank passages like the teacher, not to copy FP32. The trimmer's export check reported a mean of 0.989615 and a worst of 0.986063 for the original file on its own validation texts; those two numbers are not comparable with this table.
Weight-space edits of the default UINT4 file
"Weight-space programming" here means editing the stored quantization parameters of the shipped ONNX file directly, instead of fine-tuning the checkpoint and exporting again. The default onnx/model_uint4.onnx keeps the original graph, node list, inputs, outputs, INT8 token embeddings, norms and byte size (30,464,606 bytes). VERIFIED by reproduce/audit.py: exactly 48 initializers differ from the original file. They are the 4-bit codes, zero points and float32 block scales of the 16 MatMulNBits layers, and their dequantized weights moved by 12.3% (relative Frobenius norm). The file therefore loads and runs wherever the original did.
The edits ran in three stages. The first is a closed-form re-quantization; the other two train only the 239,616 block scales by gradient descent.
GPTQ codes (
reproduce/gptq.py). VERIFIED byreproduce/check_rtn.py: the original file is round-to-nearest min/max quantization of the checkpoint; in all 16 layers its block scales equal the min/max scales, and 99.8 to 99.9% of its codes agree. GPTQ instead quantizes each layer in execution order to minimize its output error on 1,200 calibration documents from FineWeb and FineWeb-2, 400 per language and no benchmark text. Each layer is calibrated on the already quantized earlier layers.Scale refinement (
reproduce/refine.py). Adam trains the log block scales for 300 steps to match the FP32 model's pooled embeddings on the same calibration text. Stages 1 and 2 produceonnx/model_uint4_gptq.onnxand raise the held-out mean cosine to FP32 from 0.9622 to 0.9933.Quantization-aware distillation (
reproduce/qat_scales.py). One epoch of 1,510 steps, each with 16 queries of 8 candidate passages, trains the log scales of the quantized model itself, so what is learned is exactly what ships. The losses are:- German and English: KL divergence to the MaxSim scores of VAGOsolutions/SauerkrautLM-MoEdernColBERT-115M (Apache-2.0) at temperature 1.5, set by matching entropies.
- Russian: KL divergence to the untouched model's own scores. The teacher scores 0.05 to 0.16 nDCG@10 on the Russian Nano tasks, so it never teaches Russian.
- All languages: InfoNCE on the gold passage, plus 1 − cosine to the FP32 model on the calibration text, which protects the tasks that are not retrieval.
The mean absolute change of the log scales is 0.038, about 4%, and the largest change is a factor of 1.33. Training took 8 minutes on an Apple M5 Max (MPS), and teacher scoring of the candidate lists took another 8.
VERIFIED (2026-11-07): on the frozen Nano tasks the teacher beats the FP32 student by 4.1 nDCG@10 points in German [95% CI +2.2, +5.8] and 4.3 in English [+2.0, +6.7], while in Russian it scores 0.108 against the student's 0.869.
The training data holds 24,153 queries. Each has one positive and up to 7 negatives, taken from the dataset (GermanDPR hard negatives, MIRACL judged non-relevant passages) or mined by the untouched model:
| Source | Language | License | Queries |
|---|---|---|---|
| deepset/germandpr train | de | CC BY 4.0 | 9,275 |
| deepset/germanquad train, questions not in GermanDPR | de | CC BY 4.0 | 2,229 |
| sentence-transformers/natural-questions, seeded sample | en | CC BY-SA 3.0 (upstream Natural Questions) | 7,998 |
| MIRACL ru train, judged passages from the ru corpus | ru | Apache-2.0 | 4,651 |
VERIFIED: after normalizing case, Unicode and punctuation, no training query matched any of the 2,042 Nano benchmark queries, and 34 records were dropped because their positive passage was one of the 85,288 benchmark documents.
Why only the scales. A pilot in the style of MiCA (Rüdiger and Raschka 2026) trained low-rank updates of the FP32 weights, restricted to their minor singular directions, with the same losses. It gained 0.0034 nDCG@10 on Nano in FP32, which was not significant, and only 0.0005 after GPTQ and refinement, because quantization erased the update. Training the scales of the quantized model cannot lose its gain that way. A control run with the same recipe but without the teacher scored 0.6206, no better than its starting point of 0.6211, so the gain comes from the teacher.
Selection protocol. Nano queries are split into halves by the parity of the SHA-1 of their ID. Every choice, including teacher against control and the variants, was made on the dev half, and the test half is reported. MTEB ran once, on the chosen file.
Results. VERIFIED (2026-11-07 and 2026-11-08); bold marks the best UINT4 file per row:
| Benchmark | Original | GPTQ | Default | FP32 |
|---|---|---|---|---|
| NanoBEIR, 17 tasks (de 13, en 4) | 0.5335 | 0.5392 | 0.5467 | 0.5405 |
| NanoMIRACL (de, en, ru) | 0.7279 | 0.7248 | 0.7203 | 0.7325 |
| FineWeb2-IR derived (de, en, ru) | 0.9806 | 0.9814 | 0.9815 | 0.9834 |
| German, 15 tasks | 0.5662 | 0.5699 | 0.5767 | 0.5718 |
| English, 6 tasks | 0.6619 | 0.6683 | 0.6681 | 0.6700 |
| Russian, 2 tasks | 0.8649 | 0.8637 | 0.8699 | 0.8694 |
| All 23 Nano tasks, macro nDCG@10 | 0.6172 | 0.6211 | 0.6260 | 0.6233 |
| Limited 10-task MTEB subset, German, English and Russian only | 71.478 | 71.779 | 72.006 | not measured |
- On the Nano test half the default beats the original by 0.0075 nDCG@10 [95% CI +0.0003, +0.0148]. Against the GPTQ file the gain is 0.0024 [−0.0043, +0.0092], which is not significant.
- On MTEB the default beats the original on 7 of 10 tasks (one-sided sign-flip test, p = 0.036) and the GPTQ file on 6 of 10 (p = 0.118).
- It loses 0.0076 on NanoMIRACL against the original, and on MTEB it drops slightly on
BelebeleRetrieval(−0.39) andBibleNLPBitextMining(−0.52).
Nano nDCG@10 per task
| Task | Lang | Original | GPTQ | Default | FP32 |
|---|---|---|---|---|---|
| NanoArguAna | de | 0.4775 | 0.4853 | 0.4978 | 0.5006 |
| NanoArguAna | en | 0.5153 | 0.5190 | 0.5131 | 0.5461 |
| NanoClimateFEVER | de | 0.3107 | 0.3154 | 0.3258 | 0.3061 |
| NanoClimateFEVER | en | 0.2994 | 0.3192 | 0.3188 | 0.2981 |
| NanoDBPedia | de | 0.5737 | 0.5740 | 0.5801 | 0.5702 |
| NanoDBPedia | en | 0.6193 | 0.6138 | 0.6454 | 0.6146 |
| NanoFEVER | de | 0.8026 | 0.8078 | 0.8070 | 0.7983 |
| NanoFEVER | en | 0.8536 | 0.8695 | 0.8549 | 0.8645 |
| NanoFiQA2018 | de | 0.3652 | 0.3537 | 0.3613 | 0.3598 |
| NanoHotpotQA | de | 0.7758 | 0.7701 | 0.7860 | 0.7850 |
| NanoMSMARCO | de | 0.5059 | 0.4904 | 0.5297 | 0.5092 |
| NanoNFCorpus | de | 0.2375 | 0.2440 | 0.2341 | 0.2496 |
| NanoNQ | de | 0.4901 | 0.5266 | 0.5310 | 0.5082 |
| NanoQuoraRetrieval | de | 0.8449 | 0.8413 | 0.8449 | 0.8359 |
| NanoSCIDOCS | de | 0.2770 | 0.2751 | 0.2902 | 0.2670 |
| NanoSciFact | de | 0.6413 | 0.6501 | 0.6573 | 0.6566 |
| NanoTouche2020 | de | 0.4792 | 0.5113 | 0.5163 | 0.5184 |
| FineWeb2IR | de | 0.9851 | 0.9862 | 0.9893 | 0.9881 |
| FineWeb2IR | en | 0.9791 | 0.9813 | 0.9760 | 0.9816 |
| FineWeb2IR | ru | 0.9776 | 0.9767 | 0.9792 | 0.9806 |
| NanoMIRACL | de | 0.7271 | 0.7166 | 0.6997 | 0.7240 |
| NanoMIRACL | en | 0.7045 | 0.7072 | 0.7004 | 0.7152 |
| NanoMIRACL | ru | 0.7522 | 0.7507 | 0.7606 | 0.7582 |
Reproduce. bash reproduce/run.sh rebuilds onnx/model_uint4_gptq.onnx and onnx/model_uint4.onnx from pinned public inputs and compares them with the committed files. reproduce/README.md lists the steps, the two Python environments and the evaluation scripts behind every number above. onnx/model_uint4.json and onnx/model_uint4_gptq.json record the provenance of both files.
Fine-tuning. model.safetensors holds none of these edits. Fine-tuning starts from the trimmed checkpoint; quantize afterwards, and repeat the three stages if the gain should carry over.
Vocabulary trimming
The vocabulary was reduced from 256,000 to exactly 65,536 entries while preserving the transformer body.
The trimmer, embedding-model-trimmer/ in this repository, performs model-aware tokenizer surgery rather than simply slicing the first N token rows.
At a high level it:
- selects the target languages (
de,en,ru); - mines token usage from representative text for each language;
- balances language contributions so one corpus does not dominate the vocabulary;
- retains mandatory special/control tokens;
- retains byte-fallback requirements;
- recursively preserves BPE merge dependencies so retained composite tokens remain reachable;
- builds a compact mapping from old to new token IDs;
- rewrites tokenizer vocabulary and merge tables;
- remaps token-ID-bearing configuration fields;
- slices the embedding matrix to the retained rows;
- leaves the transformer encoder unchanged;
- leaves out the base model's ONNX and OpenVINO exports and exports a new UINT4 ONNX graph from the trimmed checkpoint.
trim-manifest.json and trim-report.json, written by the trimmer, record the corpus sources and revisions and the transformation metadata.
Why trimming can change embedding quality
Although the transformer itself is unchanged, vocabulary trimming changes how text is segmented.
A sentence that originally used a semantically useful learned token may be represented by a longer sequence of smaller pieces after trimming. This can alter the final embedding even before quantization.
The historic results below show that this effect is strongly task-dependent.
MTEB regression benchmark
Benchmark scope
This release is evaluated on a limited 10-task MTEB subset derived from MTEB(Multilingual, v2), which serves as a fixed regression suite. Only language subsets whose languages are all German, English or Russian count (MTEB's exclusive language filter); BibleNLPBitextMining, for example, keeps 4 language pairs instead of the 1,656 that contain at least one of them.
Scores shown here are:
100 × MTEB main_score
The suite is deliberately fixed so future dependency updates cannot silently change the benchmark composition.
It is not the official 131-task MMTEB Multilingual v2 aggregate.
The fixed task set is:
| Type | Task | Languages used |
|---|---|---|
| Retrieval | BelebeleRetrieval |
deu, eng, rus |
| Retrieval | MIRACLRetrievalHardNegatives |
deu, eng, rus |
| STS | STS22.v2 |
deu, eng, rus |
| STS | STS17 |
deu, eng |
| Classification | MassiveIntentClassification |
deu, eng, rus |
| Classification | AmazonCounterfactualClassification |
deu, eng |
| Clustering | SIB200ClusteringS2S |
deu, eng, rus |
| BitextMining | BibleNLPBitextMining |
deu, eng, rus |
| PairClassification | OpusparcusPC |
deu, eng, rus |
| Reranking | WikipediaRerankingMultilingual |
deu, eng |
Results
VERIFIED (2026-11-07, reproduce/mteb_cmp.py with mteb 2.27.1 on ONNX Runtime CPU):
| Type | Task | Original UINT4 | GPTQ UINT4 | Default UINT4 |
|---|---|---|---|---|
| Retrieval | BelebeleRetrieval |
89.305 | 89.325 | 88.919 |
| Retrieval | MIRACLRetrievalHardNegatives |
44.585 | 45.212 | 45.818 |
| STS | STS22.v2 |
61.286 | 61.788 | 61.303 |
| STS | STS17 |
81.042 | 81.148 | 81.629 |
| Classification | MassiveIntentClassification |
60.106 | 60.095 | 60.428 |
| Classification | AmazonCounterfactualClassification |
67.909 | 68.414 | 68.835 |
| Clustering | SIB200ClusteringS2S |
32.481 | 33.675 | 34.401 |
| BitextMining | BibleNLPBitextMining |
97.852 | 97.852 | 97.331 |
| PairClassification | OpusparcusPC |
93.666 | 93.669 | 93.607 |
| Reranking | WikipediaRerankingMultilingual |
86.553 | 86.609 | 87.790 |
| Mean | 71.478 | 71.779 | 72.006 |
The original Bekko model and the 64k FP32 checkpoint have not been run on these subsets, so this suite does not measure what vocabulary trimming costs.
Other languages
This release targets German, English and Russian. To show how it behaves elsewhere, both UINT4 files were measured on belebele-tiny-20 (tiny-embedding-bench-v1, the benchmark of defuss-vectorsearch). It holds 100 Belebele passages, each in 20 languages, as one pool of 2,000 passages, and 50 questions per language. Each question is searched by exact cosine over the whole pool. Only the passage in the question's own language counts as a hit, so a translation ranked first counts as a miss.
VERIFIED (2026-11-08) from the per-question ranks of both files. Δ is default minus original, with a 95% CI from a paired bootstrap over questions, stratified by language (10,000 resamples):
| Questions | R@1 original | R@1 default | R@5 original | R@5 default | nDCG@10 original | nDCG@10 default | Δ nDCG@10 [95% CI] |
|---|---|---|---|---|---|---|---|
| German, English, Russian (150) | 75.3 | 76.0 | 96.7 | 96.7 | 0.8764 | 0.8802 | +0.0038 [−0.0148, +0.0225] |
| French, Indonesian, Dutch, Italian, Portuguese, Spanish (300) | 62.0 | 62.0 | 90.0 | 87.7 | 0.7829 | 0.7791 | −0.0038 [−0.0207, +0.0127] |
| Polish, Turkish, Vietnamese, Arabic, Urdu, Hindi, Bengali, Thai, Chinese, Japanese, Korean (550) | 21.5 | 23.3 | 34.5 | 34.0 | 0.3061 | 0.3140 | +0.0080 [−0.0049, +0.0210] |
| All 20 languages (1,000) | 41.7 | 42.8 | 60.5 | 59.5 | 0.5347 | 0.5385 | +0.0038 [−0.0054, +0.0131] |
No group changes significantly. Each language has 50 questions, so one question moves its R@k by 2 points.
Per language
| Language | R@1 original | R@1 default | R@5 original | R@5 default | nDCG@10 original | nDCG@10 default |
|---|---|---|---|---|---|---|
| German | 70 | 76 | 96 | 96 | 0.852 | 0.874 |
| English | 72 | 72 | 100 | 98 | 0.870 | 0.872 |
| Russian | 84 | 80 | 94 | 96 | 0.907 | 0.895 |
| French | 76 | 78 | 94 | 90 | 0.856 | 0.859 |
| Indonesian | 62 | 58 | 92 | 88 | 0.774 | 0.744 |
| Dutch | 70 | 72 | 90 | 90 | 0.821 | 0.843 |
| Italian | 54 | 60 | 86 | 90 | 0.754 | 0.767 |
| Portuguese | 58 | 56 | 94 | 94 | 0.770 | 0.785 |
| Spanish | 52 | 48 | 84 | 74 | 0.723 | 0.675 |
| Polish | 56 | 54 | 78 | 76 | 0.693 | 0.680 |
| Turkish | 48 | 54 | 74 | 70 | 0.659 | 0.677 |
| Vietnamese | 26 | 36 | 58 | 52 | 0.440 | 0.475 |
| Arabic | 2 | 2 | 4 | 6 | 0.060 | 0.060 |
| Urdu | 10 | 12 | 18 | 18 | 0.154 | 0.171 |
| Hindi | 8 | 6 | 10 | 16 | 0.127 | 0.122 |
| Bengali | 6 | 4 | 8 | 10 | 0.091 | 0.094 |
| Thai | 8 | 10 | 20 | 16 | 0.157 | 0.185 |
| Chinese (Simplified) | 16 | 16 | 32 | 28 | 0.261 | 0.248 |
| Japanese | 32 | 36 | 38 | 38 | 0.370 | 0.376 |
| Korean | 24 | 26 | 40 | 44 | 0.356 | 0.367 |
With the default file, French, Portuguese, Dutch, Italian and Indonesian reach R@5 of 88 to 94% on this sample, and Polish, Turkish and Spanish 70 to 76%. Vietnamese, Chinese, Japanese and Korean reach 28 to 52%, and Arabic, Hindi, Bengali, Urdu and Thai 6 to 18%.
The ranks come from exact search in defuss-vectorsearch, the bruteforce strategy of its make bench. reproduce/belebele_tiny.py computes the same ranks: they are identical for all 1,000 questions of the default file. For the original file, every language's R@1 and R@5 equals the bench that defuss-vectorsearch 0.2.1 committed.
Historic results (original UINT4 file)
The tables below were published with the original UINT4 file and are not comparable with the results above. On the five tasks without mixed-language subsets they agree with the current run of the same file within 0.01, but elsewhere they differ widely: 13.417 against 97.852 on BibleNLPBitextMining, 43.517 against 89.305 on BelebeleRetrieval. MTEB's default language filter keeps every subset with at least one requested language, for example 1,656 BibleNLP pairs instead of 4, and eval/ used that filter until 2026-11-08.
Overall
| Variant | Backend | Mean | Δ vs base |
|---|---|---|---|
| Original Bekko a8m, 256k vocab | Torch | 61.887 | +0.000 |
| Winzling 64k FP32 | Torch | 55.609 | -6.277 |
| Winzling 64k UINT4 | ONNX | 54.979 | -6.907 |
The incremental loss from quantizing the already-trimmed FP32 model is only:
54.979 - 55.609 = -0.630 percentage points
Most of the overall quality delta therefore comes from vocabulary trimming, not UINT4 quantization.
By task type
| Task type | Original Bekko | 64k FP32 | 64k UINT4 |
|---|---|---|---|
| BitextMining | 19.181 | 13.768 (-5.412) | 13.417 (-5.764) |
| Classification | 64.857 | 64.221 (-0.636) | 64.011 (-0.846) |
| Clustering | 33.107 | 34.091 (+0.984) | 32.481 (-0.626) |
| PairClassification | 93.748 | 93.670 (-0.078) | 93.666 (-0.083) |
| Reranking | 87.515 | 87.579 (+0.064) | 87.211 (-0.304) |
| Retrieval | 58.995 | 44.844 (-14.151) | 44.051 (-14.944) |
| STS | 68.808 | 54.429 (-14.379) | 53.448 (-15.359) |
Per task
| Type | Task | Original Bekko | 64k FP32 | 64k UINT4 |
|---|---|---|---|---|
| BitextMining | BibleNLPBitextMining |
19.181 | 13.768 (-5.412) | 13.417 (-5.764) |
| Classification | AmazonCounterfactualClassification |
68.493 | 68.105 (-0.388) | 67.909 (-0.584) |
| Classification | MassiveIntentClassification |
61.220 | 60.336 (-0.884) | 60.112 (-1.108) |
| Clustering | SIB200ClusteringS2S |
33.107 | 34.091 (+0.984) | 32.481 (-0.626) |
| PairClassification | OpusparcusPC |
93.748 | 93.670 (-0.078) | 93.666 (-0.083) |
| Reranking | WikipediaRerankingMultilingual |
87.515 | 87.579 (+0.064) | 87.211 (-0.304) |
| Retrieval | BelebeleRetrieval |
71.345 | 44.160 (-27.185) | 43.517 (-27.828) |
| Retrieval | MIRACLRetrievalHardNegatives |
46.644 | 45.528 (-1.117) | 44.585 (-2.060) |
| STS | STS17 |
73.464 | 53.570 (-19.894) | 52.665 (-20.799) |
| STS | STS22.v2 |
64.151 | 55.287 (-8.864) | 54.232 (-9.919) |
Interpreting the historic results
Under MTEB's default filter, 1,652 of the 1,656 BibleNLPBitextMining pairs and 238 of the 245 BelebeleRetrieval pairs include a language outside German, English and Russian, which the 64k vocabulary does not support by design.
The degradation is highly structured rather than uniform.
Tasks that remain close to the original Bekko model in this suite include:
- classification;
- pair classification;
- reranking;
- MIRACL hard-negative retrieval.
The largest losses appear in:
- cross-lingual / semantic textual similarity;
BelebeleRetrieval;- bitext mining.
This indicates that aggressive vocabulary specialization affects fine-grained multilingual semantic geometry much more than it affects every downstream capability equally.
The result should therefore not be interpreted as "a 64k vocabulary is lossless." It is not.
It should instead be interpreted as:
A large fraction of Bekko's model storage can be removed for a restricted language set while preserving surprisingly strong performance on several task families, but fine cross-lingual semantic alignment is materially degraded.
For applications dominated by STS, bitext mining or cross-lingual semantic retrieval, the original Bekko model or a larger-vocabulary trim is preferable.
For constrained-language classification, reranking, pair classification, downstream fine-tuning and edge deployment, this model occupies a substantially different size/quality point.
Upstream Bekko results
The upstream hotchpotch/bekko-embedding-v1-a8m model reports:
- 7.67M active parameters
- 105.98M total parameters
- 56.2 on official MMTEB Multilingual v2 retrieval
- 56.7 Mean(Task) over the official 131-task MMTEB Multilingual v2 suite
- approximately 124 MiB for its compact ONNX artifact
Those upstream scores use a different benchmark aggregate from the fixed de/en/ru suite above and must not be compared numerically as though they were the same benchmark.
Intended uses
Good candidate for:
- German/English/Russian semantic embeddings under tight storage constraints;
- edge and desktop applications;
- local semantic indexing;
- constrained-language retrieval where application-specific evaluation passes;
- reranking;
- pair classification;
- document/text classification;
- clustering after application-specific validation;
- feature extraction for small downstream heads;
- SetFit-style classification;
- language identification after training a dedicated classifier head;
- further fine-tuning from the trimmed FP32 checkpoint.
For downstream training, prefer the trimmed FP32 checkpoint and export/quantize only after fine-tuning.
Not intended for
This release should not be treated as:
- a drop-in replacement for the full multilingual Bekko model;
- a 100+ language embedding model;
- a state-of-the-art STS model;
- a lossless vocabulary-pruned checkpoint;
- a model with an official full-MMTEB score; its MTEB numbers come from the limited 10-task MTEB subset, German, English and Russian only;
- a guarantee of quality for languages other than German, English and Russian;
- a guarantee that UINT4 is faster than FP32 or INT8 on every runtime/hardware combination.
Compression ratio and inference speed are separate properties. MatMulNBits performance depends strongly on the ONNX Runtime execution provider and target CPU/GPU.
Fine-tuning
The FP32 trimmed checkpoint can be used as a normal Sentence Transformers backbone.
For classification-style tasks, a lightweight head can often be sufficient:
384-dimensional normalized embedding
↓
linear classifier
↓
task labels
For example, a three-language language-identification head requires only:
384 × 3 + 3 = 1,155 parameters
The quantized ONNX graph should generally be treated as a deployment artifact rather than the checkpoint from which to continue gradient-based training.
Matryoshka dimensions
The upstream Bekko model is trained to support truncated embedding dimensions:
- 384
- 256
- 128
- 64
This capability is inherited structurally because the transformer weights are preserved.
However, the lower dimensions have not been separately benchmarked for this vocabulary-trimmed release. Treat them as available but unvalidated until application-specific evaluation is performed.
Long-context behavior
The upstream encoder supports sequences up to 8,192 tokens.
That context limit remains in the model configuration, but vocabulary trimming changes tokenization density. The same source document may require more tokens after trimming.
Consequently:
- an 8,192-token model limit does not imply unchanged character/document capacity;
- long documents should be measured with the trimmed tokenizer;
trim-report.jsonshould be consulted for tokenization expansion statistics;- truncation-sensitive applications should benchmark their actual corpus.
Reproducing the transformation
The trimmer that built this release is in embedding-model-trimmer/. Its recipe trims Bekko a8m to German, English and Russian with 65,536 tokens and exports the UINT4 graph:
make -C embedding-model-trimmer trim-uint4
It writes output/bekko-embedding-v1-a8m-de-en-ru-v65536. Every input is public, so it needs no Hugging Face token, and embedding-model-trimmer/uv.lock pins the dependencies as of the original run (torch 2.14.0, transformers 5.17.0, onnxruntime 1.30.0).
VERIFIED (2026-11-09, Apple M5 Max): the recipe reproduces tokenizer.json, tokenizer_config.json, config.json, model.safetensors, special_tokens_map.json, trim-report.json and the Sentence Transformers configuration files of the first upload byte for byte, and trim-manifest.json differs only in created_at. Its UINT4 graph matches onnx/model_uint4_original.onnx in size, block scales, zero points, INT8 token table and nodes, but orders the nodes differently and differs in 1,546 of 7,667,712 4-bit codes (0.02%).
The trimmer's export is the original UINT4 file, now onnx/model_uint4_original.onnx: 30.46 MB, and 27.64 MB with zstd -19.
The default onnx/model_uint4.onnx has the same size uncompressed, 28.08 MB with zstd -19 and 27.94 MB with Brotli level 11. bash reproduce/run.sh rebuilds it from the original file; see reproduce/README.md. Its distribution artifacts come from the repository root:
zstd -19 -k onnx/model_uint4.onnx
brotli -q 11 -w 24 -k {onnx/model_uint4.onnx,tokenizer.json,tokenizer_config.json}
Reproducibility and provenance
For scientific or production use, pin and retain:
- base model revision;
- tokenizer revision;
- target language list;
- target vocabulary size;
- token-frequency corpus revisions;
- mapping from old to new token IDs;
- trimming manifest;
- trimming coverage report;
- ONNX Runtime version;
- INT4 block size and quantization mode;
- benchmark task revisions;
- model artifact checksum.
Do not identify a model only by a8m-64k: two 64k trims produced from different corpora or revisions can have different token vocabularies and therefore different behavior.
Files
A complete release should contain the normal Sentence Transformers / Transformers model files plus the transformation artifacts, including:
config.json
config_sentence_transformers.json
modules.json
sentence_bert_config.json
tokenizer.json
tokenizer.json.zst Zstandard, level not recorded
tokenizer.json.br Brotli level 11
tokenizer_config.json
tokenizer_config.json.br Brotli level 11
special_tokens_map.json
model.safetensors
1_Pooling/
onnx/
model_uint4.onnx the default: GPTQ codes, teacher-distilled block scales
model_uint4.onnx.zst the default, Zstandard level 19
model_uint4.onnx.br the default, Brotli level 11
model_uint4.json provenance of the default
model_uint4_gptq.onnx GPTQ codes, block scales fitted to FP32
model_uint4_gptq.json its provenance
model_uint4_original.onnx the originally published round-to-nearest export
model_uint4_legacy.onnx the previous default of this repository, an earlier edit
reproduce/ scripts that rebuild and evaluate the UINT4 files
embedding-model-trimmer/ the vocabulary trimmer and UINT4 exporter that built the original file
eval/ the evaluation package
trim-manifest.json
trim-report.json
README.md
model.safetensors is the trimmed trainable checkpoint, stored as bfloat16.
onnx/model_uint4.onnx is the recommended compact runtime artifact.
The .br files are the smallest distribution artifacts: the graph's is 0.5% smaller than onnx/model_uint4.onnx.zst, and tokenizer.json.br is 9.6% smaller than tokenizer.json.zst. All of them must be decompressed before inference: the .zst files by a tool, the .br files by a tool or by a browser that receives them as Content-Encoding: br.
Limitations
Language restriction
Only German, English and Russian are supported by this release.
Semantic-geometry degradation
Vocabulary trimming caused substantial losses on some STS, bitext and retrieval tasks in the historic benchmark, whose subsets include language pairs outside German, English and Russian. Its cost on the German, English and Russian subsets alone has not been measured, and it should not be hidden behind the strong overall size reduction.
Quantization
UINT4 moves embeddings away from FP32: on held-out text the default file's mean cosine to FP32 is 0.985, the worst 0.967. Teacher distillation recovers retrieval quality on average, and the default scores above FP32 on the 23 Nano tasks, but not everywhere: on NanoMIRACL it scores 0.7203, against 0.7325 for FP32 and 0.7279 for the original UINT4 file.
Distillation scope
The teacher taught only German and English retrieval. Russian was anchored to the untouched model's own scores, and classification, clustering and STS were protected only by the cosine loss on generic text.
Backend performance
The smallest model is not automatically the fastest model.
Generic ONNX Runtime MatMulNBits execution can have very different performance characteristics across CPU and GPU providers. Benchmark the exact deployment environment.
Embeddings are not anonymization
Dense embeddings can retain information about their source text. Do not treat embedding generation as a privacy or anonymization mechanism.
License
This derivative is released under the MIT License, following the upstream hotchpotch/bekko-embedding-v1-a8m release.
The original Bekko architecture, pretrained/embedding-trained weights and research are the work of the Bekko authors. Winzling applies language-selective vocabulary surgery and deployment quantization to that model.
The block scales of the default UINT4 file were distilled from VAGOsolutions/SauerkrautLM-MoEdernColBERT-115M (Apache-2.0) on training data from GermanDPR and GermanQuAD (deepset, CC BY 4.0), Natural Questions (Google, CC BY-SA 3.0; the sentence-transformers/natural-questions copy declares no license of its own) and MIRACL (Apache-2.0), with calibration text from FineWeb and FineWeb-2 (Hugging Face, ODC-By 1.0).
Citation
If you use this model, please cite the upstream Bekko work:
@misc{tateno2026bekko,
title = {Bekko Embedding: Parameter-Efficient Multilingual Retrieval with Ultra-Compact Encoders},
author = {Yuichi Tateno},
year = {2026},
eprint = {2607.25180},
archivePrefix= {arXiv},
primaryClass = {cs.CL}
}
When reporting results from this derivative, please also state the exact variant:
Winzling-Embed-a8m-64k
languages: de,en,ru
vocab: 65,536
ONNX: asymmetric UINT4 MatMulNBits / block size 32
default ONNX: GPTQ codes, teacher-distilled block scales (sha256 b07e0e6f…)
token embeddings: row-wise INT8
and distinguish its fixed de/en/ru compact MTEB regression score from official full-MMTEB scores.
Acknowledgements
Winzling-Embed-a8m-64k exists because Bekko's architecture has an unusual and useful property for aggressive specialization: most of its total parameters live in the multilingual token embedding table, while the active encoder is only ~7.67M parameters.
That makes it possible to remove a large fraction of storage for a restricted language set without pruning transformer depth or width.
Thanks to Yuichi Tateno, Sentence Transformers, Hugging Face, MTEB and ONNX Runtime projects for the underlying models, tooling and evaluation infrastructure.
- Downloads last month
- 114
Model tree for kyr0/Winzling-Embed-a8m-64k
Base model
jhu-clsp/mmBERT-small