no_grad indicates pytorch you are not interested in saving gradients and computational graph as you are not gonna backpropagate. If you don’t call it, pytorch keeps saving computational graph assuming your model consist in calling those many times itself and keep using more and more memory.
Model.eval just turns off dropout and fixes statistics of batch normalization. You can do a fast check in the forum, both things are widely commented.