Misc clean up; Remove the support of jump forward (#4032)
This commit is contained in:
@@ -57,7 +57,6 @@ DETOKENIZER_MAX_STATES = int(os.environ.get("SGLANG_DETOKENIZER_MAX_STATES", 1 <
|
||||
class DecodeStatus:
|
||||
"""Store the status of incremental decoding."""
|
||||
|
||||
vid: int
|
||||
decoded_text: str
|
||||
decode_ids: List[int]
|
||||
surr_offset: int
|
||||
@@ -143,10 +142,8 @@ class DetokenizerManager:
|
||||
read_ids, surr_ids = [], []
|
||||
for i in range(bs):
|
||||
rid = recv_obj.rids[i]
|
||||
vid = recv_obj.vids[i]
|
||||
if rid not in self.decode_status or self.decode_status[rid].vid != vid:
|
||||
if rid not in self.decode_status:
|
||||
s = DecodeStatus(
|
||||
vid=vid,
|
||||
decoded_text=recv_obj.decoded_texts[i],
|
||||
decode_ids=recv_obj.decode_ids[i],
|
||||
surr_offset=0,
|
||||
|
||||
Reference in New Issue
Block a user