Thank you for pointing out that indeed I don’t need gradients, as the model is put into evaluation mode straight away.
About your solution, is it possible to use it without having to code additional scripts that get called via command line? I’m asking because that would require some coding on my part to generate the called script, and then merga again the CPU-processed sequences into the main dataset.