Basics ยท Inside Compact Matryoshka & Quantized Embeddings

Matryoshka Truncation & 1-Bit Binary Compression Lab

Mixedbread's mxbai-embed-xsmall-v1 supports Matryoshka Representation Learning (MRL) (384d โ†’ 256d โ†’ 128d โ†’ 64d) and vector quantization (int8 4ร— and 1-bit binary Hamming 32ร—). Measure live MRR, Spearman rank correlation ฯ, cosine retention, and separation margin in one worker forward pass.

1. Configure evaluation corpus

2. Compression retention & storage trade-off

Pos/Neg margin by representation

Live compression benchmark

Live MRL truncation, scalar int8, and 1-bit binary quantization metrics
Format Bytes/vec Ratio MRR Margin Cos ret. Rank ฯ
Run the probe above to measure live MRL and binary compression.

Per-sentence L2 norm, WordPiece token count & binary bit agreement

Token count, L2 norm, float32 cosine, and 1-bit binary Hamming match per sentence
Sentence Tokens L2 norm 384-d cos 64-d MRL cos 1-bit bit match
Waiting for live forward passโ€ฆ

Show the code

Show the code: Matryoshka truncation + L2 renormalization (xsmall-core.mjs)
Show the code: MRL + int8 + 1-bit binary curve & MRR evaluation (xsmall-core.mjs)