Skip to content

cache text embedding in inference#152

Open
RalphHan wants to merge 1 commit intoGuyTevet:mainfrom
RalphHan:main
Open

cache text embedding in inference#152
RalphHan wants to merge 1 commit intoGuyTevet:mainfrom
RalphHan:main

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.

2 participants