0

I have a python script running an infinite loop, calling gpt2.generate, running on CPU (not GPU).

After the model is loaded and the first spike of memory usage is over, the RAM consumption keep increasing by about 100Mo every minute.

There is nothing in the loop storing anything, no typical python memory leak trap, python memory profiler is not showing a specific culprit.

So I was wondering if it was not in the C code.

Searching the web, I notice you can't limit memory consumption on CPU, only on GPU, with tensorflow.

Any other clue of what could cause this?

Bite code
  • 578,959
  • 113
  • 301
  • 329

0 Answers0