pad_sequence takes as input a list of tensors. However, you give it a list of list of tensors.
pad_sequence can only pad all sequences within the same list of tensors (e.g., doc1 and doc2) but not across multiple lists. You probably need to do this manually as you described: find the longest sentence among all documents and then pad all sentences accordingly.