With independent batches, you shouldn’t carry hidden state from one batch to the next by calling detach.  That wouldn’t make sense – each batch element would have a different hidden state corresponding to what was appropriate to the end of the last corresponding sequence, but that sequence has no relation to the current one.  On the other hand, if the batches are successive parts of a long sequence and you are doing truncated BPTT then you should call detach.
You may find that it helps somewhat to learn the initial hidden state.