Repository navigation
Conversation
GLM 5.3's chat template has three effort levels: it renders reasoning_effort "low" and "high" as "Reasoning Effort: Low" and "High", and anything else as "Max". ds4_glm_reasoning_effort_text() collapsed DS4_THINK_LOW to High, so a client asking for low effort got high. Render Low for DS4_THINK_LOW. DS4_THINK_MEDIUM keeps High as before. The template would send medium (and xhigh) to Max, but changing that would raise effort for clients that send medium today, so it is left for a separate decision.
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.
Problem
GLM 5.3's chat template (
zai-org/GLM-5.3-Flash,chat_template.jinja) has three effort levels:ds4_glm_reasoning_effort_text()collapsesDS4_THINK_LOWtoReasoning Effort: High, so a client asking for low effort gets high.test_reasoning_effort_mappingasserts that mapping, so it may be deliberate; if it is, I'd like to know the reason.Change
Render
Reasoning Effort: LowforDS4_THINK_LOWand update the assertion.DS4_THINK_MEDIUMstays High. The template would send medium (and anything else, including xhigh) to Max, but changing that would raise effort for clients that send medium today, so I left it alone and am raising it here as a question instead.Testing
M5 Max 128 GB, Metal,
GLM-5.3-Flash-Q2.gguf, resident.make clean && make, no warnings;./ds4_test --serverpasses. With the parent'sds4.cthe updated assertion fails; with the fix it passes.reasoning_effort: "low",think_mode: low, and the rendered prompt carriesReasoning Effort: Low.