Besides the model parameters and buffers, the model execution will also use memory to store intermediate forward activations needed to compute the gradients. You could use e.g. this until. to estimate the memory usage.
If you don’t want to compute the gradients at all, you should wrap the forward pass into a torch.no_grad() context, if that’s not already done.