As far as variable_sequence length is concerned, there are two ways to resolve this

Pad the sequences with  at the end. Using this can lead to some inefficiencies as if one text is vary long than a lot of 's are required for smaller ones.
Sort the sequences by their length.

Combining both the above techniques is the best practice for variable sequence_length