Unverified Commit 9af0e21e authored by Shenggui Li's avatar Shenggui Li Committed by GitHub
Browse files

[bug] fixed batch api for DeepSeek V3/R1 (#3754)

parent c7c79b16
......@@ -162,6 +162,7 @@ class DetokenizerManager:
# Incremental decoding
output_strs = []
finished_reqs = []
for i in range(bs):
try:
s = self.decode_status[recv_obj.rids[i]]
......@@ -184,6 +185,8 @@ class DetokenizerManager:
new_text = ""
else:
new_text = find_printable_text(new_text)
else:
finished_reqs.append(recv_obj.rids[i])
output_strs.append(
self.trim_matched_stop(
......@@ -214,6 +217,10 @@ class DetokenizerManager:
)
)
# remove decodestatus for completed requests
for rid in finished_reqs:
self.decode_status.pop(rid)
class LimitedCapacityDict(OrderedDict):
def __init__(self, capacity: int, *args, **kwargs):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment