Skip to main content

llama-index vector_stores hnswlib integration

Project description

LlamaIndex Vector_Stores Integration: Hnswlib

A LlamaIndex vector store using Hnswlib, a header-only C++ HNSW implementation with python bindings.

Usage

Pre-requisite:

pip install llama-index-vector-stores-hnswlib
pip install hnswlib

A minimal example:

import hnswlib
from llama_index.vector_stores_hnswlib import HnswlibVectorStore

space = "ip"  # distance function
dim = 768  # embedding dimension
hnswlib_index = hnswlib.Index(space, dim)
hnswlib_index.init_index(max_elements=10)

hnsw_vector_store = HnswlibVectorStore(hnswlib_index=index)

More examples and references

A detailed usage guede can be found in this demo notebook in the LlamaIndex docs.

Hnswlib documentation and implementation can be found here.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

llama_index_vector_stores_hnswlib-0.4.1.tar.gz (5.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file llama_index_vector_stores_hnswlib-0.4.1.tar.gz.

File metadata

File hashes

Hashes for llama_index_vector_stores_hnswlib-0.4.1.tar.gz
Algorithm Hash digest
SHA256 ece1ca38badfdfa776206ab2bdb064071ea5e9dd2874909e4d0e79e9dc5240ff
MD5 8e21eec96d12637c44b62c52bb43d23e
BLAKE2b-256 b0f7811b6e2f26392639e8f220088128abe5f42a011ce5ae7ba586fae5e5eb7b

See more details on using hashes here.

File details

Details for the file llama_index_vector_stores_hnswlib-0.4.1-py3-none-any.whl.

File metadata

File hashes

Hashes for llama_index_vector_stores_hnswlib-0.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 fd727ab504dd9eb9ebe673c686733a342c7de7e2668d059dadbf92adcb4bc678
MD5 be810bbfc49db821130df90c96fac39b
BLAKE2b-256 ee0c794c4ae27a1bb37b8e89b7b92500874963e7eea206ad9518fce89e15fe83

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page