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
135cf55c
Unverified
Commit
135cf55c
authored
Jun 03, 2025
by
Ekagra Ranjan
Committed by
GitHub
Jun 03, 2025
Browse files
[V1][Spec Decode][Ngram] 1.35x gain -> 1.95x gain on InstructCoder with prompt fix (#18971)
parent
6cac54f4
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
2 deletions
+22
-2
benchmarks/benchmark_dataset.py
benchmarks/benchmark_dataset.py
+9
-1
vllm/benchmarks/datasets.py
vllm/benchmarks/datasets.py
+13
-1
No files found.
benchmarks/benchmark_dataset.py
View file @
135cf55c
...
@@ -865,7 +865,15 @@ class InstructCoderDataset(HuggingFaceDataset):
...
@@ -865,7 +865,15 @@ class InstructCoderDataset(HuggingFaceDataset):
for
item
in
self
.
data
:
for
item
in
self
.
data
:
if
len
(
sampled_requests
)
>=
num_requests
:
if
len
(
sampled_requests
)
>=
num_requests
:
break
break
prompt
=
f
"
{
item
[
'instruction'
]
}
:
\n
{
item
[
'input'
]
}
"
prompt
=
f
"
{
item
[
'input'
]
}
\n\n
{
item
[
'instruction'
]
}
Just output
\
the code, do not include any explanation."
# apply template
prompt
=
tokenizer
.
apply_chat_template
(
[{
"role"
:
"user"
,
"content"
:
prompt
}],
add_generation_prompt
=
True
,
tokenize
=
False
,
)
prompt_len
=
len
(
tokenizer
(
prompt
).
input_ids
)
prompt_len
=
len
(
tokenizer
(
prompt
).
input_ids
)
sampled_requests
.
append
(
sampled_requests
.
append
(
SampleRequest
(
SampleRequest
(
...
...
vllm/benchmarks/datasets.py
View file @
135cf55c
...
@@ -880,7 +880,19 @@ class InstructCoderDataset(HuggingFaceDataset):
...
@@ -880,7 +880,19 @@ class InstructCoderDataset(HuggingFaceDataset):
for
item
in
self
.
data
:
for
item
in
self
.
data
:
if
len
(
sampled_requests
)
>=
num_requests
:
if
len
(
sampled_requests
)
>=
num_requests
:
break
break
prompt
=
f
"
{
item
[
'instruction'
]
}
:
\n
{
item
[
'input'
]
}
"
prompt
=
f
"
{
item
[
'input'
]
}
\n\n
{
item
[
'instruction'
]
}
Just output
\
the code, do not include any explanation."
# apply template
prompt
=
tokenizer
.
apply_chat_template
(
[{
"role"
:
"user"
,
"content"
:
prompt
}],
add_generation_prompt
=
True
,
tokenize
=
False
,
)
prompt_len
=
len
(
tokenizer
(
prompt
).
input_ids
)
prompt_len
=
len
(
tokenizer
(
prompt
).
input_ids
)
sampled_requests
.
append
(
sampled_requests
.
append
(
SampleRequest
(
SampleRequest
(
...
...
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