Skip to content
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 in gpu milvus #166

Merged
merged 2 commits into from
Oct 16, 2024
Merged

add in gpu milvus #166

merged 2 commits into from
Oct 16, 2024

Conversation

jperez999
Copy link
Collaborator

Description

This PR changes the milvus index to the GPU CAGRA index and it uses the parameters that created the best recall for a randomized index (it is possible to tweak this parameter to get better results but that is entirely based on the dataset) which is a good starting point. It also changes the method of identifying the GPUs used in docker-compose file to specify IDs instead of counts and leveraging the CUDA_VISIBLE_DEVICES env variable. I left the variable in place, but changed it to look for GPU ID 0, which is essentially a no op. If we like this new methodology we can remove that env var completely.

Checklist

  • I am familiar with the Contributing Guidelines.
  • New or existing tests cover these changes.
  • The documentation is up to date with these changes. <- Dont know what documentation I would want to change to describe these changes.

# # Turn on to leverage the `vdb_upload` task
# restart: always
# container_name: milvus-standalone
# image: milvusdb/milvus:v2.4.9-gpu
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the new version of milvus that we would need to use for GPU indexing to work.

# ports:
# - "19530:19530"
# - "9091:9091"
# deploy:
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added GPU access to the container for functionality support.

@@ -37,10 +37,11 @@ def build_default_milvus_config(embedding_size: int = 1024) -> typing.Dict[str,
"index_conf": {
"field_name": "vector",
"metric_type": "L2",
"index_type": "HNSW",
"index_type": "GPU_CAGRA",
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am thinking it is ok to expect GPU support by default, given that the milvus image is also GPU specific. Let me know if we need to be more malleable in this regard.

Copy link
Collaborator

@randerzander randerzander left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @jperez999 !

I'm eager to play w/ this in the context of forthcoming bulk indexing

Copy link
Collaborator

@jdye64 jdye64 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mpenn
Copy link
Collaborator

mpenn commented Oct 16, 2024

@jdye64 can you give this a review/merge?

@jdye64 jdye64 merged commit 733f40f into NVIDIA:main Oct 16, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants