Skip to content

Add Granite 4.2 thinking parser - #4575

Open
0x484558 wants to merge 2 commits into
openvinotoolkit:mainfrom
0x484558:granite42
Open

0x484558 wants to merge 2 commits into
openvinotoolkit:mainfrom
0x484558:granite42

Conversation

@0x484558

@0x484558 0x484558 commented Sep 16, 2026

Copy link
Copy Markdown

🛠 Summary

Implement and register Granite 4.2 thinking parsing with request-level thinking controls, and make the embedded Jinja tojson filter compatible with the official template,

🧪 Checklist

  • Unit tests added.
  • The documentation updated.
  • Change follows security best practices.

Implement and register Granite 4.2 thinking parsing with request-level thinking controls, and make the embedded Jinja tojson filter compatible with the official template
@0x484558
0x484558 marked this pull request as ready for review September 16, 2026 16:24

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In OVMS we are using name reasoning_parser.
Additionally, please check MiniCPM5 reasoning parser for reference for qwen3-like reasoning parsers.

@0x484558 0x484558 Sep 17, 2026

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've changed the name.

@0x484558 0x484558 Sep 17, 2026

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not qwen3-like reasoning parser, Granite 4.2 parser stays entirely within the original DeepSeek-R1/Nemotron lineage. I cannot subclass qwen3 because IBM parser has incompatible semantics, Nor does it need to cope with unstable garbage that Qwen models generate, which historically prompted Qwen3 reasoning parser to be special.

@0x484558
0x484558 requested a review from przepeck September 17, 2026 09:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants