-
Notifications
You must be signed in to change notification settings - Fork 92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add HNSW vector storage #18
Add HNSW vector storage #18
Conversation
…ctor storage, and a simple GraphRAG example
Great Work and thank you! |
No access to Windows on my part, but it should work: Can confirm this works on M3 Mac and worked on Ubuntu 20.04. **Why don't we use docker containerization with |
…tter speed/recall tradeoffs
Cool! Few responses:
|
Sounds good!
*** I'm done with commits for this PR, let me know what you think 👍 |
Cool, I have only one review about this PR and maybe you can look at it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
nano_graphrag/graphrag.py
Outdated
@@ -151,6 +152,7 @@ def __post_init__(self): | |||
global_config=asdict(self), | |||
embedding_func=self.embedding_func, | |||
meta_fields={"entity_name"}, | |||
**self.vector_db_storage_cls_kwargs, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why unpack vector_db_storage_cls_kwargs
here?
You get this dict from global_config
in HNSWStorage
.
Unpack vector_db_storage_cls_kwargs
here maybe break other vector storage's initialization.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's fixed by 20219d0
Description
TLDR; fast querying with slow insertion, using
hnswlib
faster than the HNSW fromfaiss
implementation.Updates
HNSWVectorDBStorage
.NanoVectorDBStorage
.examples
withGraphRAG
(Easily triggering rate limit but unrelated to this PR).Benchmark results