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

made various changes to cleanup retrieval #362

Merged
merged 6 commits into from
Apr 18, 2024

Conversation

epinzur
Copy link
Collaborator

@epinzur epinzur commented Apr 3, 2024

made a bunch of changes that generally make sure our ColBERT retrieval code interacts nicely with Cassandra (doesn't overload the database when making queries).

There is little change in retrieval latency with these changes running on CPU.

  • wrapped async calls to cassandra inside a ThreadPoolExecutor.

    • We should experiment to see what value of max_casandra_workers works the best.
  • automatically dropping down to half-precision when calculating chunk scores, if running on GPU and the GPU supports it.

    • We should test to see if is_fp16 flag is getting set to True on boxes with CUDA support.
    • I "think" that half-precision won't hurt our results, and chatGPT claims this can "significantly speed up our calculations & reduce memory usage on the GPU".

@epinzur epinzur changed the title made various changes to improve retrieval performance DRAFT: made various changes to improve retrieval performance Apr 3, 2024
Copy link
Contributor

@nicoloboschi nicoloboschi left a comment

Choose a reason for hiding this comment

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

LGTM in general

I think we should improve the error handling

ragstack/colbert/cassandra_retriever.py Outdated Show resolved Hide resolved
ragstack/colbert/cassandra_retriever.py Outdated Show resolved Hide resolved
ragstack/colbert/cassandra_retriever.py Show resolved Hide resolved
ragstack/colbert/cassandra_retriever.py Outdated Show resolved Hide resolved
@epinzur epinzur force-pushed the colbert-retriever-improvements branch from 7342320 to 83e5f29 Compare April 16, 2024 20:29
@epinzur epinzur changed the title DRAFT: made various changes to improve retrieval performance made various changes to improve retrieval performance Apr 16, 2024
@epinzur epinzur changed the title made various changes to improve retrieval performance made various changes to cleanup retrieval Apr 16, 2024
@epinzur epinzur force-pushed the colbert-retriever-improvements branch from 6f8d18d to d632492 Compare April 18, 2024 21:42
@epinzur epinzur force-pushed the colbert-retriever-improvements branch from e8e8534 to 4ea9f8c Compare April 18, 2024 21:48
@epinzur epinzur merged commit f1ce23e into main Apr 18, 2024
13 checks passed
@epinzur epinzur deleted the colbert-retriever-improvements branch April 18, 2024 22:02
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.

2 participants