[Model] Add Reasoning Parser for Granite Models (#14202)

Signed-off-by: Alex-Brooks <Alex.brooks@ibm.com>
Co-authored-by: Joe Runde <joe@joerun.de>
This commit is contained in:
Alex Brooks
2025-03-26 14:28:07 +00:00
committed by GitHub
co-authored by Joe Runde
parent c091c0a588
commit 1711b929b6
8 changed files with 730 additions and 3 deletions
@@ -19,6 +19,10 @@ def get_reasoner(tokenizer: PreTrainedTokenizer,
return None
elif reasoning_backend == "deepseek_r1":
return DeepSeekReasoner.from_tokenizer(tokenizer)
elif reasoning_backend == "granite":
logger.warning(
"Granite reasoner not yet implemented for structured outputs")
return None
else:
# Raise a warning for unknown reasoning backend and return None
# We cannot raise an error here because some reasoning models