Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
vllm_cscc
Commits
d381eb96
Unverified
Commit
d381eb96
authored
Nov 11, 2025
by
Ido Segev
Committed by
GitHub
Nov 11, 2025
Browse files
Multi turn benchmark progress bar for synthetic conversation generation (#28394)
Signed-off-by:
Ido Segev
<
idos@pliops.com
>
parent
9973e6e0
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
4 deletions
+17
-4
benchmarks/multi_turn/bench_dataset.py
benchmarks/multi_turn/bench_dataset.py
+15
-3
benchmarks/multi_turn/requirements.txt
benchmarks/multi_turn/requirements.txt
+2
-1
No files found.
benchmarks/multi_turn/bench_dataset.py
View file @
d381eb96
...
...
@@ -11,6 +11,7 @@ from bench_utils import (
Color
,
logger
,
)
from
tqdm
import
tqdm
from
transformers
import
AutoTokenizer
# type: ignore
# Conversation ID is a string (e.g: "UzTK34D")
...
...
@@ -417,6 +418,10 @@ def generate_conversations(
data
=
file
.
read
()
tokens_in_file
=
tokenizer
.
encode
(
data
,
add_special_tokens
=
False
)
list_of_tokens
.
extend
(
tokens_in_file
)
logger
.
info
(
f
"Loaded
{
len
(
tokens_in_file
)
}
tokens from file
{
filename
}
, "
f
"total tokens so far:
{
len
(
list_of_tokens
)
}
"
)
conversations
:
ConversationsMap
=
{}
conv_id
=
0
...
...
@@ -449,18 +454,25 @@ def generate_conversations(
)
base_offset
+=
common_prefix_tokens
for
conv_id
in
range
(
args
.
num_conversations
):
for
conv_id
in
tqdm
(
range
(
args
.
num_conversations
),
total
=
args
.
num_conversations
,
desc
=
"Generating conversations"
,
unit
=
"conv"
,
):
# Generate a single conversation
messages
:
MessagesList
=
[]
nturns
=
turn_count
[
conv_id
]
# User prompt token count per turn (with lower limit)
input_token_count
:
np
.
ndarray
=
args
.
input_num_tokens
.
sample
(
nturns
)
input_token_count
:
np
.
ndarray
=
args
.
input_num_tokens
.
sample
(
nturns
)
.
astype
(
int
)
input_token_count
=
np
.
maximum
(
input_token_count
,
base_prompt_token_count
)
# Assistant answer token count per turn (with lower limit)
output_token_count
:
np
.
ndarray
=
args
.
output_num_tokens
.
sample
(
nturns
)
output_token_count
:
np
.
ndarray
=
args
.
output_num_tokens
.
sample
(
nturns
).
astype
(
int
)
output_token_count
=
np
.
maximum
(
output_token_count
,
1
)
user_turn
=
True
...
...
benchmarks/multi_turn/requirements.txt
View file @
d381eb96
...
...
@@ -3,3 +3,4 @@ pandas>=2.0.0
aiohttp>=3.10
transformers>=4.46
xlsxwriter>=3.2.1
tqdm>=4.66
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