Skip to content

EmbeddingRetriever - Load model from memory #4154

Discussion options

You must be logged in to vote

Hi @wilsonlimaneto

The best pattern I could recommend based on my self-experience is to load any node that, in the background, loads any transformer models to be held in memory some way. You may choose to use Ray, or a global object, or any solution that meets your needs.

You should be aware that transformers are not thread-safe, you will need to handle them or use some sort of multiprocessing pool.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@wilsonlimaneto
Comment options

Answer selected by wilsonlimaneto
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants