Releases: yuvrajangadsingh/vemb
Releases · yuvrajangadsingh/vemb
v0.3.0: binary cache
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 KBmanifest.json(5x smaller)
Other
- Cosine stays exact, no ANN, no approximation
- numpy is lazy-imported so
vemb --version,vemb text,vemb embedetc stay fast - Legacy
.vemb/cache.jsonis auto-migrated on first load, no user action needed
Install
pip install -U vembFull diff: v0.2.0...v0.3.0
v0.2.0
- 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
v0.1.0
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