Hi Marco,
It’ll be easier to say if you can post some code. As you can see, it’s pretty easy to accidentally leak memory by building a autograd graph that is larger than what you actually need; e.g., if you are not explicitly detaching your hidden state when you move on to the next sentence.