Skip to content

Releases: yuvrajangadsingh/vemb

v0.3.0: binary cache

20 Apr 07:48
735c7fc

Choose a tag to compare

What's new

Replace the per-key JSON cache with a binary numpy matrix + tiny JSON manifest. Vectors are pre-normalized on write so cosine reduces to a dot product at query time.

End-to-end benchmarks

At 3072-dim (Gemini Embedding 2), warm cache, best of 3 runs on Apple Silicon:

N v0.2.0 (JSON + Python loop) v0.3.0 (.npy + BLAS) Speedup
200 1.62s 1.48s tied
1000 2.34s 1.51s 1.5x
5000 4.31s 1.64s 2.6x

Cache size (N=5000, 3072-dim)

  • v0.2.0: 317 MB cache.json
  • v0.3.0: 61 MB vectors.npy + 229 KB manifest.json (5x smaller)

Other

  • Cosine stays exact, no ANN, no approximation
  • numpy is lazy-imported so vemb --version, vemb text, vemb embed etc stay fast
  • Legacy .vemb/cache.json is auto-migrated on first load, no user action needed

Install

pip install -U vemb

Full diff: v0.2.0...v0.3.0

v0.2.0

19 Mar 10:47

Choose a tag to compare

  • stdin piping: echo "text" | vemb text -
  • batch embed: vemb embed *.jpg --jsonl
  • fixed cache key collisions across subdirectories
  • SDK error handling (clean messages instead of tracebacks)
  • input validation for --dim and --top
  • proper file/directory path constraints

https://pypi.org/project/vemb/0.2.0/

v0.1.0

19 Mar 10:00

Choose a tag to compare

Initial release.

pipx install vemb
  • Embed text, images, audio, video, PDFs from the command line
  • Cosine similarity between any two files
  • Search a directory with caching
  • Powered by Gemini Embedding 2

https://pypi.org/project/vemb/0.1.0/