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

Models not set to eval mode #17

Open
bemi127 opened this issue Jan 15, 2024 · 3 comments
Open

Models not set to eval mode #17

bemi127 opened this issue Jan 15, 2024 · 3 comments

Comments

@bemi127
Copy link

bemi127 commented Jan 15, 2024

Why are the models not set to eval() mode before running inference? If my understanding is correct, this means that dropout, etc. will be applied when perturbations are being generated and log likelihood is estimated.

@joegenius98
Copy link

joegenius98 commented Feb 4, 2024

I'm no expert, but I believe because none of the models are actually trained in DetectGPT's experiments, there is not necessarily a need to put them in eval mode.

But I agree it is still good practice to do .eval() explicitly even when you're just loading pre trained weights

@bemi127
Copy link
Author

bemi127 commented Feb 4, 2024

It is correct that the base models are not explicitly retrained or finetuned. However the perplexities in eval mode will be more accurate due to each attention layer having full context and not being influenced by dropout.

@joegenius98
Copy link

Good thing is that we can try it out and see what happens

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

No branches or pull requests

2 participants