Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
change
sglang
Commits
da19434c
Unverified
Commit
da19434c
authored
Apr 24, 2024
by
Liangsheng Yin
Committed by
GitHub
Apr 24, 2024
Browse files
Benchmark Updates (#382)
parent
150d7020
Changes
18
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
72 additions
and
17 deletions
+72
-17
benchmark/gsm8k/bench_sglang.py
benchmark/gsm8k/bench_sglang.py
+1
-1
benchmark/hellaswag/bench_sglang.py
benchmark/hellaswag/bench_sglang.py
+1
-1
benchmark/json_decode_regex/bench_sglang.py
benchmark/json_decode_regex/bench_sglang.py
+1
-1
benchmark/json_jump_forward/bench_sglang.py
benchmark/json_jump_forward/bench_sglang.py
+2
-2
benchmark/line_retrieval/bench_sglang.py
benchmark/line_retrieval/bench_sglang.py
+1
-1
benchmark/llm_judge/bench_sglang.py
benchmark/llm_judge/bench_sglang.py
+1
-1
benchmark/long_json_decode/bench_sglang.py
benchmark/long_json_decode/bench_sglang.py
+1
-1
benchmark/mtbench/bench_sglang.py
benchmark/mtbench/bench_sglang.py
+3
-1
benchmark/multi_chain_reasoning/README.md
benchmark/multi_chain_reasoning/README.md
+1
-1
benchmark/multi_chain_reasoning/bench_sglang.py
benchmark/multi_chain_reasoning/bench_sglang.py
+1
-1
benchmark/multi_document_qa/bench_sglang.py
benchmark/multi_document_qa/bench_sglang.py
+1
-1
benchmark/multi_turn_chat/bench_sglang.py
benchmark/multi_turn_chat/bench_sglang.py
+1
-1
benchmark/react/bench_sglang.py
benchmark/react/bench_sglang.py
+3
-1
benchmark/tip_suggestion/.gitignore
benchmark/tip_suggestion/.gitignore
+1
-0
benchmark/tip_suggestion/bench_sglang.py
benchmark/tip_suggestion/bench_sglang.py
+1
-1
benchmark/tip_suggestion/topic.jsonl
benchmark/tip_suggestion/topic.jsonl
+50
-0
benchmark/tree_of_thought_deep/bench_sglang.py
benchmark/tree_of_thought_deep/bench_sglang.py
+1
-1
benchmark/tree_of_thought_v0/bench_sglang.py
benchmark/tree_of_thought_v0/bench_sglang.py
+1
-1
No files found.
benchmark/gsm8k/bench_sglang.py
View file @
da19434c
...
...
@@ -73,7 +73,7 @@ def main(args):
# Run requests
tic
=
time
.
time
()
states
=
few_shot_gsm8k
.
run_batch
(
arguments
,
temperature
=
0
,
backend
=
backend
,
num_threads
=
args
.
parallel
)
arguments
,
temperature
=
0
,
backend
=
backend
,
num_threads
=
args
.
parallel
,
progress_bar
=
True
)
latency
=
time
.
time
()
-
tic
preds
=
[]
...
...
benchmark/hellaswag/bench_sglang.py
View file @
da19434c
...
...
@@ -61,7 +61,7 @@ def main(args):
# Run requests
tic
=
time
.
time
()
rets
=
few_shot_hellaswag
.
run_batch
(
arguments
,
temperature
=
0
,
backend
=
backend
,
num_threads
=
args
.
parallel
)
arguments
,
temperature
=
0
,
backend
=
backend
,
num_threads
=
args
.
parallel
,
progress_bar
=
True
)
preds
=
[
choices
[
i
].
index
(
rets
[
i
][
"answer"
])
for
i
in
range
(
len
(
rets
))]
latency
=
time
.
time
()
-
tic
...
...
benchmark/json_decode_regex/bench_sglang.py
View file @
da19434c
...
...
@@ -63,7 +63,7 @@ def main(args):
# Run requests
tic
=
time
.
time
()
states
=
json_decode
.
run_batch
(
arguments
,
temperature
=
0
,
num_threads
=
args
.
parallel
)
states
=
json_decode
.
run_batch
(
arguments
,
temperature
=
0
,
num_threads
=
args
.
parallel
,
progress_bar
=
True
)
latency
=
time
.
time
()
-
tic
# Compute accuracy
...
...
benchmark/json_jump_forward/bench_sglang.py
View file @
da19434c
...
...
@@ -72,7 +72,7 @@ def bench_city_doc(args):
arguments
,
temperature
=
0
,
num_threads
=
args
.
parallel
,
progress_bar
=
(
args
.
parallel
==
1
)
,
progress_bar
=
True
,
)
latency
=
time
.
time
()
-
tic
...
...
@@ -96,7 +96,7 @@ def bench_character(args):
arguments
,
temperature
=
0
,
num_threads
=
args
.
parallel
,
progress_bar
=
(
args
.
parallel
==
1
)
,
progress_bar
=
True
,
)
latency
=
time
.
time
()
-
tic
...
...
benchmark/line_retrieval/bench_sglang.py
View file @
da19434c
...
...
@@ -61,7 +61,7 @@ def eval_model(args, line_obj, num_hoops, src_indices, dst_percents):
tic
=
time
.
time
()
states
=
line_retrieval
.
run_batch
(
arguments
,
temperature
=
0
,
backend
=
backend
,
num_threads
=
args
.
parallel
)
arguments
,
temperature
=
0
,
backend
=
backend
,
num_threads
=
args
.
parallel
,
progress_bar
=
True
)
latency
=
time
.
time
()
-
tic
corrects
=
[]
...
...
benchmark/llm_judge/bench_sglang.py
View file @
da19434c
...
...
@@ -54,7 +54,7 @@ def main(args):
# Run requests
tic
=
time
.
time
()
states
=
multi_dimension_judge
.
run_batch
(
arguments
,
temperature
=
0
,
backend
=
backend
,
num_threads
=
args
.
parallel
)
arguments
,
temperature
=
0
,
backend
=
backend
,
num_threads
=
args
.
parallel
,
progress_bar
=
True
)
latency
=
time
.
time
()
-
tic
print
(
f
"Latency:
{
latency
:.
3
f
}
"
)
...
...
benchmark/long_json_decode/bench_sglang.py
View file @
da19434c
...
...
@@ -36,7 +36,7 @@ def main(args):
# Run requests
tic
=
time
.
time
()
states
=
json_decode
.
run_batch
(
arguments
,
temperature
=
0
,
num_threads
=
args
.
parallel
)
arguments
,
temperature
=
0
,
num_threads
=
args
.
parallel
,
progress_bar
=
True
)
latency
=
time
.
time
()
-
tic
# Compute accuracy
...
...
benchmark/mtbench/bench_sglang.py
View file @
da19434c
...
...
@@ -60,7 +60,9 @@ def main(args):
arguments
,
temperature
=
0
,
max_new_tokens
=
256
,
num_threads
=
args
.
parallel
)
num_threads
=
args
.
parallel
,
progress_bar
=
True
,
)
answers
=
[[
s
[
"answer_1"
],
s
[
"answer_2"
]]
for
s
in
rets
]
latency
=
time
.
time
()
-
tic
...
...
benchmark/multi_chain_reasoning/README.md
View file @
da19434c
...
...
@@ -7,7 +7,7 @@ wget https://raw.githubusercontent.com/openai/grade-school-math/master/grade_sch
### Benchmark sglang
```
python -m sglang.launch_server --model-path meta-llama/Llama-2-7b-chat-hf --port 30000
python -m sglang.launch_server --model-path meta-llama/Llama-2-7b-chat-hf --port 30000
--schedule-conservativeness 1.3
```
```
...
...
benchmark/multi_chain_reasoning/bench_sglang.py
View file @
da19434c
...
...
@@ -86,7 +86,7 @@ def main(args):
# Run requests
tic
=
time
.
time
()
states
=
multi_chain_gsm8k
.
run_batch
(
arguments
,
temperature
=
0
,
backend
=
backend
,
num_threads
=
args
.
parallel
)
arguments
,
temperature
=
0
,
backend
=
backend
,
num_threads
=
args
.
parallel
,
progress_bar
=
True
)
latency
=
time
.
time
()
-
tic
preds
=
[]
...
...
benchmark/multi_document_qa/bench_sglang.py
View file @
da19434c
...
...
@@ -43,7 +43,7 @@ def main(args):
# Run requests
tic
=
time
.
time
()
states
=
multi_document_qa
.
run_batch
(
arguments
,
temperature
=
0
,
num_threads
=
args
.
parallel
)
arguments
,
temperature
=
0
,
num_threads
=
args
.
parallel
,
progress_bar
=
True
)
latency
=
time
.
time
()
-
tic
# Compute accuracy
...
...
benchmark/multi_turn_chat/bench_sglang.py
View file @
da19434c
...
...
@@ -29,7 +29,7 @@ def main(args):
tic
=
time
.
time
()
states
=
multi_turns
.
run_batch
(
multi_qas
,
temperature
=
0
,
backend
=
backend
,
num_threads
=
args
.
parallel
multi_qas
,
temperature
=
0
,
backend
=
backend
,
num_threads
=
args
.
parallel
,
progress_bar
=
True
)
latency
=
time
.
time
()
-
tic
...
...
benchmark/react/bench_sglang.py
View file @
da19434c
...
...
@@ -110,7 +110,9 @@ def main(args):
tic
=
time
.
time
()
states
=
webthink
.
run_batch
(
arguments
,
temperature
=
0
,
num_threads
=
args
.
parallel
)
num_threads
=
args
.
parallel
,
progress_bar
=
True
,
)
latency
=
time
.
time
()
-
tic
# Compute accuracy
...
...
benchmark/tip_suggestion/.gitignore
0 → 100644
View file @
da19434c
!topic.jsonl
\ No newline at end of file
benchmark/tip_suggestion/bench_sglang.py
View file @
da19434c
...
...
@@ -59,7 +59,7 @@ def main(args):
# Run requests
tic
=
time
.
time
()
states
=
suggest_tips
.
run_batch
(
arguments
,
temperature
=
0
,
num_threads
=
args
.
parallel
)
arguments
,
temperature
=
0
,
num_threads
=
args
.
parallel
,
progress_bar
=
True
)
latency
=
time
.
time
()
-
tic
# Compute accuracy
...
...
benchmark/tip_suggestion/topic.jsonl
0 → 100644
View file @
da19434c
{"topic": "organizing a successful charity event", "number": 6}
{"topic": "improving personal credit scores", "number": 7}
{"topic": "staying motivated during job searches", "number": 5}
{"topic": "maintaining a work-life balance", "number": 9}
{"topic": "reducing carbon footprint at home", "number": 8}
{"topic": "starting a book club", "number": 5}
{"topic": "learning to play a musical instrument", "number": 7}
{"topic": "getting into freelance writing", "number": 6}
{"topic": "beginner yoga poses", "number": 8}
{"topic": "preparing for graduate school exams", "number": 5}
{"topic": "exploring minimalist living", "number": 9}
{"topic": "effective grocery shopping", "number": 7}
{"topic": "winter camping", "number": 5}
{"topic": "starting a podcast on a budget", "number": 8}
{"topic": "creating a capsule wardrobe", "number": 6}
{"topic": "improving your writing skills", "number": 7}
{"topic": "learning a new software quickly", "number": 9}
{"topic": "reducing anxiety before public speaking", "number": 5}
{"topic": "planning a solo travel adventure", "number": 8}
{"topic": "beginner skateboarders", "number": 6}
{"topic": "studying abroad", "number": 7}
{"topic": "planting a vegetable garden", "number": 5}
{"topic": "adopting a shelter pet", "number": 9}
{"topic": "learning to cook ethnic cuisines", "number": 8}
{"topic": "effective conflict resolution", "number": 5}
{"topic": "starting a vlog", "number": 7}
{"topic": "keeping a daily journal", "number": 6}
{"topic": "improving sleep hygiene", "number": 8}
{"topic": "beginner mountain climbers", "number": 5}
{"topic": "creating a mobile app", "number": 9}
{"topic": "maintaining a saltwater aquarium", "number": 7}
{"topic": "preparing for a baby's arrival", "number": 6}
{"topic": "writing a fantasy novel", "number": 5}
{"topic": "effective team leadership", "number": 8}
{"topic": "making a documentary film", "number": 9}
{"topic": "learning about historical events", "number": 7}
{"topic": "baking gluten-free treats", "number": 6}
{"topic": "improving mental arithmetic skills", "number": 5}
{"topic": "building a treehouse", "number": 8}
{"topic": "getting started with watercolor painting", "number": 9}
{"topic": "creating a YouTube tutorial series", "number": 7}
{"topic": "landscape photography", "number": 5}
{"topic": "navigating cultural differences", "number": 6}
{"topic": "preparing for a marathon", "number": 8}
{"topic": "building an online business", "number": 9}
{"topic": "learning to dance at home", "number": 5}
{"topic": "self-publishing a book", "number": 7}
{"topic": "starting an urban farm", "number": 6}
{"topic": "improving your memory", "number": 8}
{"topic": "creating a personal brand online", "number": 9}
\ No newline at end of file
benchmark/tree_of_thought_deep/bench_sglang.py
View file @
da19434c
...
...
@@ -112,7 +112,7 @@ def main(args):
# Run requests
tic
=
time
.
time
()
states
=
tree_search
.
run_batch
(
arguments
,
temperature
=
0
,
backend
=
backend
,
num_threads
=
args
.
parallel
)
arguments
,
temperature
=
0
,
backend
=
backend
,
num_threads
=
args
.
parallel
,
progress_bar
=
True
)
latency
=
time
.
time
()
-
tic
answers_text
=
[]
for
s
in
states
:
...
...
benchmark/tree_of_thought_v0/bench_sglang.py
View file @
da19434c
...
...
@@ -102,7 +102,7 @@ def main(args):
# Run requests
tic
=
time
.
time
()
states
=
tree_search
.
run_batch
(
arguments
,
temperature
=
0
,
backend
=
backend
,
num_threads
=
args
.
parallel
)
arguments
,
temperature
=
0
,
backend
=
backend
,
num_threads
=
args
.
parallel
,
progress_bar
=
True
)
latency
=
time
.
time
()
-
tic
answers_text
=
[]
for
s
in
states
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment