post-cortex-embeddings
Embedding engines + HNSW vector database for post-cortex.
Self-contained ML stack — anyone needing a Candle-backed BERT embedder or an HNSW index for nearest-neighbour search can depend on this crate without pulling the post-cortex daemon or orchestrator. Implements [EmbeddingBackend] (BERT via Candle, static-hash fallback) and ships [VectorDB] (HNSW with optional product quantisation).
Install
[]
= "0.2" # full BERT + HNSW (default)
# or, if you only need the data types (VectorMetadata, SearchMatch, ...):
= { = "0.2", = false }
Features
| Feature | Default | What it enables |
|---|---|---|
bert |
yes | Candle + Tokenizers + hf-hub for the BERT backend |
otel |
no | OpenTelemetry instrumentation hooks |
When bert is off the crate compiles only vector_db::types — useful for storage backends that need VectorMetadata round-tripping without pulling the ML stack.
Example
use ;
use Arc;
# async
License
MIT — see LICENSE.