Skip to content

v0.6.0 — matrix-resident /search

Choose a tag to compare

@Cloto-dev Cloto-dev released this 09 Jul 14:37
3eed797

/search now runs one matmul over a per-namespace resident matrix instead of a per-item Python loop, with fully vectorized threshold + top-K selection: ~21x at 237k x 384 (131 ms → 6.1 ms/query, numpy/Accelerate; first query pays a one-time ~66 ms matrix build). Results are order-identical to the loop it replaces.

Changes

  • Matrix cache per namespace (grouped by dimension), invalidated by index/remove/purge, rebuilt lazily on first search
  • New EMBEDDING_SEARCH_BACKEND env: numpy (default) or mlx — Apple-GPU resident matrix converted once at cache-build time, numpy fallback when mlx is absent
  • New scripts/backfill_embedding_index.py: migrates an existing cpersona DB's embedding blobs into the index (no re-embedding, read-only source, --expect-dim guard) — required before flipping a deployment to CPERSONA_VECTOR_SEARCH_MODE=remote
  • Adds the test suite the repo lacked since extraction (12 tests) and GitHub Actions CI (ruff + pytest on 3.10/3.12)
  • PyPI publishing now via OIDC Trusted Publishing (publish.yml); ClotoHub connector manifest (cloto-connector.json, id cembedding)

Install

uvx --from "cembedding[onnx]" cembedding

Verified: 12/12 tests, CI green (3.10/3.12), PyPI 0.6.0 published via OIDC with attestations.

🤖 Generated with Claude Code