[docs] change temperature to a positive value (#32077)

fix
This commit is contained in:
Fanli Lin
2024-07-24 00:47:51 +08:00
committed by GitHub
parent bc2adb0112
commit c85510f958

View File

@@ -195,7 +195,7 @@ inputs = {key: tensor.to(model.device) for key, tensor in inputs.items()}
print("Tokenized inputs:\n", inputs) print("Tokenized inputs:\n", inputs)
# 4: Generate text from the model # 4: Generate text from the model
outputs = model.generate(**inputs, max_new_tokens=512, temperature=0.) outputs = model.generate(**inputs, max_new_tokens=512, temperature=0.1)
print("Generated tokens:\n", outputs) print("Generated tokens:\n", outputs)
# 5: Decode the output back to a string # 5: Decode the output back to a string