feat: add reasoning_content and tool-calling support to ChatDataset#1644
Merged
akoumpa merged 8 commits intoNVIDIA-NeMo:mainfrom Apr 3, 2026
Merged
Conversation
Signed-off-by: Zeel <[email protected]>
Signed-off-by: Zeel <[email protected]>
jgerh
reviewed
Apr 1, 2026
Contributor
jgerh
left a comment
There was a problem hiding this comment.
Completed tech pubs review of docs/guides/dataset-overview.md and provided a few copyedits.
Comment on lines
267
to
271
Contributor
There was a problem hiding this comment.
Appears to be duplicate content, check, and then delete
Comment on lines
280
to
284
Contributor
There was a problem hiding this comment.
Appears to be duplicate content, check, and then delete
Signed-off-by: Zeel <[email protected]>
Contributor
Author
|
@jgerh |
Signed-off-by: Zeel <[email protected]>
Contributor
|
/ok to test c07d79e |
Contributor
|
/ok to test 909d307 |
akoumpa
reviewed
Apr 2, 2026
Contributor
|
/ok to test 9b47e54 |
akoumpa
previously approved these changes
Apr 3, 2026
Contributor
|
/ok to test 06200d0 |
akoumpa
approved these changes
Apr 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do ?
Improve OpenAI message-format
ChatDatasetsupport for reasoning traces and tool calling by adding explicit validation, better loss masking for multi-turn assistant turns, optional reasoning-token masking, and updated docs/tests.Changelog
reasoning_contentcontent: nullto""instead of"None"in chat message preprocessingtool_callsentries requireid,type, andfunction.{name,arguments}toolrole messages requiretool_call_id{% generation %}fallback masking so all assistant turns are supervised in multi-turn tool-calling conversationsmask_reasoning_contentsupport to exclude rendered reasoning traces from lossreasoning_contentbut the active chat template does not reference itdocs/guides/dataset-overview.mdwith reasoning + tool-calling examples and chat-template requirementsBefore your PR is "Ready for review"
Pre checks:
Make sure you read and followed Contributor guidelines
Did you write any new necessary tests?
Did you add or update any necessary documentation?
Related to Support reasoning_content and tool calling in openai message format dataset #1640