Skip to content

Commit 41f1418

Browse files
committed
fix parser
1 parent 2f6f063 commit 41f1418

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

fastdeploy/reasoning/ernie_x1_reasoning_parsers.py

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -72,14 +72,7 @@ def __init__(self, tokenizer):
7272

7373
def find_last_special_token(self, prompt_token_ids: list[int]) -> int:
7474
for i in range(len(prompt_token_ids) - 1, -1, -1):
75-
if prompt_token_ids[i] in [
76-
self.think_end_token_id,
77-
self.think_start_token_id,
78-
self.response_start_token_id,
79-
self.response_end_token_id,
80-
self.tool_call_start_token_id,
81-
self.tool_call_end_token_id,
82-
]:
75+
if prompt_token_ids[i] in self.token_status_mapping:
8376
return prompt_token_ids[i]
8477
return -1
8578

0 commit comments

Comments
 (0)