torch.manual_seed(5) # doctest: +IGNORE_RESULT
prompt = """There are 5 groups of students in the class. Each group has 4 students. How many students are there in the class?"""
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.