There is a problem with the Predict () function provided by the Trainer in Transformers

Uploading: eb0aaaecfb95547396cb6e8f877b141.png…
Uploading: 微信图片_20220826165848.png…

When I predicted the testing data set using the Trainer.predict () method, I found that the computer GPU video memory fluctuated, such as 1G-4G, 4G-1G, this repeated jump, and it will gradually change to 2G-5G.Finally, the memory explosion, and this problem will not occur when using the Predict function you wrote