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
c85be1f6
Unverified
Commit
c85be1f6
authored
Sep 25, 2025
by
Nicole LiHui 🥜
Committed by
GitHub
Sep 25, 2025
Browse files
optimize: eliminate duplicate split_enc_dec_inputs calls (#25573)
Signed-off-by:
nicole-lihui
<
nicole.li@daocloud.io
>
parent
845adb3e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
5 deletions
+4
-5
vllm/v1/engine/processor.py
vllm/v1/engine/processor.py
+4
-5
No files found.
vllm/v1/engine/processor.py
View file @
c85be1f6
...
...
@@ -388,9 +388,9 @@ class Processor:
eos_token_id
=
self
.
input_preprocessor
.
get_eos_token_id
()
self
.
_validate_model_inputs
(
processed_inputs
)
encoder_inputs
,
decoder_inputs
=
split_enc_dec_inputs
(
processed_inputs
)
self
.
_validate_model_inputs
(
encoder_inputs
,
decoder_inputs
)
# Mypy does not always properly infer the types of some elements of
# discriminated unions of TypedDicts, because of how it handles
# inheritance of TypedDict. If we explicitly extract the items we want
...
...
@@ -458,9 +458,8 @@ class Processor:
trace_headers
=
trace_headers
,
)
def
_validate_model_inputs
(
self
,
inputs
:
ProcessorInputs
):
encoder_inputs
,
decoder_inputs
=
split_enc_dec_inputs
(
inputs
)
def
_validate_model_inputs
(
self
,
encoder_inputs
:
Optional
[
SingletonInputs
],
decoder_inputs
:
SingletonInputs
):
if
encoder_inputs
is
not
None
:
self
.
_validate_model_input
(
encoder_inputs
,
prompt_type
=
"encoder"
)
...
...
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