Unverified Commit c85510f9 authored by Fanli Lin's avatar Fanli Lin Committed by GitHub
Browse files

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

fix
parent bc2adb01
...@@ -195,7 +195,7 @@ inputs = {key: tensor.to(model.device) for key, tensor in inputs.items()} ...@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment