Support top-k sampling (#94)

This commit is contained in:
Woosuk Kwon
2023-05-10 12:51:36 -07:00
committed by GitHub
parent ae356774ab
commit 9f88db35da
3 changed files with 78 additions and 43 deletions
+3 -2
View File
@@ -11,8 +11,9 @@ def main(args: argparse.Namespace):
# Test the following inputs.
test_inputs = [
("A robot may not injure a human being", {}), # Use default parameters.
("What is the meaning of life?", {"n": 3, "temperature": 0.8, "top_p": 0.99}),
("It is only with the heart that one can see rightly", {"n": 4, "use_beam_search": True, "temperature": 0.0}),
("To be or not to be,", {"temperature": 0.8, "top_k": 5}),
("What is the meaning of life?", {"n": 2, "temperature": 0.8, "top_p": 0.95}),
("It is only with the heart that one can see rightly", {"n": 3, "use_beam_search": True, "temperature": 0.0}),
]
while True:
if test_inputs: