Skip to content

Commit

Permalink
fix ci
Browse files Browse the repository at this point in the history
  • Loading branch information
kavioyu committed Nov 24, 2024
1 parent 2f928d0 commit 30a0bab
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
1 change: 1 addition & 0 deletions python/sglang/bench_offline_throughput.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,7 @@ def throughput_test(
if bench_args.result_filename:
with open(bench_args.result_filename, "a") as fout:
fout.write(json.dumps(result) + "\n")
backend.shutdown()

print(
"\n{s:{c}^{n}}".format(s=" Offline Throughput Benchmark Result ", n=50, c="=")
Expand Down
11 changes: 10 additions & 1 deletion test/srt/test_eagle_infer.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,19 @@ def test_2_eagle_offline_throughput(self):
bench_args = BenchArgs(num_prompts=10)
result_eagle = throughput_test(server_args=server_args, bench_args=bench_args)

server_args = ServerArgs(
model_path="meta-llama/Llama-2-7b-chat-hf",
)
result_naive = throughput_test(server_args=server_args, bench_args=bench_args)

print("==== Throughput EAGLE ====")
print(result_eagle["total_throughput"])
print("==== Throughput Baseline ====")
print(result_naive["total_throughput"])

self.assertGreater(result_eagle["total_throughput"], 1200.0)
self.assertGreater(
result_eagle["total_throughput"], result_naive["total_throughput"] * 1.5
)


if __name__ == "__main__":
Expand Down

0 comments on commit 30a0bab

Please sign in to comment.