Pad, my brother. Or cut N-Grams (look em up) with the lengths of the minimum length input. Here’s what I did in my code. The batch function is separate.
# create sequences of length 5 tokens
def create_seq(text, seq_len = 5):
    
    sequences = []
    words=text.split(' ')

    # if the number of tokens in 'text' is greater than 5
    if len(words) > seq_len:
        for i in range(seq_len, len(words)+1):
            # select sequence of tokens
            seq = words[i-seq_len:i]
            # add to the list
            sequences.append(" ".join(seq))
    elif len(words) < seq_len:
        seq=words
        for i in range(len(words),seq_len):
            seq.append("<pad>")
        sequences.append(" ".join(seq))

    # if the number of tokens in 'text' is equal to 5
    else:
        sequences=[text]
    return sequences

seqs5=sum([create_seq(i) for i in clean_lines],[]) # clean lines is a big list of sentences (strings)
seqs5