A vector search tool powered by Qdrant and ONNX Runtime.
- Set up Qdrant server.
- Create a collection with appropriate vector size and distance metric. BGESmallZHV15 uses 512-dimensional vectors, BGELargeZHV15 uses 1024-dimensional vectors. Example for BGESmallZHV15:
curl -X PUT "http://localhost:6333/collections/cases" \
-H "Content-Type: application/json" \
-d '{
"vectors": {
"size": 512,
"distance": "Cosine"
}
}'- Configure
config.tomlwith your settings. - Run the application:
cargo build --releaseor with CUDA support so that it can use GPU :
- Download onnxruntime with CUDA support from ONNX Runtime releases
- Unzip the package and set the environment variable
ORT_DYLIB_PATHto point to thelibonnxruntime.sofile in the unzipped folder. - Build with the
cudafeature:cargo build --release -F cuda - Run with CUDA support:
ORT_DYLIB_PATH=/path/to/libonnxruntime.so target/release/vsearchDocumentation
Note: Ensure you could connect to the Hugging Face, you may need to set the HTTPS_PROXY and HTTP_PROXY environment variables.