[Structured Output][Reasoning] Improves decoding throughput for models using single-token reasoning endings. (#30056)

This commit is contained in:
Hubert de La Jonquiere
2025-12-09 18:54:08 +08:00
committed by GitHub
parent 67475a6e81
commit c72ea10723
10 changed files with 89 additions and 1 deletions
+6
View File
@@ -74,6 +74,12 @@ class BaseThinkingReasoningParser(ReasoningParser):
return True
return False
def is_reasoning_end_streaming(
self, input_ids: list[int], delta_ids: list[int]
) -> bool:
end_token_id = self.end_token_id
return end_token_id in delta_ids
def extract_content_ids(self, input_ids: list[int]) -> list[int]:
"""
Extract the content after the end tokens