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

cache text embedding in inference #152

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

RalphHan
Copy link

@GuyTevet I've done a little bit change to the code to cache text embedding in inference

@GuyTevet
Copy link
Owner

Thanks! While this should not affect training mode, for readability purposes, I would also wrap this with if not self.training and add a comment that explains this mechanism.
https://discuss.pytorch.org/t/check-if-model-is-eval-or-train/9395

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.

None yet

2 participants