sequences = pipe( prompt, max_new_tokens=30, do_sample=True, top_k=10, return_full_text = False, ) for seq in sequences: print(f"Result: {seq['generated_text']}") Result: There are a total of 5 groups, so there are 5 x 4=20 students in the class.