Hi, I wanted to see diversity in outputs and run the code below, but got identical results.
steps=128
gen_length=128
temperature=0.2
top_p = 0.95
alg="entropy"
alg_temp=0.
query = "Write a story:"
message = [
{"role": "user", "content": query}
]
prompt = tokenizer.apply_chat_template(message, add_generation_prompt=True, return_tensors="pt", return_dict=True)
input_ids = prompt.input_ids.to(device)
attention_masks = prompt.attention_mask.to(device)
out = model.diffusion_generate(
input_ids,
attention_mask=attention_masks,
max_new_tokens=256,
output_history=True,
return_dict_in_generate=True,
steps=steps,
temperature=temperature,
top_p=top_p,
alg=alg,
alg_temp=alg_temp,
num_return_sequences=2,
)
The decoded output is
['Once upon a time, in a a land far, far away, there lived a young knight named Arthur. He was a brave and noble knight, known for his courage and and strength. One day, he was sent on a quest to retrieve a magical sword from the depths of a cave. Along the way, he encountered many dangers and challenges, but he always persevered and always emerged victorious.', 'Once upon a time, in a a land far, far away, there lived a young knight named Arthur. He was a brave and noble knight, known for his courage and and strength. One day, he was sent on a quest to retrieve a magical sword from the depths of a cave. Along the way, he encountered many dangers and challenges, but he always persevered and always emerged victorious.']
Hi, I wanted to see diversity in outputs and run the code below, but got identical results.
The decoded output is
['Once upon a time, in a a land far, far away, there lived a young knight named Arthur. He was a brave and noble knight, known for his courage and and strength. One day, he was sent on a quest to retrieve a magical sword from the depths of a cave. Along the way, he encountered many dangers and challenges, but he always persevered and always emerged victorious.', 'Once upon a time, in a a land far, far away, there lived a young knight named Arthur. He was a brave and noble knight, known for his courage and and strength. One day, he was sent on a quest to retrieve a magical sword from the depths of a cave. Along the way, he encountered many dangers and challenges, but he always persevered and always emerged victorious.']