
valentinus
A thread-safe vector database for model inference inside LMDB.
dependencies
- bincode/serde - serialize/deserialize
- lmdb-rs - database bindings
- ndarray - numpy equivalent
- ort/onnx - embeddings
getting started
&&
optional environment variables
| var | usage | default |
|---|---|---|
LMDB_USER |
working directory of the user for database | $USER |
LMDB_MAP_SIZE |
Sets max environment size, i.e. size in memory/disk of all data | 20% of available memory |
ONNX_PARALLEL_THREADS |
parallel execution mode for this session | 1 |
VALENTINUS_CUSTOM_DIM |
embeddings dimensions for custom models | all-mini-lm-6 -> 384 |
VALENTINUS_LMDB_ENV |
environment for the database (i.e. test, prod) | test |
tests
- Note: all tests currently require the
all-MiniLM-L6-v2_onnxdirectory - Get the model.onnx and tokenizer.json from huggingface or build them
&&
cargo test
examples
see examples