[Fix] Fix select by ensuring each request has at least one token (#1318)

This commit is contained in:
Lianmin Zheng
2024-09-03 06:31:45 -07:00
committed by GitHub
parent 12cb115d38
commit 1e495e0847
4 changed files with 120 additions and 3 deletions

View File

@@ -7,6 +7,7 @@ from sglang.test.test_programs import (
test_dtype_gen,
test_expert_answer,
test_few_shot_qa,
test_hellaswag_select,
test_mt_bench,
test_parallel_decoding,
test_regex,
@@ -62,6 +63,12 @@ class TestSRTBackend(unittest.TestCase):
def test_dtype_gen(self):
test_dtype_gen()
def test_hellaswag_select(self):
# Run twice to capture more bugs
for _ in range(2):
accuracy, latency = test_hellaswag_select()
assert accuracy > 0.71
if __name__ == "__main__":
unittest.main()