counterparts-model-potion
v0.1.0
Published
The potion-base-8M static embedding table (MinishLab, MIT) packaged for counterparts' keyless semantic recall. Data only: no code, no scripts.
Maintainers
Readme
counterparts-model-potion
The potion-base-8M static embedding table, packaged so counterparts can give its memory a semantic channel without an API key and without the network.
It is data only: two model files, this README, a license. No code, no install scripts, no dependencies.
What is in it
| file | what | sha256 |
|---|---|---|
| model.safetensors | one tensor, embeddings, F32, shape [29528, 256] (30,236,760 bytes) | f65d0f325faadc1e121c319e2faa41170d3fa07d8c89abd48ca5358d9a223de2 |
| vocab.txt | the WordPiece vocabulary, one token per line, line number = row (29,528 lines) | 1394523a67ddd404a825428018c0582a6998bcfa044ecbcbf1f4d71adb94c61c |
Both files are copied byte-for-byte from
https://huggingface.co/minishlab/potion-base-8M at revision
bf8b056651a2c21b8d2565580b8569da283cab23 (last modified upstream 2026-03-27).
The sha256 of model.safetensors is the one Hugging Face's LFS pointer states
for that revision. Check them yourself:
shasum -a 256 model.safetensors vocab.txtpotion-base-8M is by MinishLab, MIT
licensed: a Model2Vec model distilled from BAAI/bge-base-en-v1.5 and trained
with Tokenlearn. See LICENSE for the full attribution.
How counterparts finds it
counterparts' static embedder (src/core/embed/static.ts) looks for a weights
directory in this order:
- an explicit directory passed by the caller;
- the
COUNTERPARTS_STATIC_WEIGHTS_DIRenvironment variable; - this package, resolved from counterparts' own location
(
require.resolve("counterparts-model-potion/package.json")), which is how an ordinarynpm install counterpartsfinds it once counterparts lists it as a dependency.
The identity comes from the bytes, not from this package. At every load
counterparts computes the sha256 of both files; if this package.json declares
them (counterparts.sha256) they must match, or the table is refused by name
(HASH_MISMATCH). The pair of hashes is what names the table in a store's tag
(potion-base-8M@256, from counterparts' own list of known tables) — so the same
two files give the same identity however they are found, and a changed table can
never pass for this one. counterparts.model is a display label only.
How a text becomes a vector
The HF BERT basic tokenizer (clean, CJK padding, accent strip, lowercase, split
on whitespace and punctuation), greedy WordPiece with ## continuations, drop
[UNK], look up each id's row, take the mean, L2-normalize. 256 numbers, about
0.03 ms per text on an Apple M3 Pro, matching model2vec's own encode().
