Unverified Commit eaba8ece authored by Chauncey's avatar Chauncey Committed by GitHub
Browse files

[Bugfix]: Fix Step3ReasoningParser missing is_reasoning_end_streaming (#31969)


Signed-off-by: default avatarchaunceyjiang <chaunceyjiang@gmail.com>
parent fe86be66
...@@ -100,6 +100,12 @@ class Step3ReasoningParser(ReasoningParser): ...@@ -100,6 +100,12 @@ class Step3ReasoningParser(ReasoningParser):
def is_reasoning_end(self, input_ids: list[int]) -> bool: def is_reasoning_end(self, input_ids: list[int]) -> bool:
return self.think_end_token_id in input_ids return self.think_end_token_id in input_ids
def is_reasoning_end_streaming(
self, input_ids: list[int], delta_ids: list[int]
) -> bool:
end_token_id = self.think_end_token_id
return end_token_id in delta_ids
def extract_content_ids(self, input_ids: list[int]) -> list[int]: def extract_content_ids(self, input_ids: list[int]) -> list[int]:
if self.think_end_token_id not in input_ids[:-1]: if self.think_end_token_id not in input_ids[:-1]:
return [] return []
......
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