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
fdf9bf98
Commit
fdf9bf98
authored
Apr 10, 2025
by
lizhigong
Browse files
fix bug for decode len > max model len
parent
09553647
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
vllm/engine/llm_engine.py
vllm/engine/llm_engine.py
+6
-4
No files found.
vllm/engine/llm_engine.py
View file @
fdf9bf98
...
...
@@ -414,12 +414,12 @@ class LLMEngine:
self
.
zero_overhead
=
os
.
environ
.
get
(
'VLLM_ZERO_OVERHEAD'
)
==
'1'
if
self
.
zero_overhead
:
assert
os
.
environ
.
get
(
'HIP_ALLOC_INITIALIZE'
)
==
'0'
self
.
async_d2h
=
None
self
.
last_record
=
None
self
.
async_event
=
torch
.
cuda
.
Event
(
enable_timing
=
False
)
self
.
zero_thread
=
threading
.
Thread
(
target
=
self
.
thread_zero_overhead
)
self
.
q_recorder
=
queue
.
Queue
()
self
.
q_recorder
.
put
(
None
)
# None is use for first step ignore
self
.
thread_running
=
True
self
.
sem_m2s
=
threading
.
Semaphore
(
0
)
# main to scheduler thread
self
.
zero_thread
.
start
()
...
...
@@ -1316,9 +1316,6 @@ class LLMEngine:
seq_group
.
update_num_computed_tokens
(
1
)
else
:
seq
.
append_token_id
(
sample
.
output_token
,
sample
.
logprobs
)
def
trans_last_output_tensor
(
self
,
last_output
)
->
torch
.
Tensor
:
return
None
def
finish_thread
(
self
):
if
self
.
zero_overhead
:
...
...
@@ -1348,6 +1345,11 @@ class LLMEngine:
self
.
async_d2h
=
last_outputs_tensor
.
to
(
'cpu'
,
non_blocking
=
True
)
self
.
async_event
.
record
()
self
.
q_recorder
.
put
(
self
.
last_record
)
else
:
self
.
q_recorder
.
put
(
None
)
if
len
(
seq_group_metadata_list
)
==
0
:
self
.
last_record
=
None
continue
finished_requests_ids
=
self
.
scheduler
[
virtual_engine
].
get_and_reset_finished_requests_ids
()
...
...
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