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.2.0.tar.gz (4.4 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.2.0.tar.gz.

File metadata

File hashes

Hashes for llama_index_vector_stores_hnswlib-0.2.0.tar.gz
Algorithm Hash digest
SHA256 d5a4e583419e4a87c28482c668286ce25c19b7541aebce5aa1852e9534249d82
MD5 be1d9f4d1bcbdd7b47a026662a4b22df
BLAKE2b-256 997e1a533b3383ad35afeaf330add3697a183d83b0e53e2721b7a24d41eea661

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for llama_index_vector_stores_hnswlib-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 44495fddec84f74cec8b4c5695c431368fdc9487a9713d655ca64015c5c4c33e
MD5 732297bd20c96830505869ec25488404
BLAKE2b-256 9cd8c5ffbb0b061810ee4acf8237895a25c5bc2b78f4b194f7d9162afaece5cd

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