npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

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.

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.txt

potion-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:

  1. an explicit directory passed by the caller;
  2. the COUNTERPARTS_STATIC_WEIGHTS_DIR environment variable;
  3. this package, resolved from counterparts' own location (require.resolve("counterparts-model-potion/package.json")), which is how an ordinary npm install counterparts finds 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().