Views
No views yet
minishlab/potion-multilingual-128M,
plus precomputed tokenizer artifacts for low-memory loading.tokenize → look up rows → mean-pool: no context, no
forward pass. Loading it should not cost like a transformer, but in practice a
stock load decodes the whole weight matrix to f32 and inflates
tokenizer.json into an in-memory trie — together about 1 GB of RSS and
~930 ms before the first vector. That is fine for a long-lived server and
prohibitive for a short-lived CLI process.| stock load | these artifacts | |
|---|---|---|
| RSS | ~1056 MB | ~4.5 MB |
| first embedding | ~930 ms | ~1 ms |
| per embedding | ~0.03 ms | ~0.11 ms |
| file | what it is |
|---|---|
model.safetensors | the embedding matrix, I8, [500353, 256] |
vocab.fst | the Unigram vocab as an FST: token bytes → id |
vocab.fst.scores | f64 unigram log-probs, one per id, in id order |
vocab.fst.norm | the normalizer / pre-tokenizer spec and decoding metadata |
tokenizer.json | upstream's, unchanged — kept so the FST can be re-derived and verified |
config.json | upstream's, unchanged |
max|W| / 127). The scale is deliberately not
stored: mean-pooling is linear and model2vec L2-normalises its output, so a
single global factor cancels exactly. Rows can therefore be read straight from
disk as raw i8.model2vec-rs reading the f32 original,
over 100 133 text segments extracted from real PDF / DOCX / XLSX / EPUB / ODT /
ODS / ODP / PPTX files:[UNK] handling follows model2vec-rs exactly, including that it does not
drop [UNK] rows for a Unigram tokenizer (it looks for a string unk_token
field, which Unigram does not emit). If you consume these artifacts with your
own loader and drop [UNK] instead, you will get different vectors on
unk-heavy text.vocab.fst maps duplicate tokens to their last id, matching how
tokenizers builds its token_to_ids map.model.safetensors + tokenizer.json (including model2vec itself) works
with this repo unmodified — the i8 tensor is a standard safetensors dtype.