After setting n_inputs=2560, the code runs fine on the CPU and the GPU and I get an output of shape [16, 4, 2560].
Could you check, if you are passing a ByteTensor as your input to the model?
Make sure it’s a FloatTensor (or call .float() on it before passing to the model).