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.5.0.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.5.0.tar.gz.

File metadata

  • Download URL: llama_index_vector_stores_hnswlib-0.5.0.tar.gz
  • Upload date:
  • Size: 5.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for llama_index_vector_stores_hnswlib-0.5.0.tar.gz
Algorithm Hash digest
SHA256 68fa2bca28dae145ea24fd80b5a5769c50dc3450fa5c0f43a8fb645f83132302
MD5 8ae7d1f9021af58a1499fc374ead4639
BLAKE2b-256 084210d7582356e6109f622c5b9cf8ec6e79a660f0a618527748e2afcbcf69fc

See more details on using hashes here.

File details

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

File metadata

  • Download URL: llama_index_vector_stores_hnswlib-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 5.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for llama_index_vector_stores_hnswlib-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6cfd89d0961a577e7738193749b4ded0ff7e425d6f29df239d77afe60255998c
MD5 14cacbeba0f0fb08b3cbc1a37c9d79f7
BLAKE2b-256 d747d5acedb1a2f907cf3d9ed75b8c995ddf051694c891c10b81c20dcdc78523

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