Skip to content

common/parser: fix reasoning whitespace bugs + extra parser tests#21085

Merged
pwilkin merged 3 commits into
ggml-org:masterfrom
pwilkin:extra-parser-tests
Mar 28, 2026
Merged

common/parser: fix reasoning whitespace bugs + extra parser tests#21085
pwilkin merged 3 commits into
ggml-org:masterfrom
pwilkin:extra-parser-tests

Conversation

@pwilkin
Copy link
Copy Markdown
Member

@pwilkin pwilkin commented Mar 27, 2026

Overview

Fixes problems with whitespace being assigned to reasoning content instead of reasoning start marker.

Adds reconstruction tests to templates that support them - the rendered message history + current input should be (a proper prefix of) the rendered message history together with the new message parsed. Not all templates respect that, but added tests for those that do.

Requirements

  • I have read and agree with the contributing guidelines
  • AI usage disclosure: Yes, got Claude to test the templates, verify that the lack of reconstruction is template and not parser related and add the tests where they were supported.

@pwilkin pwilkin requested a review from a team as a code owner March 27, 2026 21:55
@pwilkin pwilkin requested a review from aldehir March 27, 2026 21:56
@github-actions github-actions Bot added the testing Everything test related label Mar 27, 2026
@pwilkin pwilkin requested a review from ggerganov as a code owner March 27, 2026 21:59
@pwilkin pwilkin requested review from CISC and ngxson March 28, 2026 01:19
@pwilkin pwilkin merged commit 1f5d15e into ggml-org:master Mar 28, 2026
43 of 51 checks passed
slartibardfast pushed a commit to slartibardfast/llama.cpp that referenced this pull request Apr 12, 2026
…ml-org#21085)

* fix whitespace reasoning issues + add reconstruction tests

* Proper fix

* fix Nemotron autoparser test expectations to include newline in marker
Seunghhon pushed a commit to Seunghhon/llama.cpp that referenced this pull request Apr 26, 2026
…ml-org#21085)

* fix whitespace reasoning issues + add reconstruction tests

* Proper fix

* fix Nemotron autoparser test expectations to include newline in marker
rsenthilkumar6 pushed a commit to rsenthilkumar6/llama.cpp that referenced this pull request May 1, 2026
…ml-org#21085)

* fix whitespace reasoning issues + add reconstruction tests

* Proper fix

* fix Nemotron autoparser test expectations to include newline in marker
ljubomirj pushed a commit to ljubomirj/llama.cpp that referenced this pull request May 6, 2026
…ml-org#21085)

* fix whitespace reasoning issues + add reconstruction tests

* Proper fix

* fix Nemotron autoparser test expectations to include newline in marker
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