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

Adding a FastAPI server #60

Merged
merged 7 commits into from
Oct 2, 2024
Merged

Adding a FastAPI server #60

merged 7 commits into from
Oct 2, 2024

Conversation

NohTow
Copy link
Collaborator

@NohTow NohTow commented Oct 1, 2024

This PR adds code to serve the embeddings of a ColBERT model using FastAPI, leveraging batched to create dynamic batches.

See the README for details about how it works

pylate/server/server.py Show resolved Hide resolved
pylate/server/server.py Show resolved Hide resolved
pylate/server/server.py Show resolved Hide resolved
pylate/server/server.py Show resolved Hide resolved
@raphaelsty
Copy link
Collaborator

LGTM some details related to formatting, the loading is more serious as we should find a way to load the model only once 😀

@raphaelsty raphaelsty added the enhancement New feature or request label Oct 1, 2024
@NohTow
Copy link
Collaborator Author

NohTow commented Oct 2, 2024

Merging as the only remaining factor was the model being loaded multiple time while it is not the case.

@NohTow NohTow merged commit 3f71cfc into main Oct 2, 2024
2 checks passed
@NohTow NohTow deleted the server branch October 13, 2024 18:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants