Skip to content

NVIDIA Nemotron 3 parsing#18077

Merged
aldehir merged 6 commits intoggml-org:masterfrom
aldehir:nemotron-3-parsing
Dec 16, 2025
Merged

NVIDIA Nemotron 3 parsing#18077
aldehir merged 6 commits intoggml-org:masterfrom
aldehir:nemotron-3-parsing

Conversation

@aldehir
Copy link
Contributor

@aldehir aldehir commented Dec 16, 2025

Add reasoning, response format, and tool call parsing for NVIDIA Nemotron 3 Nano (#18058)

Additional Changes
These models selectively output JSON, it is pretty much the Qwen3-Coder format. To handle schemas a bit better, I had to expose parts of the schema converter in json-schema-to-grammar to check if a parameter resolves to a string. If it does, then always parse it as a string to keep things simple.

@aldehir
Copy link
Contributor Author

aldehir commented Dec 16, 2025

One fun thing about this model: it may not emit a </parameter> closing tag on the last parameter. So I had to make that optional...

Copy link
Member

@ggerganov ggerganov left a comment

Choose a reason for hiding this comment

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

Did a few tests with llama-server and it works as expected. Thanks!

@github-actions github-actions bot added the testing Everything test related label Dec 16, 2025
@aldehir
Copy link
Contributor Author

aldehir commented Dec 16, 2025

Just had to remove a lingering debug line. I can merge once the tests pass, if that's OK.

@aldehir aldehir merged commit c05aa69 into ggml-org:master Dec 16, 2025
72 of 73 checks passed
Anico2 added a commit to Anico2/llama.cpp that referenced this pull request Jan 15, 2026
* common : expose json-schema functionality to extract type info

* common : fix peg parser negation during needs_more_input

* common : add some defensive measures in constructed peg parser

* common : add nemotron nano 3 support

* common : add nemotron nano 3 tests

* remove debug line
blime4 referenced this pull request in blime4/llama.cpp Feb 5, 2026
* common : expose json-schema functionality to extract type info

* common : fix peg parser negation during needs_more_input

* common : add some defensive measures in constructed peg parser

* common : add nemotron nano 3 support

* common : add nemotron nano 3 tests

* remove debug line
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

testing Everything test related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants