Did you fix the problem in the end? BTW, I try to change your code with cuda. But I am not able to reproduce the invalid next size error or the segmentation fault. The code in the repo seems fine to me except with unstable training, which makes senses. I guess @smth have fixed the stability issue. But current whl on pytorch.org 3 does not have this fix, isn’t it @smth?