Correct me if I’m wrong. You want to generate sequences with a trained model. Is your model an auto-regressive one?
Usually, we use language model to generate that. A dummy code would be like
model = ...
# tokenizer, a.k.a., the vocabulary mapping text to integer
tokenizer = ...
# start flag of sequence
bos = '<s>'
seq = [bos]
# convert '<s>' to integer, usually 0
last_token_id = tokenizer.encode(bos)
hidden_state = None
for i in range(max_len):
    predict_token_id, hidden_state = model(last_token_id, hidden_state)
    last_token_id = predict_token_id
    seq.append(tokenizer.decode(predict_token_id.item()))
seq = ' '.join(seq)

Here is a GPT-2 example. gpt2 · Hugging Face