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
035a6cb0
Unverified
Commit
035a6cb0
authored
Feb 06, 2026
by
Cyrus Leung
Committed by
GitHub
Feb 06, 2026
Browse files
[Misc] Update code for encoder-decoder models (#33900)
Signed-off-by:
DarkLight1337
<
tlleungac@connect.ust.hk
>
parent
a32cb49b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
3 deletions
+9
-3
vllm/multimodal/inputs.py
vllm/multimodal/inputs.py
+1
-1
vllm/v1/core/sched/scheduler.py
vllm/v1/core/sched/scheduler.py
+8
-2
No files found.
vllm/multimodal/inputs.py
View file @
035a6cb0
...
...
@@ -1098,7 +1098,7 @@ class MultiModalEncDecInputs(MultiModalInputs):
Note: Even text-only encoder-decoder models are currently implemented
as multi-modal models for convenience.
(Example: https://github.com/
neuralmagic
/bart-plugin)
(Example: https://github.com/
vllm-project
/bart-plugin)
"""
encoder_prompt_token_ids
:
list
[
int
]
...
...
vllm/v1/core/sched/scheduler.py
View file @
035a6cb0
...
...
@@ -185,7 +185,13 @@ class Scheduler(SchedulerInterface):
# NOTE: Text-only encoder-decoder models are implemented as
# multi-modal models for convenience
# Example: https://github.com/neuralmagic/bart-plugin
# Example: https://github.com/vllm-project/bart-plugin
if
self
.
is_encoder_decoder
:
assert
mm_budget
and
len
(
mm_budget
.
mm_max_toks_per_item
)
<=
1
,
(
"Encoder-decoder models are expected to implement the "
"multimodal interface with at most one modality."
)
self
.
max_num_encoder_input_tokens
=
(
mm_budget
.
encoder_compute_budget
if
mm_budget
else
0
)
...
...
@@ -200,7 +206,7 @@ class Scheduler(SchedulerInterface):
# TODO (NickLucche): Generalize to models with variable-length encoder inputs.
self
.
_num_encoder_max_input_tokens
=
(
mm_budget
.
mm_max_toks_per_item
[
mm_budget
.
get_modality_with_max_tokens
()]
if
mm_budget
if
mm_budget
and
mm_budget
.
mm_max_toks_per_item
else
0
)
...
...
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