mirror of
https://git.datalinker.icu/vllm-project/vllm.git
synced 2025-12-10 08:04:58 +08:00
[Bugfix][Core] add seq_id_to_seq_group clearing to avoid memory leak when s… (#16472)
Signed-off-by: 开哲 <kaizhe.zy@alibaba-inc.com> Co-authored-by: 开哲 <kaizhe.zy@alibaba-inc.com>
This commit is contained in:
parent
ed2e464653
commit
6167c0e5d2
@ -179,6 +179,13 @@ class RequestOutput:
|
||||
group.finish_seq(seq_group)
|
||||
if assembled_seq_group is None:
|
||||
return None
|
||||
|
||||
# clear finished seq in seq_id_to_seq_group
|
||||
if len(group.to_be_finished) == 0:
|
||||
for sub_request_id in list(group.seq_id_to_index.keys()):
|
||||
if sub_request_id in seq_id_to_seq_group:
|
||||
del seq_id_to_seq_group[sub_request_id]
|
||||
|
||||
return cls.from_seq_group(assembled_seq_group, use_cache,
|
||||
seq_id_to_seq_group)
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user