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

@jigyasudham/veto-model

v1.0.1

Published

Static embedding table for Veto's semantic transcript search — potion-base-8M (Minish Lab, MIT) repacked to int8.

Readme

@jigyasudham/veto-model

Static embedding table for Veto's semantic transcript search. It is data, not code — a quantized matrix, a tokenizer, and a header describing how to use them.

Provenance

This package repacks the weights of potion-base-8M (https://huggingface.co/minishlab/potion-base-8M) by Minish Lab (MIT), distilled from baai/bge-base-en-v1.5, converted to int8. Inference code is original to Veto.

The upstream revision is pinned by full commit hash — bf8b056651a2c21b8d2565580b8569da283cab23 — and recorded in model/model.json along with a sha256 for every shipped file. Upstream's license travels with the weights in LICENSE.potion-base-8M.

No upstream trademark is used in this package's name. "potion" and "model2vec" appear only as attribution.

Why this exists

Veto's semantic search runs locally and offline: no API key, no per-query cost, no text leaving the machine. That is what it buys: 7.0 MB over the wire, 8.5 MB unpacked on disk. Shipping the table as a pinned npm dependency (rather than downloading it at runtime) means npm's immutability guarantees the bytes can never change under a published version, and npm's content-addressed cache moves them across the network once per machine.

Contents

| File | Bytes | What it is | |---|---|---| | model/embeddings.int8.bin | 7,559,168 | Row-major int8 matrix, 29,528 × 256 | | model/scales.f32.bin | 118,112 | One LE float32 scale per row | | model/tokenizer.json | 683,666 | Verbatim from the pinned revision | | model/model.json | ~1.6 K | Dims, revision, contract, sha256s | | model/golden.json | ~86 K | Fixed sentences + expected vectors |

Usage

The entry point resolves paths and reads nothing:

import { paths } from '@jigyasudham/veto-model';
// paths.embeddings, paths.scales, paths.tokenizer, paths.header, paths.golden

I/O is the caller's choice deliberately. Veto resolves this package lazily at the first semantic query and never at server boot, so a corrupted copy degrades search to BM25 instead of taking the process down.

The inference contract

model/model.json records what a consumer must do, because getting any of it wrong produces plausible-looking but wrong vectors:

  • Dequantize per row: row_f32 = int8_row * scale[row].
  • Tokenize with add_special_tokens: false. WordPiece, BertNormalizer, BertPreTokenizer.
  • strip_accents is null, which does not mean "off" — it follows lowercase, which is true. Accents are stripped: café and cafe both tokenize to id 6674. A consumer that reads the null literally will diverge silently on accented text.
  • Mean-pool the gathered rows, then L2-normalize with epsilon 1e-32.
  • Empty input (no tokens) yields a zero vector of length dim.
  • No per-token weights. model2vec supports an optional per-token weight vector applied before pooling; potion-base-8M does not ship one, and the repack asserts this. A different model might, and mean-pooling it without the weights would be wrong.

model/golden.json pins all of the above: each entry carries the input text, its token ids, and the vector a correct implementation produces from the shipped int8 payload. It also records that payload's cosine drift against the original float32 weights (max 6.13e-05), so quantization error stays separable from implementation error.

Rebuilding

The repack pipeline is tracked in the Veto repository at scripts/repack-model.py. It downloads the pinned revision, asserts the inference assumptions above still hold, quantizes, and regenerates the payload and golden vectors.

License

This package: MIT, see LICENSE. Upstream weights and tokenizer: MIT, see LICENSE.potion-base-8M.